From d5acb00e881256ec5866d14556b9a013157288a6 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 20 Nov 2024 18:37:17 -0800 Subject: [PATCH] feat: [contactcenterinsights] Add FeedbackLabel resource and APIs (#5817) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Add FeedbackLabel resource and APIs feat: Add QueryMetrics API feat: Add Quality AI resources and APIs feat: Add AnalysisRules resource and APIs docs: A comment for method `InitializeEncryptionSpec` in service `ContactCenterInsights` is changed docs: A comment for field `custom_metadata_keys` in message `.google.cloud.contactcenterinsights.v1.IngestConversationsRequest` is changed docs: A comment for field `encryption_spec` in message `.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest` is changed docs: A comment for field `partial_errors` in message `.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata` is changed docs: A comment for field `labels` in message `.google.cloud.contactcenterinsights.v1.Conversation` is changed docs: A comment for field `metadata_json` in message `.google.cloud.contactcenterinsights.v1.Conversation` is changed docs: A comment for message `EncryptionSpec` is changed docs: A comment for field `kms_key` in message `.google.cloud.contactcenterinsights.v1.EncryptionSpec` is changed PiperOrigin-RevId: 696581715 Source-Link: https://github.com/googleapis/googleapis/commit/242a5f1996b719669021fce6723df83a1a934505 Source-Link: https://github.com/googleapis/googleapis-gen/commit/1a5125253c3dbdd912278d45909ad6cfb0031085 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNvbnRhY3RjZW50ZXJpbnNpZ2h0cy8uT3dsQm90LnlhbWwiLCJoIjoiMWE1MTI1MjUzYzNkYmRkOTEyMjc4ZDQ1OTA5YWQ2Y2ZiMDAzMTA4NSJ9 * 🦉 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 --- .../README.md | 31 + .../v1/contact_center_insights.proto | 1479 +- .../contactcenterinsights/v1/resources.proto | 536 +- .../protos/protos.d.ts | 17978 ++++-- .../protos/protos.js | 49332 ++++++++++++---- .../protos/protos.json | 6418 +- .../samples/README.md | 558 + ..._insights.bulk_download_feedback_labels.js | 103 + ...er_insights.bulk_upload_feedback_labels.js | 72 + ...ct_center_insights.create_analysis_rule.js | 69 + ...t_center_insights.create_feedback_label.js | 71 + ...tact_center_insights.create_qa_question.js | 74 + ...act_center_insights.create_qa_scorecard.js | 74 + ...r_insights.create_qa_scorecard_revision.js | 74 + ...ct_center_insights.delete_analysis_rule.js | 61 + ...t_center_insights.delete_feedback_label.js | 61 + ...tact_center_insights.delete_qa_question.js | 61 + ...act_center_insights.delete_qa_scorecard.js | 66 + ...r_insights.delete_qa_scorecard_revision.js | 67 + ...r_insights.deploy_qa_scorecard_revision.js | 61 + ...ntact_center_insights.get_analysis_rule.js | 61 + ...tact_center_insights.get_feedback_label.js | 61 + ...contact_center_insights.get_qa_question.js | 61 + ...ontact_center_insights.get_qa_scorecard.js | 61 + ...nter_insights.get_qa_scorecard_revision.js | 61 + ...ter_insights.initialize_encryption_spec.js | 2 +- ...enter_insights.list_all_feedback_labels.js | 90 + ...act_center_insights.list_analysis_rules.js | 76 + ...ct_center_insights.list_feedback_labels.js | 92 + ...ntact_center_insights.list_qa_questions.js | 76 + ...er_insights.list_qa_scorecard_revisions.js | 84 + ...tact_center_insights.list_qa_scorecards.js | 76 + .../contact_center_insights.query_metrics.js | 92 + ...ter_insights.tune_qa_scorecard_revision.js | 78 + ...insights.undeploy_qa_scorecard_revision.js | 61 + ...ct_center_insights.update_analysis_rule.js | 67 + ...t_center_insights.update_feedback_label.js | 66 + ...tact_center_insights.update_qa_question.js | 74 + ...act_center_insights.update_qa_scorecard.js | 70 + ...google.cloud.contactcenterinsights.v1.json | 1418 +- .../src/v1/contact_center_insights_client.ts | 8173 ++- ...contact_center_insights_client_config.json | 155 + .../src/v1/gapic_metadata.json | 334 + .../test/gapic_contact_center_insights_v1.ts | 10458 +++- 44 files changed, 76319 insertions(+), 22774 deletions(-) create mode 100644 packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.bulk_download_feedback_labels.js create mode 100644 packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.bulk_upload_feedback_labels.js create mode 100644 packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_analysis_rule.js create mode 100644 packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_feedback_label.js create mode 100644 packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_qa_question.js create mode 100644 packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_qa_scorecard.js create mode 100644 packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_qa_scorecard_revision.js create mode 100644 packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_analysis_rule.js create mode 100644 packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_feedback_label.js create mode 100644 packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_qa_question.js create mode 100644 packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_qa_scorecard.js create mode 100644 packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_qa_scorecard_revision.js create mode 100644 packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.deploy_qa_scorecard_revision.js create mode 100644 packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_analysis_rule.js create mode 100644 packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_feedback_label.js create mode 100644 packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_qa_question.js create mode 100644 packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_qa_scorecard.js create mode 100644 packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_qa_scorecard_revision.js create mode 100644 packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_all_feedback_labels.js create mode 100644 packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_analysis_rules.js create mode 100644 packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_feedback_labels.js create mode 100644 packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_qa_questions.js create mode 100644 packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_qa_scorecard_revisions.js create mode 100644 packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_qa_scorecards.js create mode 100644 packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.query_metrics.js create mode 100644 packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.tune_qa_scorecard_revision.js create mode 100644 packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.undeploy_qa_scorecard_revision.js create mode 100644 packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_analysis_rule.js create mode 100644 packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_feedback_label.js create mode 100644 packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_qa_question.js create mode 100644 packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_qa_scorecard.js diff --git a/packages/google-cloud-contactcenterinsights/README.md b/packages/google-cloud-contactcenterinsights/README.md index 106a1c20b18..e8c0fdc16c5 100644 --- a/packages/google-cloud-contactcenterinsights/README.md +++ b/packages/google-cloud-contactcenterinsights/README.md @@ -89,44 +89,75 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | --------------------------- | --------------------------------- | ------ | | Contact_center_insights.bulk_analyze_conversations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.bulk_analyze_conversations.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-contactcenterinsights/samples/generated/v1/contact_center_insights.bulk_analyze_conversations.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.bulk_delete_conversations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.bulk_delete_conversations.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-contactcenterinsights/samples/generated/v1/contact_center_insights.bulk_delete_conversations.js,packages/google-cloud-contactcenterinsights/samples/README.md) | +| Contact_center_insights.bulk_download_feedback_labels | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.bulk_download_feedback_labels.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-contactcenterinsights/samples/generated/v1/contact_center_insights.bulk_download_feedback_labels.js,packages/google-cloud-contactcenterinsights/samples/README.md) | +| Contact_center_insights.bulk_upload_feedback_labels | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.bulk_upload_feedback_labels.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-contactcenterinsights/samples/generated/v1/contact_center_insights.bulk_upload_feedback_labels.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.calculate_issue_model_stats | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.calculate_issue_model_stats.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-contactcenterinsights/samples/generated/v1/contact_center_insights.calculate_issue_model_stats.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.calculate_stats | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.calculate_stats.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-contactcenterinsights/samples/generated/v1/contact_center_insights.calculate_stats.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.create_analysis | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_analysis.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-contactcenterinsights/samples/generated/v1/contact_center_insights.create_analysis.js,packages/google-cloud-contactcenterinsights/samples/README.md) | +| Contact_center_insights.create_analysis_rule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_analysis_rule.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-contactcenterinsights/samples/generated/v1/contact_center_insights.create_analysis_rule.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.create_conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_conversation.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-contactcenterinsights/samples/generated/v1/contact_center_insights.create_conversation.js,packages/google-cloud-contactcenterinsights/samples/README.md) | +| Contact_center_insights.create_feedback_label | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_feedback_label.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-contactcenterinsights/samples/generated/v1/contact_center_insights.create_feedback_label.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.create_issue_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_issue_model.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-contactcenterinsights/samples/generated/v1/contact_center_insights.create_issue_model.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.create_phrase_matcher | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_phrase_matcher.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-contactcenterinsights/samples/generated/v1/contact_center_insights.create_phrase_matcher.js,packages/google-cloud-contactcenterinsights/samples/README.md) | +| Contact_center_insights.create_qa_question | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_qa_question.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-contactcenterinsights/samples/generated/v1/contact_center_insights.create_qa_question.js,packages/google-cloud-contactcenterinsights/samples/README.md) | +| Contact_center_insights.create_qa_scorecard | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_qa_scorecard.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-contactcenterinsights/samples/generated/v1/contact_center_insights.create_qa_scorecard.js,packages/google-cloud-contactcenterinsights/samples/README.md) | +| Contact_center_insights.create_qa_scorecard_revision | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_qa_scorecard_revision.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-contactcenterinsights/samples/generated/v1/contact_center_insights.create_qa_scorecard_revision.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.create_view | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_view.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-contactcenterinsights/samples/generated/v1/contact_center_insights.create_view.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.delete_analysis | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_analysis.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-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_analysis.js,packages/google-cloud-contactcenterinsights/samples/README.md) | +| Contact_center_insights.delete_analysis_rule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_analysis_rule.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-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_analysis_rule.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.delete_conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_conversation.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-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_conversation.js,packages/google-cloud-contactcenterinsights/samples/README.md) | +| Contact_center_insights.delete_feedback_label | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_feedback_label.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-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_feedback_label.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.delete_issue | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_issue.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-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_issue.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.delete_issue_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_issue_model.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-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_issue_model.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.delete_phrase_matcher | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_phrase_matcher.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-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_phrase_matcher.js,packages/google-cloud-contactcenterinsights/samples/README.md) | +| Contact_center_insights.delete_qa_question | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_qa_question.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-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_qa_question.js,packages/google-cloud-contactcenterinsights/samples/README.md) | +| Contact_center_insights.delete_qa_scorecard | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_qa_scorecard.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-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_qa_scorecard.js,packages/google-cloud-contactcenterinsights/samples/README.md) | +| Contact_center_insights.delete_qa_scorecard_revision | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_qa_scorecard_revision.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-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_qa_scorecard_revision.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.delete_view | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_view.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-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_view.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.deploy_issue_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.deploy_issue_model.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-contactcenterinsights/samples/generated/v1/contact_center_insights.deploy_issue_model.js,packages/google-cloud-contactcenterinsights/samples/README.md) | +| Contact_center_insights.deploy_qa_scorecard_revision | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.deploy_qa_scorecard_revision.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-contactcenterinsights/samples/generated/v1/contact_center_insights.deploy_qa_scorecard_revision.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.export_insights_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.export_insights_data.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-contactcenterinsights/samples/generated/v1/contact_center_insights.export_insights_data.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.export_issue_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.export_issue_model.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-contactcenterinsights/samples/generated/v1/contact_center_insights.export_issue_model.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.get_analysis | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_analysis.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-contactcenterinsights/samples/generated/v1/contact_center_insights.get_analysis.js,packages/google-cloud-contactcenterinsights/samples/README.md) | +| Contact_center_insights.get_analysis_rule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_analysis_rule.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-contactcenterinsights/samples/generated/v1/contact_center_insights.get_analysis_rule.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.get_conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_conversation.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-contactcenterinsights/samples/generated/v1/contact_center_insights.get_conversation.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.get_encryption_spec | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_encryption_spec.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-contactcenterinsights/samples/generated/v1/contact_center_insights.get_encryption_spec.js,packages/google-cloud-contactcenterinsights/samples/README.md) | +| Contact_center_insights.get_feedback_label | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_feedback_label.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-contactcenterinsights/samples/generated/v1/contact_center_insights.get_feedback_label.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.get_issue | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_issue.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-contactcenterinsights/samples/generated/v1/contact_center_insights.get_issue.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.get_issue_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_issue_model.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-contactcenterinsights/samples/generated/v1/contact_center_insights.get_issue_model.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.get_phrase_matcher | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_phrase_matcher.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-contactcenterinsights/samples/generated/v1/contact_center_insights.get_phrase_matcher.js,packages/google-cloud-contactcenterinsights/samples/README.md) | +| Contact_center_insights.get_qa_question | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_qa_question.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-contactcenterinsights/samples/generated/v1/contact_center_insights.get_qa_question.js,packages/google-cloud-contactcenterinsights/samples/README.md) | +| Contact_center_insights.get_qa_scorecard | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_qa_scorecard.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-contactcenterinsights/samples/generated/v1/contact_center_insights.get_qa_scorecard.js,packages/google-cloud-contactcenterinsights/samples/README.md) | +| Contact_center_insights.get_qa_scorecard_revision | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_qa_scorecard_revision.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-contactcenterinsights/samples/generated/v1/contact_center_insights.get_qa_scorecard_revision.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.get_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_settings.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-contactcenterinsights/samples/generated/v1/contact_center_insights.get_settings.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.get_view | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_view.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-contactcenterinsights/samples/generated/v1/contact_center_insights.get_view.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.import_issue_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.import_issue_model.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-contactcenterinsights/samples/generated/v1/contact_center_insights.import_issue_model.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.ingest_conversations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.ingest_conversations.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-contactcenterinsights/samples/generated/v1/contact_center_insights.ingest_conversations.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.initialize_encryption_spec | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.initialize_encryption_spec.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-contactcenterinsights/samples/generated/v1/contact_center_insights.initialize_encryption_spec.js,packages/google-cloud-contactcenterinsights/samples/README.md) | +| Contact_center_insights.list_all_feedback_labels | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_all_feedback_labels.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-contactcenterinsights/samples/generated/v1/contact_center_insights.list_all_feedback_labels.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.list_analyses | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_analyses.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-contactcenterinsights/samples/generated/v1/contact_center_insights.list_analyses.js,packages/google-cloud-contactcenterinsights/samples/README.md) | +| Contact_center_insights.list_analysis_rules | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_analysis_rules.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-contactcenterinsights/samples/generated/v1/contact_center_insights.list_analysis_rules.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.list_conversations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_conversations.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-contactcenterinsights/samples/generated/v1/contact_center_insights.list_conversations.js,packages/google-cloud-contactcenterinsights/samples/README.md) | +| Contact_center_insights.list_feedback_labels | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_feedback_labels.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-contactcenterinsights/samples/generated/v1/contact_center_insights.list_feedback_labels.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.list_issue_models | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_issue_models.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-contactcenterinsights/samples/generated/v1/contact_center_insights.list_issue_models.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.list_issues | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_issues.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-contactcenterinsights/samples/generated/v1/contact_center_insights.list_issues.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.list_phrase_matchers | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_phrase_matchers.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-contactcenterinsights/samples/generated/v1/contact_center_insights.list_phrase_matchers.js,packages/google-cloud-contactcenterinsights/samples/README.md) | +| Contact_center_insights.list_qa_questions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_qa_questions.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-contactcenterinsights/samples/generated/v1/contact_center_insights.list_qa_questions.js,packages/google-cloud-contactcenterinsights/samples/README.md) | +| Contact_center_insights.list_qa_scorecard_revisions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_qa_scorecard_revisions.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-contactcenterinsights/samples/generated/v1/contact_center_insights.list_qa_scorecard_revisions.js,packages/google-cloud-contactcenterinsights/samples/README.md) | +| Contact_center_insights.list_qa_scorecards | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_qa_scorecards.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-contactcenterinsights/samples/generated/v1/contact_center_insights.list_qa_scorecards.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.list_views | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_views.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-contactcenterinsights/samples/generated/v1/contact_center_insights.list_views.js,packages/google-cloud-contactcenterinsights/samples/README.md) | +| Contact_center_insights.query_metrics | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.query_metrics.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-contactcenterinsights/samples/generated/v1/contact_center_insights.query_metrics.js,packages/google-cloud-contactcenterinsights/samples/README.md) | +| Contact_center_insights.tune_qa_scorecard_revision | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.tune_qa_scorecard_revision.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-contactcenterinsights/samples/generated/v1/contact_center_insights.tune_qa_scorecard_revision.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.undeploy_issue_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.undeploy_issue_model.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-contactcenterinsights/samples/generated/v1/contact_center_insights.undeploy_issue_model.js,packages/google-cloud-contactcenterinsights/samples/README.md) | +| Contact_center_insights.undeploy_qa_scorecard_revision | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.undeploy_qa_scorecard_revision.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-contactcenterinsights/samples/generated/v1/contact_center_insights.undeploy_qa_scorecard_revision.js,packages/google-cloud-contactcenterinsights/samples/README.md) | +| Contact_center_insights.update_analysis_rule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_analysis_rule.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-contactcenterinsights/samples/generated/v1/contact_center_insights.update_analysis_rule.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.update_conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_conversation.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-contactcenterinsights/samples/generated/v1/contact_center_insights.update_conversation.js,packages/google-cloud-contactcenterinsights/samples/README.md) | +| Contact_center_insights.update_feedback_label | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_feedback_label.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-contactcenterinsights/samples/generated/v1/contact_center_insights.update_feedback_label.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.update_issue | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_issue.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-contactcenterinsights/samples/generated/v1/contact_center_insights.update_issue.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.update_issue_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_issue_model.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-contactcenterinsights/samples/generated/v1/contact_center_insights.update_issue_model.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.update_phrase_matcher | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_phrase_matcher.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-contactcenterinsights/samples/generated/v1/contact_center_insights.update_phrase_matcher.js,packages/google-cloud-contactcenterinsights/samples/README.md) | +| Contact_center_insights.update_qa_question | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_qa_question.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-contactcenterinsights/samples/generated/v1/contact_center_insights.update_qa_question.js,packages/google-cloud-contactcenterinsights/samples/README.md) | +| Contact_center_insights.update_qa_scorecard | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_qa_scorecard.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-contactcenterinsights/samples/generated/v1/contact_center_insights.update_qa_scorecard.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.update_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_settings.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-contactcenterinsights/samples/generated/v1/contact_center_insights.update_settings.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.update_view | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_view.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-contactcenterinsights/samples/generated/v1/contact_center_insights.update_view.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.upload_conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.upload_conversation.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-contactcenterinsights/samples/generated/v1/contact_center_insights.upload_conversation.js,packages/google-cloud-contactcenterinsights/samples/README.md) | diff --git a/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/contact_center_insights.proto b/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/contact_center_insights.proto index f5126da5c7b..0663e6e7c63 100644 --- a/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/contact_center_insights.proto +++ b/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/contact_center_insights.proto @@ -27,6 +27,7 @@ import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; +import "google/type/interval.proto"; option csharp_namespace = "Google.Cloud.ContactCenterInsights.V1"; option go_package = "cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb;contactcenterinsightspb"; @@ -422,6 +423,50 @@ service ContactCenterInsights { option (google.api.method_signature) = "settings,update_mask"; } + // Creates a analysis rule. + rpc CreateAnalysisRule(CreateAnalysisRuleRequest) returns (AnalysisRule) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/analysisRules" + body: "analysis_rule" + }; + option (google.api.method_signature) = "parent,analysis_rule"; + } + + // Get a analysis rule. + rpc GetAnalysisRule(GetAnalysisRuleRequest) returns (AnalysisRule) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/analysisRules/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists analysis rules. + rpc ListAnalysisRules(ListAnalysisRulesRequest) + returns (ListAnalysisRulesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/analysisRules" + }; + option (google.api.method_signature) = "parent"; + } + + // Updates a analysis rule. + rpc UpdateAnalysisRule(UpdateAnalysisRuleRequest) returns (AnalysisRule) { + option (google.api.http) = { + patch: "/v1/{analysis_rule.name=projects/*/locations/*/analysisRules/*}" + body: "analysis_rule" + }; + option (google.api.method_signature) = "analysis_rule,update_mask"; + } + + // Deletes a analysis rule. + rpc DeleteAnalysisRule(DeleteAnalysisRuleRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/analysisRules/*}" + }; + option (google.api.method_signature) = "name"; + } + // Gets location-level encryption key specification. rpc GetEncryptionSpec(GetEncryptionSpecRequest) returns (EncryptionSpec) { option (google.api.http) = { @@ -430,9 +475,9 @@ service ContactCenterInsights { option (google.api.method_signature) = "name"; } - // Initializes a location-level encryption key specification. An error will - // be thrown if the location has resources already created before the - // initialization. Once the encryption specification is initialized at a + // Initializes a location-level encryption key specification. An error will + // result if the location has resources already created before the + // initialization. After the encryption specification is initialized at a // location, it is immutable and all newly created resources under the // location will be encrypted with the existing specification. rpc InitializeEncryptionSpec(InitializeEncryptionSpecRequest) @@ -489,6 +534,259 @@ service ContactCenterInsights { }; option (google.api.method_signature) = "name"; } + + // Query metrics. + rpc QueryMetrics(QueryMetricsRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{location=projects/*/locations/*}:queryMetrics" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "QueryMetricsResponse" + metadata_type: "QueryMetricsMetadata" + }; + } + + // Create a QaQuestion. + rpc CreateQaQuestion(CreateQaQuestionRequest) returns (QaQuestion) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/qaScorecards/*/revisions/*}/qaQuestions" + body: "qa_question" + }; + option (google.api.method_signature) = "parent,qa_question, qa_question_id"; + } + + // Gets a QaQuestion. + rpc GetQaQuestion(GetQaQuestionRequest) returns (QaQuestion) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/qaScorecards/*/revisions/*/qaQuestions/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a QaQuestion. + rpc UpdateQaQuestion(UpdateQaQuestionRequest) returns (QaQuestion) { + option (google.api.http) = { + patch: "/v1/{qa_question.name=projects/*/locations/*/qaScorecards/*/revisions/*/qaQuestions/*}" + body: "qa_question" + }; + option (google.api.method_signature) = "qa_question,update_mask"; + } + + // Deletes a QaQuestion. + rpc DeleteQaQuestion(DeleteQaQuestionRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/qaScorecards/*/revisions/*/qaQuestions/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists QaQuestions. + rpc ListQaQuestions(ListQaQuestionsRequest) + returns (ListQaQuestionsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/qaScorecards/*/revisions/*}/qaQuestions" + }; + option (google.api.method_signature) = "parent"; + } + + // Create a QaScorecard. + rpc CreateQaScorecard(CreateQaScorecardRequest) returns (QaScorecard) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/qaScorecards" + body: "qa_scorecard" + }; + option (google.api.method_signature) = + "parent,qa_scorecard,qa_scorecard_id"; + } + + // Gets a QaScorecard. + rpc GetQaScorecard(GetQaScorecardRequest) returns (QaScorecard) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/qaScorecards/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a QaScorecard. + rpc UpdateQaScorecard(UpdateQaScorecardRequest) returns (QaScorecard) { + option (google.api.http) = { + patch: "/v1/{qa_scorecard.name=projects/*/locations/*/qaScorecards/*}" + body: "qa_scorecard" + }; + option (google.api.method_signature) = "qa_scorecard,update_mask"; + } + + // Deletes a QaScorecard. + rpc DeleteQaScorecard(DeleteQaScorecardRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/qaScorecards/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists QaScorecards. + rpc ListQaScorecards(ListQaScorecardsRequest) + returns (ListQaScorecardsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/qaScorecards" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a QaScorecardRevision. + rpc CreateQaScorecardRevision(CreateQaScorecardRevisionRequest) + returns (QaScorecardRevision) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/qaScorecards/*}/revisions" + body: "qa_scorecard_revision" + }; + option (google.api.method_signature) = + "parent,qa_scorecard_revision,qa_scorecard_revision_id"; + } + + // Gets a QaScorecardRevision. + rpc GetQaScorecardRevision(GetQaScorecardRevisionRequest) + returns (QaScorecardRevision) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/qaScorecards/*/revisions/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Fine tune one or more QaModels. + rpc TuneQaScorecardRevision(TuneQaScorecardRevisionRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/qaScorecards/*/revisions/*}:tuneQaScorecardRevision" + body: "*" + }; + option (google.api.method_signature) = "parent,filter,validate_only"; + option (google.longrunning.operation_info) = { + response_type: "TuneQaScorecardRevisionResponse" + metadata_type: "TuneQaScorecardRevisionMetadata" + }; + } + + // Deploy a QaScorecardRevision. + rpc DeployQaScorecardRevision(DeployQaScorecardRevisionRequest) + returns (QaScorecardRevision) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/qaScorecards/*/revisions/*}:deploy" + body: "*" + }; + } + + // Undeploy a QaScorecardRevision. + rpc UndeployQaScorecardRevision(UndeployQaScorecardRevisionRequest) + returns (QaScorecardRevision) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/qaScorecards/*/revisions/*}:undeploy" + body: "*" + }; + } + + // Deletes a QaScorecardRevision. + rpc DeleteQaScorecardRevision(DeleteQaScorecardRevisionRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/qaScorecards/*/revisions/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all revisions under the parent QaScorecard. + rpc ListQaScorecardRevisions(ListQaScorecardRevisionsRequest) + returns (ListQaScorecardRevisionsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/qaScorecards/*}/revisions" + }; + option (google.api.method_signature) = "parent"; + } + + // Create feedback label. + rpc CreateFeedbackLabel(CreateFeedbackLabelRequest) returns (FeedbackLabel) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/conversations/*}/feedbackLabels" + body: "feedback_label" + }; + option (google.api.method_signature) = + "parent,feedback_label,feedback_label_id"; + } + + // List feedback labels. + rpc ListFeedbackLabels(ListFeedbackLabelsRequest) + returns (ListFeedbackLabelsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/conversations/*}/feedbackLabels" + }; + option (google.api.method_signature) = "parent"; + } + + // Get feedback label. + rpc GetFeedbackLabel(GetFeedbackLabelRequest) returns (FeedbackLabel) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/conversations/*/feedbackLabels/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Update feedback label. + rpc UpdateFeedbackLabel(UpdateFeedbackLabelRequest) returns (FeedbackLabel) { + option (google.api.http) = { + patch: "/v1/{feedback_label.name=projects/*/locations/*/conversations/*/feedbackLabels/*}" + body: "feedback_label" + }; + option (google.api.method_signature) = "feedback_label,update_mask"; + } + + // Delete feedback label. + rpc DeleteFeedbackLabel(DeleteFeedbackLabelRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/conversations/*/feedbackLabels/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List all feedback labels by project number. + rpc ListAllFeedbackLabels(ListAllFeedbackLabelsRequest) + returns (ListAllFeedbackLabelsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}:listAllFeedbackLabels" + }; + option (google.api.method_signature) = "parent"; + } + + // Upload feedback labels in bulk. + rpc BulkUploadFeedbackLabels(BulkUploadFeedbackLabelsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}:bulkUploadFeedbackLabels" + body: "*" + }; + option (google.api.method_signature) = "parent"; + option (google.longrunning.operation_info) = { + response_type: "BulkUploadFeedbackLabelsResponse" + metadata_type: "BulkUploadFeedbackLabelsMetadata" + }; + } + + // Download feedback labels in bulk. + rpc BulkDownloadFeedbackLabels(BulkDownloadFeedbackLabelsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}:bulkDownloadFeedbackLabels" + body: "*" + }; + option (google.api.method_signature) = "parent"; + option (google.longrunning.operation_info) = { + response_type: "BulkDownloadFeedbackLabelsResponse" + metadata_type: "BulkDownloadFeedbackLabelsMetadata" + }; + } } // Represents the options for viewing a conversation. @@ -819,7 +1117,7 @@ message IngestConversationsRequest { // Optional. Custom keys to extract as conversation labels from metadata // files in `metadata_bucket_uri`. Keys not included in this field will be - // ignored. Note that there is a limit of 20 labels per conversation. + // ignored. Note that there is a limit of 100 labels per conversation. repeated string custom_metadata_keys = 12 [(google.api.field_behavior) = OPTIONAL]; } @@ -1587,6 +1885,90 @@ message UpdateSettingsRequest { [(google.api.field_behavior) = REQUIRED]; } +// The request to create a analysis rule. +// analysis_rule_id will be generated by the server. +message CreateAnalysisRuleRequest { + // Required. The parent resource of the analysis rule. Required. The location + // to create a analysis rule for. Format: `projects//locations/` or `projects//locations/` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The analysis rule resource to create. + AnalysisRule analysis_rule = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request for getting a analysis rule. +message GetAnalysisRuleRequest { + // Required. The name of the AnalysisRule to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/AnalysisRule" + } + ]; +} + +// The request to update a analysis rule. +message UpdateAnalysisRuleRequest { + // Required. The new analysis rule. + AnalysisRule analysis_rule = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The list of fields to be updated. + // If the update_mask is not provided, the update will be applied to all + // fields. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The request to delete a analysis rule. +message DeleteAnalysisRuleRequest { + // Required. The name of the analysis rule to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/AnalysisRule" + } + ]; +} + +// The request to list analysis rules. +message ListAnalysisRulesRequest { + // Required. The parent resource of the analysis rules. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. The maximum number of analysis rule to return in the response. If + // this value is zero, the service will select a default size. A call may + // return fewer objects than requested. A non-empty `next_page_token` in the + // response indicates that more data is available. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The value returned by the last `ListAnalysisRulesResponse`; + // indicates that this is a continuation of a prior `ListAnalysisRules` call + // and the system should return the next page of data. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response of listing views. +message ListAnalysisRulesResponse { + // The analysis_rule that match the request. + repeated AnalysisRule analysis_rules = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + // The request to get location-level encryption specification. message GetEncryptionSpecRequest { // Required. The name of the encryption spec resource to get. @@ -1603,7 +1985,7 @@ message InitializeEncryptionSpecRequest { // Required. The encryption spec used for CMEK encryption. It is required that // the kms key is in the same region as the endpoint. The same key will be // used for all provisioned resources, if encryption is available. If the - // kms_key_name is left empty, no encryption will be enforced. + // `kms_key_name` field is left empty, no encryption will be enforced. EncryptionSpec encryption_spec = 1 [(google.api.field_behavior) = REQUIRED]; } @@ -1624,7 +2006,7 @@ message InitializeEncryptionSpecMetadata { InitializeEncryptionSpecRequest request = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Partial errors during initialising operation that might cause the operation + // Partial errors during initializing operation that might cause the operation // output to be incomplete. repeated google.rpc.Status partial_errors = 4; } @@ -1708,3 +2090,1088 @@ message DeleteViewRequest { } ]; } + +// A dimension determines the grouping key for the query. In SQL terms, these +// would be part of both the "SELECT" and "GROUP BY" clauses. +message Dimension { + // Metadata about the issue dimension. + message IssueDimensionMetadata { + // The issue ID. + string issue_id = 1 [(google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/Issue" + }]; + + // The issue display name. + string issue_display_name = 2; + + // The parent issue model ID. + string issue_model_id = 3 [(google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/IssueModel" + }]; + } + + // Metadata about the agent dimension. + message AgentDimensionMetadata { + // Optional. A user-specified string representing the agent. + string agent_id = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The agent's name + string agent_display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A user-specified string representing the agent's team. + string agent_team = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Metadata about the QA question dimension. + message QaQuestionDimensionMetadata { + // Optional. The QA scorecard ID. + string qa_scorecard_id = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The QA question ID. + string qa_question_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The full body of the question. + string question_body = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Metadata about the QA question-answer dimension. + // This is useful for showing the answer distribution for questions for a + // given scorecard. + message QaQuestionAnswerDimensionMetadata { + // Optional. The QA scorecard ID. + string qa_scorecard_id = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The QA question ID. + string qa_question_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The full body of the question. + string question_body = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The full body of the question. + string answer_value = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // The key of the dimension. + enum DimensionKey { + // The key of the dimension is unspecified. + DIMENSION_KEY_UNSPECIFIED = 0; + + // The dimension is keyed by issues. + ISSUE = 1; + + // The dimension is keyed by agents. + AGENT = 2; + + // The dimension is keyed by agent teams. + AGENT_TEAM = 3; + + // The dimension is keyed by QaQuestionIds. + // Note that: We only group by the QuestionId and not the revision-id of the + // scorecard this question is a part of. This allows for showing stats for + // the same question across different scorecard revisions. + QA_QUESTION_ID = 4; + + // The dimension is keyed by QaQuestionIds-Answer value pairs. + // Note that: We only group by the QuestionId and not the revision-id of the + // scorecard this question is a part of. This allows for showing + // distribution of answers per question across different scorecard + // revisions. + QA_QUESTION_ANSWER_VALUE = 5; + + // The dimension is keyed by the conversation profile ID. + CONVERSATION_PROFILE_ID = 6; + } + + // Output-only metadata about the dimension. + oneof dimension_metadata { + // Output only. Metadata about the issue dimension. + IssueDimensionMetadata issue_dimension_metadata = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Metadata about the agent dimension. + AgentDimensionMetadata agent_dimension_metadata = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Metadata about the QA question dimension. + QaQuestionDimensionMetadata qa_question_dimension_metadata = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Metadata about the QA question-answer dimension. + QaQuestionAnswerDimensionMetadata qa_question_answer_dimension_metadata = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The key of the dimension. + DimensionKey dimension_key = 1; +} + +// The request for querying metrics. +message QueryMetricsRequest { + // A time granularity divides the time line into discrete time periods. + // This is useful for defining buckets over which filtering and aggregation + // should be performed. + enum TimeGranularity { + // The time granularity is unspecified and will default to NONE. + TIME_GRANULARITY_UNSPECIFIED = 0; + + // No time granularity. The response won't contain a time series. + // This is the default value if no time granularity is specified. + NONE = 1; + + // Data points in the time series will aggregate at a daily granularity. + // 1 day means [midnight to midnight). + DAILY = 2; + + // Data points in the time series will aggregate at a daily granularity. + // 1 HOUR means [01:00 to 02:00). + HOURLY = 3; + + // Data points in the time series will aggregate at a daily granularity. + // PER_MINUTE means [01:00 to 01:01). + PER_MINUTE = 4; + + // Data points in the time series will aggregate at a 1 minute granularity. + // PER_5_MINUTES means [01:00 to 01:05). + PER_5_MINUTES = 5; + + // Data points in the time series will aggregate at a monthly granularity. + // 1 MONTH means [01st of the month to 1st of the next month). + MONTHLY = 6; + } + + // Required. The location of the data. + // "projects/{project}/locations/{location}" + string location = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. Filter to select a subset of conversations to compute the + // metrics. Must specify a window of the conversation create time to compute + // the metrics. The returned metrics will be from the range [DATE(starting + // create time), DATE(ending create time)). + // + string filter = 2 [(google.api.field_behavior) = REQUIRED]; + + // The time granularity of each data point in the time series. + // Defaults to NONE if this field is unspecified. + TimeGranularity time_granularity = 3; + + // The dimensions that determine the grouping key for the query. Defaults to + // no dimension if this field is unspecified. If a dimension is specified, + // its key must also be specified. Each dimension's key must be unique. + // + // If a time granularity is also specified, metric values in the dimension + // will be bucketed by this granularity. + // + // Up to one dimension is supported for now. + repeated Dimension dimensions = 4; + + // Measures to return. Defaults to all measures if this field is unspecified. + // A valid mask should traverse from the `measure` field from the response. + // For example, a path from a measure mask to get the conversation count is + // "conversation_measure.count". + google.protobuf.FieldMask measure_mask = 5; +} + +// The response for querying metrics. +message QueryMetricsResponse { + // A slice contains a total and (if the request specified a time granularity) + // a time series of metric values. Each slice contains a unique combination of + // the cardinality of dimensions from the request. + // + // For example, if the request specifies a single ISSUE dimension and it has a + // cardinality of 2 (i.e. the data used to compute the metrics has 2 issues in + // total), the response will have 2 slices: + // + // * Slice 1 -> dimensions=[Issue 1] + // * Slice 2 -> dimensions=[Issue 2] + message Slice { + // A data point contains the metric values mapped to an interval. + message DataPoint { + // The measure related to conversations. + message ConversationMeasure { + // Average QA normalized score for the tag. + message QaTagScore { + // Tag name. + string tag = 1; + + // Average tag normalized score per tag. + double average_tag_normalized_score = 2; + } + + // The conversation count. + optional int32 conversation_count = 1; + + // The average silence percentage. + optional float average_silence_percentage = 2; + + // The average duration. + optional google.protobuf.Duration average_duration = 3; + + // The average turn count. + optional float average_turn_count = 4; + + // The average agent's sentiment score. + optional float average_agent_sentiment_score = 5; + + // The average client's sentiment score. + optional float average_client_sentiment_score = 6; + + // The average customer satisfaction rating. + optional double average_customer_satisfaction_rating = 8; + + // Average QA normalized score. + // Will exclude 0's in average calculation. + optional double average_qa_normalized_score = 7; + + // Average QA normalized score for all the tags. + repeated QaTagScore qa_tag_scores = 9; + + // Average QA normalized score averaged for questions averaged across + // all revisions of the parent scorecard. + // Will be only populated if the request specifies a dimension of + // QA_QUESTION_ID. + optional double average_qa_question_normalized_score = 10; + } + + // The measure included in this data point. + oneof measure { + // The measure related to conversations. + ConversationMeasure conversation_measure = 2; + } + + // The interval that this data point represents. + // + // * If this is the total data point, the interval is + // [starting create time, ending create time) from the request. + // * If this a data point from the time series, the interval is + // [time, time + time granularity from the request). + google.type.Interval interval = 1; + } + + // A time series of metric values. + message TimeSeries { + // The data points that make up the time series . + repeated DataPoint data_points = 4; + } + + // A unique combination of dimensions that this slice represents. + repeated Dimension dimensions = 1; + + // The total metric value. The interval of this data point is + // [starting create time, ending create time) from the request. + DataPoint total = 2; + + // A time series of metric values. This is only populated if the request + // specifies a time granularity other than NONE. + TimeSeries time_series = 3; + } + + // Required. The location of the data. + // "projects/{project}/locations/{location}" + string location = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The metrics last update time. + google.protobuf.Timestamp update_time = 3; + + // A slice contains a total and (if the request specified a time granularity) + // a time series of metric values. Each slice contains a unique combination of + // the cardinality of dimensions from the request. + repeated Slice slices = 2; + + // The macro average slice contains aggregated averages across the selected + // dimension. i.e. if group_by agent is specified this field will contain the + // average across all agents. + // This field is only populated if the request specifies a Dimension. + optional Slice macro_average_slice = 4; +} + +// The metadata from querying metrics. +message QueryMetricsMetadata {} + +// The request for creating a QaQuestion. +message CreateQaQuestionRequest { + // Required. The parent resource of the QaQuestion. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/QaScorecardRevision" + } + ]; + + // Required. The QaQuestion to create. + QaQuestion qa_question = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A unique ID for the new question. This ID will become the final + // component of the question's resource name. If no ID is specified, a + // server-generated ID will be used. + // + // This value should be 4-64 characters and must match the regular + // expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-`. + string qa_question_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request for a QaQuestion. +message GetQaQuestionRequest { + // Required. The name of the QaQuestion to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/QaQuestion" + } + ]; +} + +// Request to list QaQuestions. +message ListQaQuestionsRequest { + // Required. The parent resource of the questions. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/QaScorecardRevision" + } + ]; + + // Optional. The maximum number of questions to return in the response. If the + // value is zero, the service will select a default size. A call might return + // fewer objects than requested. A non-empty `next_page_token` in the response + // indicates that more data is available. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The value returned by the last `ListQaQuestionsResponse`. This + // value indicates that this is a continuation of a prior `ListQaQuestions` + // call and that the system should return the next page of data. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response from a ListQaQuestions request. +message ListQaQuestionsResponse { + // The QaQuestions under the parent. + repeated QaQuestion qa_questions = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// The request for updating a QaQuestion. +message UpdateQaQuestionRequest { + // Required. The QaQuestion to update. + QaQuestion qa_question = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to be updated. All possible fields can be + // updated by passing `*`, or a subset of the following updateable fields can + // be provided: + // + // * `abbreviation` + // * `answer_choices` + // * `answer_instructions` + // * `order` + // * `question_body` + // * `tags` + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// The request for deleting a QaQuestion. +message DeleteQaQuestionRequest { + // Required. The name of the QaQuestion to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/QaQuestion" + } + ]; +} + +// The request for creating a QaScorecard. +message CreateQaScorecardRequest { + // Required. The parent resource of the QaScorecard. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The QaScorecard to create. + QaScorecard qa_scorecard = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A unique ID for the new QaScorecard. This ID will become the + // final component of the QaScorecard's resource name. If no ID is specified, + // a server-generated ID will be used. + // + // This value should be 4-64 characters and must match the regular + // expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-`. + string qa_scorecard_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request for a QaScorecard. By default, returns the latest revision. +message GetQaScorecardRequest { + // Required. The name of the QaScorecard to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/QaScorecard" + } + ]; +} + +// The request for updating a QaScorecard. +message UpdateQaScorecardRequest { + // Required. The QaScorecard to update. + QaScorecard qa_scorecard = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to be updated. All possible fields can be + // updated by passing `*`, or a subset of the following updateable fields can + // be provided: + // + // * `description` + // * `display_name` + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// The request for deleting a QaScorecard. +message DeleteQaScorecardRequest { + // Required. The name of the QaScorecard to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/QaScorecard" + } + ]; + + // Optional. If set to true, all of this QaScorecard's child resources will + // also be deleted. Otherwise, the request will only succeed if it has none. + bool force = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request for creating a QaScorecardRevision. +message CreateQaScorecardRevisionRequest { + // Required. The parent resource of the QaScorecardRevision. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/QaScorecard" + } + ]; + + // Required. The QaScorecardRevision to create. + QaScorecardRevision qa_scorecard_revision = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. A unique ID for the new QaScorecardRevision. This ID will become + // the final component of the QaScorecardRevision's resource name. If no ID is + // specified, a server-generated ID will be used. + // + // This value should be 4-64 characters and must match the regular + // expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-`. + string qa_scorecard_revision_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request for a QaScorecardRevision. +message GetQaScorecardRevisionRequest { + // Required. The name of the QaScorecardRevision to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/QaScorecardRevision" + } + ]; +} + +// Request for TuneQaScorecardRevision endpoint. +message TuneQaScorecardRevisionRequest { + // Required. The parent resource for new fine tuning job instance. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/QaScorecardRevision" + } + ]; + + // Required. Filter for selecting the feedback labels that needs to be + // used for training. + // This filter can be used to limit the feedback labels used for tuning to a + // feedback labels created or updated for a specific time-window etc. + string filter = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Run in validate only mode, no fine tuning will actually run. + // Data quality validations like training data distributions will run. + // Even when set to false, the data quality validations will still run but + // once the validations complete we will proceed with the fine tune, if + // applicable. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response for TuneQaScorecardRevision endpoint. +message TuneQaScorecardRevisionResponse {} + +// Metadata for TuneQaScorecardRevision endpoint. +message TuneQaScorecardRevisionMetadata { + // Contains validation results for a question in the tuning request. + message QaQuestionDatasetValidationResult { + // Output only. The resource path of the question whose dataset was + // evaluated for tuning. + string question = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/QaQuestion" + } + ]; + + // A list of any applicable data validation warnings about the question's + // feedback labels. + repeated DatasetValidationWarning dataset_validation_warnings = 2; + + // The number of valid feedback labels in the question's dataset. + int32 valid_feedback_labels_count = 3; + } + + // Contains performance metrics for each QaQuestion in the + // TuneScorecardRevision request. + message QaQuestionDatasetTuningMetrics { + // Performance metrics for the question's dataset calculated over the tuned + // model. + message Metrics { + // Accuracy of the question's dataset. + double accuracy = 1; + } + + // Output only. The resource path of the question whose dataset was + // evaluated for tuning. + string question = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/QaQuestion" + } + ]; + + // Output only. The metrics for the question's dataset. + Metrics metrics = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The original request. + TuneQaScorecardRevisionRequest request = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The results of data validation per question in the request. + repeated QaQuestionDatasetValidationResult + qa_question_dataset_validation_results = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The metrics for each QaQuestion in the TuneScorecardRevision + // request. + repeated QaQuestionDatasetTuningMetrics qa_question_dataset_tuning_metrics = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The percentage of the tuning job that has completed. Always + // between 0 and 1 where 0 indicates the job has not started i.e. 0% and 1 + // indicates the job has completed i.e. 100%. + double tuning_completion_ratio = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request to deploy a QaScorecardRevision +message DeployQaScorecardRevisionRequest { + // Required. The name of the QaScorecardRevision to deploy. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/QaScorecardRevision" + } + ]; +} + +// The request to undeploy a QaScorecardRevision +message UndeployQaScorecardRevisionRequest { + // Required. The name of the QaScorecardRevision to undeploy. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/QaScorecardRevision" + } + ]; +} + +// The request to delete a QaScorecardRevision. +message DeleteQaScorecardRevisionRequest { + // Required. The name of the QaScorecardRevision to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/QaScorecardRevision" + } + ]; + + // Optional. If set to true, all of this QaScorecardRevision's child resources + // will also be deleted. Otherwise, the request will only succeed if it has + // none. + bool force = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request to list QaScorecards. +message ListQaScorecardsRequest { + // Required. The parent resource of the scorecards. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. The maximum number of scorecards to return in the response. If + // the value is zero, the service will select a default size. A call might + // return fewer objects than requested. A non-empty `next_page_token` in the + // response indicates that more data is available. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The value returned by the last `ListQaScorecardsResponse`. This + // value indicates that this is a continuation of a prior `ListQaScorecards` + // call and that the system should return the next page of data. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response from a ListQaScorecards request. +message ListQaScorecardsResponse { + // The QaScorecards under the parent. + repeated QaScorecard qa_scorecards = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request to list QaScorecardRevisions +message ListQaScorecardRevisionsRequest { + // Required. The parent resource of the scorecard revisions. To list all + // revisions of all scorecards, substitute the QaScorecard ID with a '-' + // character. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/QaScorecard" + } + ]; + + // Optional. The maximum number of scorecard revisions to return in the + // response. If the value is zero, the service will select a default size. A + // call might return fewer objects than requested. A non-empty + // `next_page_token` in the response indicates that more data is available. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The value returned by the last + // `ListQaScorecardRevisionsResponse`. This value indicates that this is a + // continuation of a prior `ListQaScorecardRevisions` call and that the system + // should return the next page of data. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A filter to reduce results to a specific subset. Useful for + // querying scorecard revisions with specific properties. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response from a ListQaScorecardRevisions request. +message ListQaScorecardRevisionsResponse { + // The QaScorecards under the parent. + repeated QaScorecardRevision qa_scorecard_revisions = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// The request for creating a feedback label. +message CreateFeedbackLabelRequest { + // Required. The parent resource of the feedback label. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/Conversation" + } + ]; + + // Optional. The ID of the feedback label to create. + // If one is not specified it will be generated by the server. + string feedback_label_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The feedback label to create. + FeedbackLabel feedback_label = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The request for listing feedback labels. +message ListFeedbackLabelsRequest { + // Required. The parent resource of the feedback labels. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/Conversation" + } + ]; + + // Optional. A filter to reduce results to a specific subset. Supports + // disjunctions (OR) and conjunctions (AND). Automatically sorts by + // conversation ID. To sort by all feedback labels in a project see + // ListAllFeedbackLabels. + // + // Supported fields: + // + // * `issue_model_id` + // * `qa_question_id` + // * `qa_scorecard_id` + // * `min_create_time` + // * `max_create_time` + // * `min_update_time` + // * `max_update_time` + // * `feedback_label_type`: QUALITY_AI, TOPIC_MODELING + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum number of feedback labels to return in the response. + // A valid page size ranges from 0 to 100,000 inclusive. If the page size is + // zero or unspecified, a default page size of 100 will be chosen. Note that a + // call might return fewer results than the requested page size. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The value returned by the last `ListFeedbackLabelsResponse`. This + // value indicates that this is a continuation of a prior `ListFeedbackLabels` + // call and that the system should return the next page of data. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response for listing feedback labels. +message ListFeedbackLabelsResponse { + // The feedback labels that match the request. + repeated FeedbackLabel feedback_labels = 1; + + // The next page token. + string next_page_token = 2; +} + +// The request for getting a feedback label. +message GetFeedbackLabelRequest { + // Required. The name of the feedback label to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/FeedbackLabel" + } + ]; +} + +// The request for updating a feedback label. +message UpdateFeedbackLabelRequest { + // Required. The feedback label to update. + FeedbackLabel feedback_label = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to be updated. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// The request for deleting a feedback label. +message DeleteFeedbackLabelRequest { + // Required. The name of the feedback label to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/FeedbackLabel" + } + ]; +} + +// The request for listing all feedback labels. +message ListAllFeedbackLabelsRequest { + // Required. The parent resource of all feedback labels per project. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. The maximum number of feedback labels to return in the response. + // A valid page size ranges from 0 to 100,000 inclusive. If the page size is + // zero or unspecified, a default page size of 100 will be chosen. Note that a + // call might return fewer results than the requested page size. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The value returned by the last `ListAllFeedbackLabelsResponse`. + // This value indicates that this is a continuation of a prior + // `ListAllFeedbackLabels` call and that the system should return the next + // page of data. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A filter to reduce results to a specific subset in the entire + // project. Supports disjunctions (OR) and conjunctions (AND). + // + // Supported fields: + // + // * `issue_model_id` + // * `qa_question_id` + // * `min_create_time` + // * `max_create_time` + // * `min_update_time` + // * `max_update_time` + // * `feedback_label_type`: QUALITY_AI, TOPIC_MODELING + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response for listing all feedback labels. +message ListAllFeedbackLabelsResponse { + // The feedback labels that match the request. + repeated FeedbackLabel feedback_labels = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// The request for bulk uploading feedback labels. +message BulkUploadFeedbackLabelsRequest { + // Google Cloud Storage Object details to get the feedback label file from. + message GcsSource { + // All permissible file formats. + enum Format { + // Unspecified format. + FORMAT_UNSPECIFIED = 0; + + // CSV format. + CSV = 1; + + // JSON format. + JSON = 2; + } + + // Required. File format which will be ingested. + Format format = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Google Cloud Storage URI of the file to import. + // Format: `gs://bucket_name/object_name` + string object_uri = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Configuration for an external data store containing objects that will + // be converted to FeedbackLabels. + oneof source { + // A cloud storage bucket source. + GcsSource gcs_source = 2; + } + + // Required. The parent resource for new feedback labels. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. If set, upload will not happen and the labels will be validated. + // If not set, then default behavior will be to upload the labels after + // validation is complete. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response for the Bulk Upload Feedback Labels API. +message BulkUploadFeedbackLabelsResponse {} + +// Metadata for the Bulk Upload Feedback Labels API. +message BulkUploadFeedbackLabelsMetadata { + // Statistics for BulkUploadFeedbackLabels operation. + message UploadStats { + // The number of objects processed during the upload operation. + int32 processed_object_count = 1; + + // The number of objects skipped because of failed validation + int32 failed_validation_count = 2; + + // The number of new feedback labels added during this ingest operation. + int32 successful_upload_count = 3; + } + + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The original request for ingest. + BulkUploadFeedbackLabelsRequest request = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Partial errors during ingest operation that might cause the operation + // output to be incomplete. + repeated google.rpc.Status partial_errors = 4; + + // Output only. Statistics for BulkUploadFeedbackLabels operation. + UploadStats upload_stats = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request for the BulkDownloadFeedbackLabel endpoint. +message BulkDownloadFeedbackLabelsRequest { + // Google Cloud Storage Object details to write the feedback labels to. + message GcsDestination { + // All permissible file formats. + // See `records_per_file_count` to override the default number of records + // per file. + enum Format { + // Unspecified format. + FORMAT_UNSPECIFIED = 0; + + // CSV format. + // 1,000 labels are stored per CSV file by default. + CSV = 1; + + // JSON format. + // 1 label stored per JSON file by default. + JSON = 2; + } + + // Required. File format in which the labels will be exported. + Format format = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Google Cloud Storage URI to write the feedback labels to. + // The file name will be used as a prefix for the files written to the + // bucket if the output needs to be split across multiple files, otherwise + // it will be used as is. The file extension will be appended to the file + // name based on the format selected. + // E.g. `gs://bucket_name/object_uri_prefix` + string object_uri = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Add whitespace to the JSON file. Makes easier to read, but + // increases file size. Only applicable for JSON format. + bool add_whitespace = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Always print fields with no presence. + // This is useful for printing fields that are not set, like implicit 0 + // value or empty lists/maps. Only applicable for JSON format. + bool always_print_empty_fields = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of records per file. Applicable for either format. + int64 records_per_file_count = 5 [(google.api.field_behavior) = OPTIONAL]; + } + + // Possible feedback label types that will be downloaded. + enum FeedbackLabelType { + // Unspecified format + FEEDBACK_LABEL_TYPE_UNSPECIFIED = 0; + + // Downloaded file will contain all Quality AI labels from the latest + // scorecard revision. + QUALITY_AI = 1; + + // Downloaded file will contain only Topic Modeling labels. + TOPIC_MODELING = 2; + } + + // Configuration for an external data store to which the feedback labels + // will be written to. + oneof destination { + // A cloud storage bucket destination. + GcsDestination gcs_destination = 3; + } + + // Required. The parent resource for new feedback labels. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. A filter to reduce results to a specific subset. Supports + // disjunctions (OR) and conjunctions (AND). + // + // Supported fields: + // + // * `issue_model_id` + // * `qa_question_id` + // * `qa_scorecard_id` + // * `min_create_time` + // * `max_create_time` + // * `min_update_time` + // * `max_update_time` + // * `feedback_label_type`: QUALITY_AI, TOPIC_MODELING + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Limits the maximum number of feedback labels that will be + // downloaded. The first `N` feedback labels will be downloaded. + int32 max_download_count = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The type of feedback labels that will be downloaded. + FeedbackLabelType feedback_label_type = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter parent conversations to download feedback labels for. + // When specified, the feedback labels will be downloaded for the + // conversations that match the filter. + // If `template_qa_scorecard_id` is set, all the conversations that match the + // filter will be paired with the questions under the scorecard for labeling. + string conversation_filter = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, a template for labeling conversations and scorecard + // questions will be created from the conversation_filter and the questions + // under the scorecard(s). The feedback label `filter` will be ignored. + repeated string template_qa_scorecard_id = 7 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Response for the BulkDownloadFeedbackLabel endpoint. +message BulkDownloadFeedbackLabelsResponse {} + +// Metadata for the BulkDownloadFeedbackLabel endpoint. +message BulkDownloadFeedbackLabelsMetadata { + // Statistics for BulkDownloadFeedbackLabels operation. + message DownloadStats { + // The number of objects processed during the download operation. + int32 processed_object_count = 1; + + // The number of new feedback labels downloaded during this operation. + // Different from "processed" because some labels might not be downloaded + // because an error. + int32 successful_download_count = 2; + + // Total number of files written to the provided Cloud Storage bucket. + int32 total_files_written = 3; + + // Output only. Full name of the files written to Cloud storage. + repeated string file_names = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The original request for download. + BulkDownloadFeedbackLabelsRequest request = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Partial errors during ingest operation that might cause the operation + // output to be incomplete. + repeated google.rpc.Status partial_errors = 4; + + // Output only. Statistics for BulkDownloadFeedbackLabels operation. + DownloadStats download_stats = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/resources.proto b/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/resources.proto index d93ee3f2633..903f83efa90 100644 --- a/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/resources.proto +++ b/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/resources.proto @@ -42,11 +42,35 @@ option (google.api.resource_definition) = { pattern: "projects/{project}/locations/{location}/recognizers/{recognizer}" }; +// Enum for the different types of issues a tuning dataset can have. +// These warnings are currentlyraised when trying to validate a dataset for +// tuning a scorecard. +enum DatasetValidationWarning { + // Unspecified data validation warning. + DATASET_VALIDATION_WARNING_UNSPECIFIED = 0; + + // A non-trivial percentage of the feedback labels are invalid. + TOO_MANY_INVALID_FEEDBACK_LABELS = 1; + + // The quantity of valid feedback labels provided is less than the + // recommended minimum. + INSUFFICIENT_FEEDBACK_LABELS = 2; + + // One or more of the answers have less than the recommended minimum of + // feedback labels. + INSUFFICIENT_FEEDBACK_LABELS_PER_ANSWER = 3; + + // All the labels in the dataset come from a single answer choice. + ALL_FEEDBACK_LABELS_HAVE_THE_SAME_ANSWER = 4; +} + // The conversation resource. message Conversation { option (google.api.resource) = { type: "contactcenterinsights.googleapis.com/Conversation" pattern: "projects/{project}/locations/{location}/conversations/{conversation}" + plural: "conversations" + singular: "conversation" }; // Call-specific metadata. @@ -215,16 +239,16 @@ message Conversation { // the conversation. string agent_id = 5; - // A map for the user to specify any custom fields. A maximum of 20 labels per - // conversation is allowed, with a maximum of 256 characters per entry. + // A map for the user to specify any custom fields. A maximum of 100 labels + // per conversation is allowed, with a maximum of 256 characters per entry. map labels = 6; // Conversation metadata related to quality management. QualityMetadata quality_metadata = 24; - // Input only. JSON Metadata encoded as a string. + // Input only. JSON metadata encoded as a string. // This field is primarily used by Insights integrations with various telphony - // systems and must be in one of Insights' supported formats. + // systems and must be in one of Insight's supported formats. string metadata_json = 25 [(google.api.field_behavior) = INPUT_ONLY]; // Output only. The conversation transcript. @@ -268,6 +292,8 @@ message Analysis { option (google.api.resource) = { type: "contactcenterinsights.googleapis.com/Analysis" pattern: "projects/{project}/locations/{location}/conversations/{conversation}/analyses/{analysis}" + plural: "analyses" + singular: "analysis" }; // Immutable. The resource name of the analysis. @@ -354,6 +380,9 @@ message AnalysisResult { // Overall conversation-level issue modeling result. IssueModelResult issue_model_result = 8; + + // Results of scoring QaScorecards. + repeated QaScorecardResult qa_scorecard_results = 10; } // Metadata discovered during analysis. @@ -378,6 +407,41 @@ message IssueModelResult { repeated IssueAssignment issues = 2; } +// Represents a conversation, resource, and label provided by the user. +message FeedbackLabel { + option (google.api.resource) = { + type: "contactcenterinsights.googleapis.com/FeedbackLabel" + pattern: "projects/{project}/locations/{location}/conversations/{conversation}/feedbackLabels/{feedback_label}" + plural: "feedbackLabels" + singular: "feedbackLabel" + }; + + // Label type. + oneof label_type { + // String label. + string label = 4; + + // QaAnswer label. + QaAnswer.AnswerValue qa_answer_label = 7; + } + + // Immutable. Resource name of the FeedbackLabel. + // Format: + // projects/{project}/locations/{location}/conversations/{conversation}/feedbackLabels/{feedback_label} + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Resource name of the resource to be labeled. + string labeled_resource = 3; + + // Output only. Create time of the label. + google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Update time of the label. + google.protobuf.Timestamp update_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + // One channel of conversation-level sentiment data. message ConversationLevelSentiment { // The channel of the audio that the data applies to. @@ -1024,8 +1088,58 @@ message Settings { SpeechConfig speech_config = 11 [(google.api.field_behavior) = OPTIONAL]; } +// The CCAI Insights project wide analysis rule. This rule will be applied to +// all conversations that match the filter defined in the rule. For a +// conversation matches the filter, the annotators specified in the rule will be +// run. If a conversation matches multiple rules, a union of all the annotators +// will be run. One project can have multiple analysis rules. +message AnalysisRule { + option (google.api.resource) = { + type: "contactcenterinsights.googleapis.com/AnalysisRule" + pattern: "projects/{project}/locations/{location}/analysisRules/{analysis_rule}" + plural: "analysisRules" + singular: "analysisRule" + }; + + // Identifier. The resource name of the analysis rule. + // Format: + // projects/{project}/locations/{location}/analysisRules/{analysis_rule} + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The time at which this analysis rule was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The most recent time at which this analysis rule was updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Display Name of the analysis rule. + optional string display_name = 4; + + // Filter for the conversations that should apply this analysis + // rule. An empty filter means this analysis rule applies to all + // conversations. + string conversation_filter = 5; + + // Selector of annotators to run and the phrase matchers to use for + // conversations that matches the conversation_filter. If not specified, NO + // annotators will be run. + AnnotatorSelector annotator_selector = 6; + + // Percentage of conversations that we should apply this analysis setting + // automatically, between [0, 1]. For example, 0.1 means 10%. Conversations + // are sampled in a determenestic way. The original runtime_percentage & + // upload percentage will be replaced by defining filters on the conversation. + double analysis_percentage = 7; + + // If true, apply this rule to conversations. Otherwise, this rule is + // inactive and saved as a draft. + bool active = 8; +} + // A customer-managed encryption key specification that can be applied to all -// created resources (e.g. Conversation). +// created resources (e.g. `Conversation`). message EncryptionSpec { option (google.api.resource) = { type: "contactcenterinsights.googleapis.com/EncryptionSpec" @@ -1039,8 +1153,8 @@ message EncryptionSpec { // Required. The name of customer-managed encryption key that is used to // secure a resource and its sub-resources. If empty, the resource is secured - // by the default Google encryption key. Only the key in the same location as - // this resource is allowed to be used for encryption. Format: + // by our default encryption key. Only the key in the same location as this + // resource is allowed to be used for encryption. Format: // `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{key}` string kms_key = 2 [(google.api.field_behavior) = REQUIRED]; } @@ -1415,6 +1529,24 @@ message AnnotatorSelector { } } + // Configuration for the QA feature. + message QaConfig { + // Container for a list of scorecards. + message ScorecardList { + // List of QaScorecardRevisions. + repeated string qa_scorecard_revisions = 1 + [(google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/QaScorecardRevision" + }]; + } + + // Which scorecards should be scored. + oneof scorecard_source { + // A manual list of scorecards to score. + ScorecardList scorecard_list = 1; + } + } + // Whether to run the interruption annotator. bool run_interruption_annotator = 1; @@ -1460,4 +1592,394 @@ message AnnotatorSelector { // Configuration for the summarization annotator. SummarizationConfig summarization_config = 11; + + // Whether to run the QA annotator. + bool run_qa_annotator = 12; + + // Configuration for the QA annotator. + QaConfig qa_config = 13; +} + +// A single question to be scored by the Insights QA feature. +message QaQuestion { + option (google.api.resource) = { + type: "contactcenterinsights.googleapis.com/QaQuestion" + pattern: "projects/{project}/locations/{location}/qaScorecards/{qa_scorecard}/revisions/{revision}/qaQuestions/{qa_question}" + plural: "qaQuestions" + singular: "qaQuestion" + }; + + // Message representing a possible answer to the question. + message AnswerChoice { + // The answer value may be one of a few different types. + oneof value { + // String value. + string str_value = 2; + + // Numerical value. + double num_value = 3; + + // Boolean value. + bool bool_value = 4; + + // A value of "Not Applicable (N/A)". If provided, this field may only + // be set to `true`. If a question receives this answer, it will be + // excluded from any score calculations. + bool na_value = 5; + } + + // A short string used as an identifier. + string key = 1; + + // Numerical score of the answer, used for generating the overall score of + // a QaScorecardResult. If the answer uses na_value, this field is unused. + optional double score = 6; + } + + // A wrapper representing metrics calculated against a test-set on a LLM that + // was fine tuned for this question. + message Metrics { + // Output only. Accuracy of the model. Measures the percentage of correct + // answers the model gave on the test set. + double accuracy = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Metadata about the tuning operation for the question. Will only be set if a + // scorecard containing this question has been tuned. + message TuningMetadata { + // Total number of valid labels provided for the question at the time of + // tuining. + int64 total_valid_label_count = 1; + + // A list of any applicable data validation warnings about the question's + // feedback labels. + repeated DatasetValidationWarning dataset_validation_warnings = 2; + + // Error status of the tuning operation for the question. Will only be set + // if the tuning operation failed. + string tuning_error = 3; + } + + // Identifier. The resource name of the question. + // Format: + // projects/{project}/locations/{location}/qaScorecards/{qa_scorecard}/revisions/{revision}/qaQuestions/{qa_question} + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Short, descriptive string, used in the UI where it's not practical + // to display the full question body. E.g., "Greeting". + string abbreviation = 2; + + // Output only. The time at which this question was created. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The most recent time at which the question was updated. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Question text. E.g., "Did the agent greet the customer?" + string question_body = 5; + + // Instructions describing how to determine the answer. + string answer_instructions = 9; + + // A list of valid answers to the question, which the LLM must choose from. + repeated AnswerChoice answer_choices = 6; + + // User-defined list of arbitrary tags for the question. Used for + // grouping/organization and for weighting the score of each question. + repeated string tags = 7; + + // Defines the order of the question within its parent scorecard revision. + int32 order = 8; + + // Metrics of the underlying tuned LLM over a holdout/test set while fine + // tuning the underlying LLM for the given question. This field will only be + // populated if and only if the question is part of a scorecard revision that + // has been tuned. + Metrics metrics = 10; + + // Metadata about the tuning operation for the question.This field will only + // be populated if and only if the question is part of a scorecard revision + // that has been tuned. + TuningMetadata tuning_metadata = 11; +} + +// A QaScorecard represents a collection of questions to be scored during +// analysis. +message QaScorecard { + option (google.api.resource) = { + type: "contactcenterinsights.googleapis.com/QaScorecard" + pattern: "projects/{project}/locations/{location}/qaScorecards/{qa_scorecard}" + plural: "qaScorecards" + singular: "qaScorecard" + }; + + // Identifier. The scorecard name. + // Format: + // projects/{project}/locations/{location}/qaScorecards/{qa_scorecard} + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // The user-specified display name of the scorecard. + string display_name = 7; + + // A text description explaining the intent of the scorecard. + string description = 2; + + // Output only. The time at which this scorecard was created. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The most recent time at which the scorecard was updated. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A revision of a QaScorecard. +// +// Modifying published scorecard fields would invalidate existing scorecard +// results — the questions may have changed, or the score weighting will make +// existing scores impossible to understand. So changes must create a new +// revision, rather than modifying the existing resource. +message QaScorecardRevision { + option (google.api.resource) = { + type: "contactcenterinsights.googleapis.com/QaScorecardRevision" + pattern: "projects/{project}/locations/{location}/qaScorecards/{qa_scorecard}/revisions/{revision}" + plural: "qaScorecardRevisions" + singular: "qaScorecardRevision" + }; + + // Enum representing the set of states a scorecard revision may be in. + enum State { + // Unspecified. + STATE_UNSPECIFIED = 0; + + // The scorecard revision can be edited. + EDITABLE = 12; + + // Scorecard model training is in progress. + TRAINING = 2; + + // Scorecard revision model training failed. + TRAINING_FAILED = 9; + + // The revision can be used in analysis. + READY = 11; + + // Scorecard is being deleted. + DELETING = 7; + + // Scorecard model training was explicitly cancelled by the user. + TRAINING_CANCELLED = 14; + } + + // Identifier. The name of the scorecard revision. + // Format: + // projects/{project}/locations/{location}/qaScorecards/{qa_scorecard}/revisions/{revision} + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // The snapshot of the scorecard at the time of this revision's creation. + QaScorecard snapshot = 2; + + // Output only. The timestamp that the revision was created. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Alternative IDs for this revision of the scorecard, e.g., + // `latest`. + repeated string alternate_ids = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. State of the scorecard revision, indicating whether it's ready + // to be used in analysis. + State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// An answer to a QaQuestion. +message QaAnswer { + // Message for holding the value of a + // [QaAnswer][google.cloud.contactcenterinsights.v1.QaAnswer]. + // [QaQuestion.AnswerChoice][google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice] + // defines the possible answer values for a question. + message AnswerValue { + // The answer value may be one of a few different types. + oneof value { + // String value. + string str_value = 2; + + // Numerical value. + double num_value = 3; + + // Boolean value. + bool bool_value = 4; + + // A value of "Not Applicable (N/A)". Should only ever be `true`. + bool na_value = 5; + } + + // A short string used as an identifier. Matches the value used in + // QaQuestion.AnswerChoice.key. + string key = 1; + + // Output only. Numerical score of the answer. + optional double score = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The maximum potential score of the question. + optional double potential_score = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Normalized score of the questions. Calculated as score / + // potential_score. + optional double normalized_score = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // A question may have multiple answers from varying sources, one of which + // becomes the "main" answer above. AnswerSource represents each individual + // answer. + message AnswerSource { + // What created the answer. + enum SourceType { + // Source type is unspecified. + SOURCE_TYPE_UNSPECIFIED = 0; + + // Answer was system-generated; created during an Insights analysis. + SYSTEM_GENERATED = 1; + + // Answer was created by a human via manual edit. + MANUAL_EDIT = 2; + } + + // What created the answer. + SourceType source_type = 1; + + // The answer value from this source. + AnswerValue answer_value = 2; + } + + // The QaQuestion answered by this answer. + string qa_question = 7 [(google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/QaQuestion" + }]; + + // The conversation the answer applies to. + string conversation = 2 [(google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/Conversation" + }]; + + // Question text. E.g., "Did the agent greet the customer?" + string question_body = 6; + + // The main answer value, incorporating any manual edits if they exist. + AnswerValue answer_value = 3; + + // User-defined list of arbitrary tags. Matches the value from + // QaScorecard.ScorecardQuestion.tags. Used for grouping/organization and + // for weighting the score of each answer. + repeated string tags = 5; + + // List of all individual answers given to the question. + repeated AnswerSource answer_sources = 8; +} + +// The results of scoring a single conversation against a QaScorecard. Contains +// a collection of QaAnswers and aggregate score. +message QaScorecardResult { + option (google.api.resource) = { + type: "contactcenterinsights.googleapis.com/QaScorecardResult" + pattern: "projects/{project}/locations/{location}/qaScorecardResults/{qa_scorecard_result}" + plural: "qaScorecardResults" + singular: "qaScorecardResult" + }; + + // Tags and their corresponding results. + message QaTagResult { + // The tag the score applies to. + string tag = 1; + + // The score the tag applies to. + optional double score = 2; + + // The potential score the tag applies to. + optional double potential_score = 3; + + // The normalized score the tag applies to. + optional double normalized_score = 4; + } + + // A scorecard result may have multiple sets of scores from varying sources, + // one of which becomes the "main" answer above. A ScoreSource represents + // each individual set of scores. + message ScoreSource { + // What created the score. + enum SourceType { + // Source type is unspecified. + SOURCE_TYPE_UNSPECIFIED = 0; + + // Score is derived only from system-generated answers. + SYSTEM_GENERATED_ONLY = 1; + + // Score is derived from both system-generated answers, and includes + // any manual edits if they exist. + INCLUDES_MANUAL_EDITS = 2; + } + + // What created the score. + SourceType source_type = 1; + + // The overall numerical score of the result. + optional double score = 2; + + // The maximum potential overall score of the scorecard. Any questions + // answered using `na_value` are excluded from this calculation. + optional double potential_score = 3; + + // The normalized score, which is the score divided by the potential score. + optional double normalized_score = 4; + + // Collection of tags and their scores. + repeated QaTagResult qa_tag_results = 5; + } + + // Identifier. The name of the scorecard result. + // Format: + // projects/{project}/locations/{location}/qaScorecardResults/{qa_scorecard_result} + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // The QaScorecardRevision scored by this result. + string qa_scorecard_revision = 2 [(google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/QaScorecardRevision" + }]; + + // The conversation scored by this result. + string conversation = 3 [(google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/Conversation" + }]; + + // Output only. The timestamp that the revision was created. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // ID of the agent that handled the conversation. + string agent_id = 5; + + // Set of QaAnswers represented in the result. + repeated QaAnswer qa_answers = 6; + + // The overall numerical score of the result, incorporating any manual edits + // if they exist. + optional double score = 7; + + // The maximum potential overall score of the scorecard. Any questions + // answered using `na_value` are excluded from this calculation. + optional double potential_score = 8; + + // The normalized score, which is the score divided by the potential score. + // Any manual edits are included if they exist. + optional double normalized_score = 9; + + // Collection of tags and their scores. + repeated QaTagResult qa_tag_results = 10; + + // List of all individual score sets. + repeated ScoreSource score_sources = 11; } diff --git a/packages/google-cloud-contactcenterinsights/protos/protos.d.ts b/packages/google-cloud-contactcenterinsights/protos/protos.d.ts index 36805388d20..c4df76611a8 100644 --- a/packages/google-cloud-contactcenterinsights/protos/protos.d.ts +++ b/packages/google-cloud-contactcenterinsights/protos/protos.d.ts @@ -550,6 +550,76 @@ export namespace google { */ public updateSettings(request: google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest): Promise; + /** + * Calls CreateAnalysisRule. + * @param request CreateAnalysisRuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AnalysisRule + */ + public createAnalysisRule(request: google.cloud.contactcenterinsights.v1.ICreateAnalysisRuleRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateAnalysisRuleCallback): void; + + /** + * Calls CreateAnalysisRule. + * @param request CreateAnalysisRuleRequest message or plain object + * @returns Promise + */ + public createAnalysisRule(request: google.cloud.contactcenterinsights.v1.ICreateAnalysisRuleRequest): Promise; + + /** + * Calls GetAnalysisRule. + * @param request GetAnalysisRuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AnalysisRule + */ + public getAnalysisRule(request: google.cloud.contactcenterinsights.v1.IGetAnalysisRuleRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetAnalysisRuleCallback): void; + + /** + * Calls GetAnalysisRule. + * @param request GetAnalysisRuleRequest message or plain object + * @returns Promise + */ + public getAnalysisRule(request: google.cloud.contactcenterinsights.v1.IGetAnalysisRuleRequest): Promise; + + /** + * Calls ListAnalysisRules. + * @param request ListAnalysisRulesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAnalysisRulesResponse + */ + public listAnalysisRules(request: google.cloud.contactcenterinsights.v1.IListAnalysisRulesRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListAnalysisRulesCallback): void; + + /** + * Calls ListAnalysisRules. + * @param request ListAnalysisRulesRequest message or plain object + * @returns Promise + */ + public listAnalysisRules(request: google.cloud.contactcenterinsights.v1.IListAnalysisRulesRequest): Promise; + + /** + * Calls UpdateAnalysisRule. + * @param request UpdateAnalysisRuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AnalysisRule + */ + public updateAnalysisRule(request: google.cloud.contactcenterinsights.v1.IUpdateAnalysisRuleRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateAnalysisRuleCallback): void; + + /** + * Calls UpdateAnalysisRule. + * @param request UpdateAnalysisRuleRequest message or plain object + * @returns Promise + */ + public updateAnalysisRule(request: google.cloud.contactcenterinsights.v1.IUpdateAnalysisRuleRequest): Promise; + + /** + * Calls DeleteAnalysisRule. + * @param request DeleteAnalysisRuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteAnalysisRule(request: google.cloud.contactcenterinsights.v1.IDeleteAnalysisRuleRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteAnalysisRuleCallback): void; + + /** + * Calls DeleteAnalysisRule. + * @param request DeleteAnalysisRuleRequest message or plain object + * @returns Promise + */ + public deleteAnalysisRule(request: google.cloud.contactcenterinsights.v1.IDeleteAnalysisRuleRequest): Promise; + /** * Calls GetEncryptionSpec. * @param request GetEncryptionSpecRequest message or plain object @@ -647,6 +717,370 @@ export namespace google { * @returns Promise */ public deleteView(request: google.cloud.contactcenterinsights.v1.IDeleteViewRequest): Promise; + + /** + * Calls QueryMetrics. + * @param request QueryMetricsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public queryMetrics(request: google.cloud.contactcenterinsights.v1.IQueryMetricsRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.QueryMetricsCallback): void; + + /** + * Calls QueryMetrics. + * @param request QueryMetricsRequest message or plain object + * @returns Promise + */ + public queryMetrics(request: google.cloud.contactcenterinsights.v1.IQueryMetricsRequest): Promise; + + /** + * Calls CreateQaQuestion. + * @param request CreateQaQuestionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QaQuestion + */ + public createQaQuestion(request: google.cloud.contactcenterinsights.v1.ICreateQaQuestionRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateQaQuestionCallback): void; + + /** + * Calls CreateQaQuestion. + * @param request CreateQaQuestionRequest message or plain object + * @returns Promise + */ + public createQaQuestion(request: google.cloud.contactcenterinsights.v1.ICreateQaQuestionRequest): Promise; + + /** + * Calls GetQaQuestion. + * @param request GetQaQuestionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QaQuestion + */ + public getQaQuestion(request: google.cloud.contactcenterinsights.v1.IGetQaQuestionRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetQaQuestionCallback): void; + + /** + * Calls GetQaQuestion. + * @param request GetQaQuestionRequest message or plain object + * @returns Promise + */ + public getQaQuestion(request: google.cloud.contactcenterinsights.v1.IGetQaQuestionRequest): Promise; + + /** + * Calls UpdateQaQuestion. + * @param request UpdateQaQuestionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QaQuestion + */ + public updateQaQuestion(request: google.cloud.contactcenterinsights.v1.IUpdateQaQuestionRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateQaQuestionCallback): void; + + /** + * Calls UpdateQaQuestion. + * @param request UpdateQaQuestionRequest message or plain object + * @returns Promise + */ + public updateQaQuestion(request: google.cloud.contactcenterinsights.v1.IUpdateQaQuestionRequest): Promise; + + /** + * Calls DeleteQaQuestion. + * @param request DeleteQaQuestionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteQaQuestion(request: google.cloud.contactcenterinsights.v1.IDeleteQaQuestionRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteQaQuestionCallback): void; + + /** + * Calls DeleteQaQuestion. + * @param request DeleteQaQuestionRequest message or plain object + * @returns Promise + */ + public deleteQaQuestion(request: google.cloud.contactcenterinsights.v1.IDeleteQaQuestionRequest): Promise; + + /** + * Calls ListQaQuestions. + * @param request ListQaQuestionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListQaQuestionsResponse + */ + public listQaQuestions(request: google.cloud.contactcenterinsights.v1.IListQaQuestionsRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListQaQuestionsCallback): void; + + /** + * Calls ListQaQuestions. + * @param request ListQaQuestionsRequest message or plain object + * @returns Promise + */ + public listQaQuestions(request: google.cloud.contactcenterinsights.v1.IListQaQuestionsRequest): Promise; + + /** + * Calls CreateQaScorecard. + * @param request CreateQaScorecardRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QaScorecard + */ + public createQaScorecard(request: google.cloud.contactcenterinsights.v1.ICreateQaScorecardRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateQaScorecardCallback): void; + + /** + * Calls CreateQaScorecard. + * @param request CreateQaScorecardRequest message or plain object + * @returns Promise + */ + public createQaScorecard(request: google.cloud.contactcenterinsights.v1.ICreateQaScorecardRequest): Promise; + + /** + * Calls GetQaScorecard. + * @param request GetQaScorecardRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QaScorecard + */ + public getQaScorecard(request: google.cloud.contactcenterinsights.v1.IGetQaScorecardRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetQaScorecardCallback): void; + + /** + * Calls GetQaScorecard. + * @param request GetQaScorecardRequest message or plain object + * @returns Promise + */ + public getQaScorecard(request: google.cloud.contactcenterinsights.v1.IGetQaScorecardRequest): Promise; + + /** + * Calls UpdateQaScorecard. + * @param request UpdateQaScorecardRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QaScorecard + */ + public updateQaScorecard(request: google.cloud.contactcenterinsights.v1.IUpdateQaScorecardRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateQaScorecardCallback): void; + + /** + * Calls UpdateQaScorecard. + * @param request UpdateQaScorecardRequest message or plain object + * @returns Promise + */ + public updateQaScorecard(request: google.cloud.contactcenterinsights.v1.IUpdateQaScorecardRequest): Promise; + + /** + * Calls DeleteQaScorecard. + * @param request DeleteQaScorecardRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteQaScorecard(request: google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteQaScorecardCallback): void; + + /** + * Calls DeleteQaScorecard. + * @param request DeleteQaScorecardRequest message or plain object + * @returns Promise + */ + public deleteQaScorecard(request: google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRequest): Promise; + + /** + * Calls ListQaScorecards. + * @param request ListQaScorecardsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListQaScorecardsResponse + */ + public listQaScorecards(request: google.cloud.contactcenterinsights.v1.IListQaScorecardsRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListQaScorecardsCallback): void; + + /** + * Calls ListQaScorecards. + * @param request ListQaScorecardsRequest message or plain object + * @returns Promise + */ + public listQaScorecards(request: google.cloud.contactcenterinsights.v1.IListQaScorecardsRequest): Promise; + + /** + * Calls CreateQaScorecardRevision. + * @param request CreateQaScorecardRevisionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QaScorecardRevision + */ + public createQaScorecardRevision(request: google.cloud.contactcenterinsights.v1.ICreateQaScorecardRevisionRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateQaScorecardRevisionCallback): void; + + /** + * Calls CreateQaScorecardRevision. + * @param request CreateQaScorecardRevisionRequest message or plain object + * @returns Promise + */ + public createQaScorecardRevision(request: google.cloud.contactcenterinsights.v1.ICreateQaScorecardRevisionRequest): Promise; + + /** + * Calls GetQaScorecardRevision. + * @param request GetQaScorecardRevisionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QaScorecardRevision + */ + public getQaScorecardRevision(request: google.cloud.contactcenterinsights.v1.IGetQaScorecardRevisionRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetQaScorecardRevisionCallback): void; + + /** + * Calls GetQaScorecardRevision. + * @param request GetQaScorecardRevisionRequest message or plain object + * @returns Promise + */ + public getQaScorecardRevision(request: google.cloud.contactcenterinsights.v1.IGetQaScorecardRevisionRequest): Promise; + + /** + * Calls TuneQaScorecardRevision. + * @param request TuneQaScorecardRevisionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public tuneQaScorecardRevision(request: google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.TuneQaScorecardRevisionCallback): void; + + /** + * Calls TuneQaScorecardRevision. + * @param request TuneQaScorecardRevisionRequest message or plain object + * @returns Promise + */ + public tuneQaScorecardRevision(request: google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionRequest): Promise; + + /** + * Calls DeployQaScorecardRevision. + * @param request DeployQaScorecardRevisionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QaScorecardRevision + */ + public deployQaScorecardRevision(request: google.cloud.contactcenterinsights.v1.IDeployQaScorecardRevisionRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeployQaScorecardRevisionCallback): void; + + /** + * Calls DeployQaScorecardRevision. + * @param request DeployQaScorecardRevisionRequest message or plain object + * @returns Promise + */ + public deployQaScorecardRevision(request: google.cloud.contactcenterinsights.v1.IDeployQaScorecardRevisionRequest): Promise; + + /** + * Calls UndeployQaScorecardRevision. + * @param request UndeployQaScorecardRevisionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QaScorecardRevision + */ + public undeployQaScorecardRevision(request: google.cloud.contactcenterinsights.v1.IUndeployQaScorecardRevisionRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.UndeployQaScorecardRevisionCallback): void; + + /** + * Calls UndeployQaScorecardRevision. + * @param request UndeployQaScorecardRevisionRequest message or plain object + * @returns Promise + */ + public undeployQaScorecardRevision(request: google.cloud.contactcenterinsights.v1.IUndeployQaScorecardRevisionRequest): Promise; + + /** + * Calls DeleteQaScorecardRevision. + * @param request DeleteQaScorecardRevisionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteQaScorecardRevision(request: google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRevisionRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteQaScorecardRevisionCallback): void; + + /** + * Calls DeleteQaScorecardRevision. + * @param request DeleteQaScorecardRevisionRequest message or plain object + * @returns Promise + */ + public deleteQaScorecardRevision(request: google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRevisionRequest): Promise; + + /** + * Calls ListQaScorecardRevisions. + * @param request ListQaScorecardRevisionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListQaScorecardRevisionsResponse + */ + public listQaScorecardRevisions(request: google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListQaScorecardRevisionsCallback): void; + + /** + * Calls ListQaScorecardRevisions. + * @param request ListQaScorecardRevisionsRequest message or plain object + * @returns Promise + */ + public listQaScorecardRevisions(request: google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsRequest): Promise; + + /** + * Calls CreateFeedbackLabel. + * @param request CreateFeedbackLabelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FeedbackLabel + */ + public createFeedbackLabel(request: google.cloud.contactcenterinsights.v1.ICreateFeedbackLabelRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateFeedbackLabelCallback): void; + + /** + * Calls CreateFeedbackLabel. + * @param request CreateFeedbackLabelRequest message or plain object + * @returns Promise + */ + public createFeedbackLabel(request: google.cloud.contactcenterinsights.v1.ICreateFeedbackLabelRequest): Promise; + + /** + * Calls ListFeedbackLabels. + * @param request ListFeedbackLabelsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListFeedbackLabelsResponse + */ + public listFeedbackLabels(request: google.cloud.contactcenterinsights.v1.IListFeedbackLabelsRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListFeedbackLabelsCallback): void; + + /** + * Calls ListFeedbackLabels. + * @param request ListFeedbackLabelsRequest message or plain object + * @returns Promise + */ + public listFeedbackLabels(request: google.cloud.contactcenterinsights.v1.IListFeedbackLabelsRequest): Promise; + + /** + * Calls GetFeedbackLabel. + * @param request GetFeedbackLabelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FeedbackLabel + */ + public getFeedbackLabel(request: google.cloud.contactcenterinsights.v1.IGetFeedbackLabelRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetFeedbackLabelCallback): void; + + /** + * Calls GetFeedbackLabel. + * @param request GetFeedbackLabelRequest message or plain object + * @returns Promise + */ + public getFeedbackLabel(request: google.cloud.contactcenterinsights.v1.IGetFeedbackLabelRequest): Promise; + + /** + * Calls UpdateFeedbackLabel. + * @param request UpdateFeedbackLabelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FeedbackLabel + */ + public updateFeedbackLabel(request: google.cloud.contactcenterinsights.v1.IUpdateFeedbackLabelRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateFeedbackLabelCallback): void; + + /** + * Calls UpdateFeedbackLabel. + * @param request UpdateFeedbackLabelRequest message or plain object + * @returns Promise + */ + public updateFeedbackLabel(request: google.cloud.contactcenterinsights.v1.IUpdateFeedbackLabelRequest): Promise; + + /** + * Calls DeleteFeedbackLabel. + * @param request DeleteFeedbackLabelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteFeedbackLabel(request: google.cloud.contactcenterinsights.v1.IDeleteFeedbackLabelRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteFeedbackLabelCallback): void; + + /** + * Calls DeleteFeedbackLabel. + * @param request DeleteFeedbackLabelRequest message or plain object + * @returns Promise + */ + public deleteFeedbackLabel(request: google.cloud.contactcenterinsights.v1.IDeleteFeedbackLabelRequest): Promise; + + /** + * Calls ListAllFeedbackLabels. + * @param request ListAllFeedbackLabelsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAllFeedbackLabelsResponse + */ + public listAllFeedbackLabels(request: google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListAllFeedbackLabelsCallback): void; + + /** + * Calls ListAllFeedbackLabels. + * @param request ListAllFeedbackLabelsRequest message or plain object + * @returns Promise + */ + public listAllFeedbackLabels(request: google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsRequest): Promise; + + /** + * Calls BulkUploadFeedbackLabels. + * @param request BulkUploadFeedbackLabelsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public bulkUploadFeedbackLabels(request: google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.BulkUploadFeedbackLabelsCallback): void; + + /** + * Calls BulkUploadFeedbackLabels. + * @param request BulkUploadFeedbackLabelsRequest message or plain object + * @returns Promise + */ + public bulkUploadFeedbackLabels(request: google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsRequest): Promise; + + /** + * Calls BulkDownloadFeedbackLabels. + * @param request BulkDownloadFeedbackLabelsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public bulkDownloadFeedbackLabels(request: google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.BulkDownloadFeedbackLabelsCallback): void; + + /** + * Calls BulkDownloadFeedbackLabels. + * @param request BulkDownloadFeedbackLabelsRequest message or plain object + * @returns Promise + */ + public bulkDownloadFeedbackLabels(request: google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsRequest): Promise; } namespace ContactCenterInsights { @@ -903,6 +1337,41 @@ export namespace google { */ type UpdateSettingsCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.Settings) => void; + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|createAnalysisRule}. + * @param error Error, if any + * @param [response] AnalysisRule + */ + type CreateAnalysisRuleCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.AnalysisRule) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|getAnalysisRule}. + * @param error Error, if any + * @param [response] AnalysisRule + */ + type GetAnalysisRuleCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.AnalysisRule) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|listAnalysisRules}. + * @param error Error, if any + * @param [response] ListAnalysisRulesResponse + */ + type ListAnalysisRulesCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.ListAnalysisRulesResponse) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|updateAnalysisRule}. + * @param error Error, if any + * @param [response] AnalysisRule + */ + type UpdateAnalysisRuleCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.AnalysisRule) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|deleteAnalysisRule}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteAnalysisRuleCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + /** * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|getEncryptionSpec}. * @param error Error, if any @@ -951,16 +1420,198 @@ export namespace google { * @param [response] Empty */ type DeleteViewCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - } - /** ConversationView enum. */ - enum ConversationView { - CONVERSATION_VIEW_UNSPECIFIED = 0, - FULL = 2, - BASIC = 1 - } - - /** Properties of a CalculateStatsRequest. */ + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|queryMetrics}. + * @param error Error, if any + * @param [response] Operation + */ + type QueryMetricsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|createQaQuestion}. + * @param error Error, if any + * @param [response] QaQuestion + */ + type CreateQaQuestionCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.QaQuestion) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|getQaQuestion}. + * @param error Error, if any + * @param [response] QaQuestion + */ + type GetQaQuestionCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.QaQuestion) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|updateQaQuestion}. + * @param error Error, if any + * @param [response] QaQuestion + */ + type UpdateQaQuestionCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.QaQuestion) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|deleteQaQuestion}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteQaQuestionCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|listQaQuestions}. + * @param error Error, if any + * @param [response] ListQaQuestionsResponse + */ + type ListQaQuestionsCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.ListQaQuestionsResponse) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|createQaScorecard}. + * @param error Error, if any + * @param [response] QaScorecard + */ + type CreateQaScorecardCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.QaScorecard) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|getQaScorecard}. + * @param error Error, if any + * @param [response] QaScorecard + */ + type GetQaScorecardCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.QaScorecard) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|updateQaScorecard}. + * @param error Error, if any + * @param [response] QaScorecard + */ + type UpdateQaScorecardCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.QaScorecard) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|deleteQaScorecard}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteQaScorecardCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|listQaScorecards}. + * @param error Error, if any + * @param [response] ListQaScorecardsResponse + */ + type ListQaScorecardsCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.ListQaScorecardsResponse) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|createQaScorecardRevision}. + * @param error Error, if any + * @param [response] QaScorecardRevision + */ + type CreateQaScorecardRevisionCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.QaScorecardRevision) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|getQaScorecardRevision}. + * @param error Error, if any + * @param [response] QaScorecardRevision + */ + type GetQaScorecardRevisionCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.QaScorecardRevision) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|tuneQaScorecardRevision}. + * @param error Error, if any + * @param [response] Operation + */ + type TuneQaScorecardRevisionCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|deployQaScorecardRevision}. + * @param error Error, if any + * @param [response] QaScorecardRevision + */ + type DeployQaScorecardRevisionCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.QaScorecardRevision) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|undeployQaScorecardRevision}. + * @param error Error, if any + * @param [response] QaScorecardRevision + */ + type UndeployQaScorecardRevisionCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.QaScorecardRevision) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|deleteQaScorecardRevision}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteQaScorecardRevisionCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|listQaScorecardRevisions}. + * @param error Error, if any + * @param [response] ListQaScorecardRevisionsResponse + */ + type ListQaScorecardRevisionsCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsResponse) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|createFeedbackLabel}. + * @param error Error, if any + * @param [response] FeedbackLabel + */ + type CreateFeedbackLabelCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.FeedbackLabel) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|listFeedbackLabels}. + * @param error Error, if any + * @param [response] ListFeedbackLabelsResponse + */ + type ListFeedbackLabelsCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.ListFeedbackLabelsResponse) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|getFeedbackLabel}. + * @param error Error, if any + * @param [response] FeedbackLabel + */ + type GetFeedbackLabelCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.FeedbackLabel) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|updateFeedbackLabel}. + * @param error Error, if any + * @param [response] FeedbackLabel + */ + type UpdateFeedbackLabelCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.FeedbackLabel) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|deleteFeedbackLabel}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteFeedbackLabelCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|listAllFeedbackLabels}. + * @param error Error, if any + * @param [response] ListAllFeedbackLabelsResponse + */ + type ListAllFeedbackLabelsCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsResponse) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|bulkUploadFeedbackLabels}. + * @param error Error, if any + * @param [response] Operation + */ + type BulkUploadFeedbackLabelsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|bulkDownloadFeedbackLabels}. + * @param error Error, if any + * @param [response] Operation + */ + type BulkDownloadFeedbackLabelsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** ConversationView enum. */ + enum ConversationView { + CONVERSATION_VIEW_UNSPECIFIED = 0, + FULL = 2, + BASIC = 1 + } + + /** Properties of a CalculateStatsRequest. */ interface ICalculateStatsRequest { /** CalculateStatsRequest location */ @@ -8591,7970 +9242,16798 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetEncryptionSpecRequest. */ - interface IGetEncryptionSpecRequest { + /** Properties of a CreateAnalysisRuleRequest. */ + interface ICreateAnalysisRuleRequest { - /** GetEncryptionSpecRequest name */ - name?: (string|null); + /** CreateAnalysisRuleRequest parent */ + parent?: (string|null); + + /** CreateAnalysisRuleRequest analysisRule */ + analysisRule?: (google.cloud.contactcenterinsights.v1.IAnalysisRule|null); } - /** Represents a GetEncryptionSpecRequest. */ - class GetEncryptionSpecRequest implements IGetEncryptionSpecRequest { + /** Represents a CreateAnalysisRuleRequest. */ + class CreateAnalysisRuleRequest implements ICreateAnalysisRuleRequest { /** - * Constructs a new GetEncryptionSpecRequest. + * Constructs a new CreateAnalysisRuleRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest); + constructor(properties?: google.cloud.contactcenterinsights.v1.ICreateAnalysisRuleRequest); - /** GetEncryptionSpecRequest name. */ - public name: string; + /** CreateAnalysisRuleRequest parent. */ + public parent: string; + + /** CreateAnalysisRuleRequest analysisRule. */ + public analysisRule?: (google.cloud.contactcenterinsights.v1.IAnalysisRule|null); /** - * Creates a new GetEncryptionSpecRequest instance using the specified properties. + * Creates a new CreateAnalysisRuleRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetEncryptionSpecRequest instance + * @returns CreateAnalysisRuleRequest instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest): google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest; + public static create(properties?: google.cloud.contactcenterinsights.v1.ICreateAnalysisRuleRequest): google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest; /** - * Encodes the specified GetEncryptionSpecRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest.verify|verify} messages. - * @param message GetEncryptionSpecRequest message or plain object to encode + * Encodes the specified CreateAnalysisRuleRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest.verify|verify} messages. + * @param message CreateAnalysisRuleRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.ICreateAnalysisRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetEncryptionSpecRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest.verify|verify} messages. - * @param message GetEncryptionSpecRequest message or plain object to encode + * Encodes the specified CreateAnalysisRuleRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest.verify|verify} messages. + * @param message CreateAnalysisRuleRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ICreateAnalysisRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetEncryptionSpecRequest message from the specified reader or buffer. + * Decodes a CreateAnalysisRuleRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetEncryptionSpecRequest + * @returns CreateAnalysisRuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest; /** - * Decodes a GetEncryptionSpecRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateAnalysisRuleRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetEncryptionSpecRequest + * @returns CreateAnalysisRuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest; /** - * Verifies a GetEncryptionSpecRequest message. + * Verifies a CreateAnalysisRuleRequest message. * @param message Plain 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 GetEncryptionSpecRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateAnalysisRuleRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetEncryptionSpecRequest + * @returns CreateAnalysisRuleRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest; /** - * Creates a plain object from a GetEncryptionSpecRequest message. Also converts values to other types if specified. - * @param message GetEncryptionSpecRequest + * Creates a plain object from a CreateAnalysisRuleRequest message. Also converts values to other types if specified. + * @param message CreateAnalysisRuleRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetEncryptionSpecRequest to JSON. + * Converts this CreateAnalysisRuleRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetEncryptionSpecRequest + * Gets the default type url for CreateAnalysisRuleRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an InitializeEncryptionSpecRequest. */ - interface IInitializeEncryptionSpecRequest { + /** Properties of a GetAnalysisRuleRequest. */ + interface IGetAnalysisRuleRequest { - /** InitializeEncryptionSpecRequest encryptionSpec */ - encryptionSpec?: (google.cloud.contactcenterinsights.v1.IEncryptionSpec|null); + /** GetAnalysisRuleRequest name */ + name?: (string|null); } - /** Represents an InitializeEncryptionSpecRequest. */ - class InitializeEncryptionSpecRequest implements IInitializeEncryptionSpecRequest { + /** Represents a GetAnalysisRuleRequest. */ + class GetAnalysisRuleRequest implements IGetAnalysisRuleRequest { /** - * Constructs a new InitializeEncryptionSpecRequest. + * Constructs a new GetAnalysisRuleRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest); + constructor(properties?: google.cloud.contactcenterinsights.v1.IGetAnalysisRuleRequest); - /** InitializeEncryptionSpecRequest encryptionSpec. */ - public encryptionSpec?: (google.cloud.contactcenterinsights.v1.IEncryptionSpec|null); + /** GetAnalysisRuleRequest name. */ + public name: string; /** - * Creates a new InitializeEncryptionSpecRequest instance using the specified properties. + * Creates a new GetAnalysisRuleRequest instance using the specified properties. * @param [properties] Properties to set - * @returns InitializeEncryptionSpecRequest instance + * @returns GetAnalysisRuleRequest instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest): google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest; + public static create(properties?: google.cloud.contactcenterinsights.v1.IGetAnalysisRuleRequest): google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest; /** - * Encodes the specified InitializeEncryptionSpecRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest.verify|verify} messages. - * @param message InitializeEncryptionSpecRequest message or plain object to encode + * Encodes the specified GetAnalysisRuleRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest.verify|verify} messages. + * @param message GetAnalysisRuleRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IGetAnalysisRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified InitializeEncryptionSpecRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest.verify|verify} messages. - * @param message InitializeEncryptionSpecRequest message or plain object to encode + * Encodes the specified GetAnalysisRuleRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest.verify|verify} messages. + * @param message GetAnalysisRuleRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IGetAnalysisRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an InitializeEncryptionSpecRequest message from the specified reader or buffer. + * Decodes a GetAnalysisRuleRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns InitializeEncryptionSpecRequest + * @returns GetAnalysisRuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest; /** - * Decodes an InitializeEncryptionSpecRequest message from the specified reader or buffer, length delimited. + * Decodes a GetAnalysisRuleRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns InitializeEncryptionSpecRequest + * @returns GetAnalysisRuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest; /** - * Verifies an InitializeEncryptionSpecRequest message. + * Verifies a GetAnalysisRuleRequest message. * @param message Plain 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 InitializeEncryptionSpecRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetAnalysisRuleRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns InitializeEncryptionSpecRequest + * @returns GetAnalysisRuleRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest; /** - * Creates a plain object from an InitializeEncryptionSpecRequest message. Also converts values to other types if specified. - * @param message InitializeEncryptionSpecRequest + * Creates a plain object from a GetAnalysisRuleRequest message. Also converts values to other types if specified. + * @param message GetAnalysisRuleRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this InitializeEncryptionSpecRequest to JSON. + * Converts this GetAnalysisRuleRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for InitializeEncryptionSpecRequest + * Gets the default type url for GetAnalysisRuleRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an InitializeEncryptionSpecResponse. */ - interface IInitializeEncryptionSpecResponse { + /** Properties of an UpdateAnalysisRuleRequest. */ + interface IUpdateAnalysisRuleRequest { + + /** UpdateAnalysisRuleRequest analysisRule */ + analysisRule?: (google.cloud.contactcenterinsights.v1.IAnalysisRule|null); + + /** UpdateAnalysisRuleRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents an InitializeEncryptionSpecResponse. */ - class InitializeEncryptionSpecResponse implements IInitializeEncryptionSpecResponse { + /** Represents an UpdateAnalysisRuleRequest. */ + class UpdateAnalysisRuleRequest implements IUpdateAnalysisRuleRequest { /** - * Constructs a new InitializeEncryptionSpecResponse. + * Constructs a new UpdateAnalysisRuleRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse); + constructor(properties?: google.cloud.contactcenterinsights.v1.IUpdateAnalysisRuleRequest); + + /** UpdateAnalysisRuleRequest analysisRule. */ + public analysisRule?: (google.cloud.contactcenterinsights.v1.IAnalysisRule|null); + + /** UpdateAnalysisRuleRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new InitializeEncryptionSpecResponse instance using the specified properties. + * Creates a new UpdateAnalysisRuleRequest instance using the specified properties. * @param [properties] Properties to set - * @returns InitializeEncryptionSpecResponse instance + * @returns UpdateAnalysisRuleRequest instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse): google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse; + public static create(properties?: google.cloud.contactcenterinsights.v1.IUpdateAnalysisRuleRequest): google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest; /** - * Encodes the specified InitializeEncryptionSpecResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse.verify|verify} messages. - * @param message InitializeEncryptionSpecResponse message or plain object to encode + * Encodes the specified UpdateAnalysisRuleRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest.verify|verify} messages. + * @param message UpdateAnalysisRuleRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IUpdateAnalysisRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified InitializeEncryptionSpecResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse.verify|verify} messages. - * @param message InitializeEncryptionSpecResponse message or plain object to encode + * Encodes the specified UpdateAnalysisRuleRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest.verify|verify} messages. + * @param message UpdateAnalysisRuleRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IUpdateAnalysisRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an InitializeEncryptionSpecResponse message from the specified reader or buffer. + * Decodes an UpdateAnalysisRuleRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns InitializeEncryptionSpecResponse + * @returns UpdateAnalysisRuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest; /** - * Decodes an InitializeEncryptionSpecResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateAnalysisRuleRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns InitializeEncryptionSpecResponse + * @returns UpdateAnalysisRuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest; /** - * Verifies an InitializeEncryptionSpecResponse message. + * Verifies an UpdateAnalysisRuleRequest message. * @param message Plain 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 InitializeEncryptionSpecResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateAnalysisRuleRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns InitializeEncryptionSpecResponse + * @returns UpdateAnalysisRuleRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest; /** - * Creates a plain object from an InitializeEncryptionSpecResponse message. Also converts values to other types if specified. - * @param message InitializeEncryptionSpecResponse + * Creates a plain object from an UpdateAnalysisRuleRequest message. Also converts values to other types if specified. + * @param message UpdateAnalysisRuleRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this InitializeEncryptionSpecResponse to JSON. + * Converts this UpdateAnalysisRuleRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for InitializeEncryptionSpecResponse + * Gets the default type url for UpdateAnalysisRuleRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an InitializeEncryptionSpecMetadata. */ - interface IInitializeEncryptionSpecMetadata { - - /** InitializeEncryptionSpecMetadata createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** InitializeEncryptionSpecMetadata endTime */ - endTime?: (google.protobuf.ITimestamp|null); - - /** InitializeEncryptionSpecMetadata request */ - request?: (google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest|null); + /** Properties of a DeleteAnalysisRuleRequest. */ + interface IDeleteAnalysisRuleRequest { - /** InitializeEncryptionSpecMetadata partialErrors */ - partialErrors?: (google.rpc.IStatus[]|null); + /** DeleteAnalysisRuleRequest name */ + name?: (string|null); } - /** Represents an InitializeEncryptionSpecMetadata. */ - class InitializeEncryptionSpecMetadata implements IInitializeEncryptionSpecMetadata { + /** Represents a DeleteAnalysisRuleRequest. */ + class DeleteAnalysisRuleRequest implements IDeleteAnalysisRuleRequest { /** - * Constructs a new InitializeEncryptionSpecMetadata. + * Constructs a new DeleteAnalysisRuleRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata); - - /** InitializeEncryptionSpecMetadata createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + constructor(properties?: google.cloud.contactcenterinsights.v1.IDeleteAnalysisRuleRequest); - /** InitializeEncryptionSpecMetadata endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** InitializeEncryptionSpecMetadata request. */ - public request?: (google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest|null); - - /** InitializeEncryptionSpecMetadata partialErrors. */ - public partialErrors: google.rpc.IStatus[]; + /** DeleteAnalysisRuleRequest name. */ + public name: string; /** - * Creates a new InitializeEncryptionSpecMetadata instance using the specified properties. + * Creates a new DeleteAnalysisRuleRequest instance using the specified properties. * @param [properties] Properties to set - * @returns InitializeEncryptionSpecMetadata instance + * @returns DeleteAnalysisRuleRequest instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata): google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata; + public static create(properties?: google.cloud.contactcenterinsights.v1.IDeleteAnalysisRuleRequest): google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest; /** - * Encodes the specified InitializeEncryptionSpecMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata.verify|verify} messages. - * @param message InitializeEncryptionSpecMetadata message or plain object to encode + * Encodes the specified DeleteAnalysisRuleRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest.verify|verify} messages. + * @param message DeleteAnalysisRuleRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IDeleteAnalysisRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified InitializeEncryptionSpecMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata.verify|verify} messages. - * @param message InitializeEncryptionSpecMetadata message or plain object to encode + * Encodes the specified DeleteAnalysisRuleRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest.verify|verify} messages. + * @param message DeleteAnalysisRuleRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IDeleteAnalysisRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an InitializeEncryptionSpecMetadata message from the specified reader or buffer. + * Decodes a DeleteAnalysisRuleRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns InitializeEncryptionSpecMetadata + * @returns DeleteAnalysisRuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest; /** - * Decodes an InitializeEncryptionSpecMetadata message from the specified reader or buffer, length delimited. + * Decodes a DeleteAnalysisRuleRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns InitializeEncryptionSpecMetadata + * @returns DeleteAnalysisRuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest; /** - * Verifies an InitializeEncryptionSpecMetadata message. + * Verifies a DeleteAnalysisRuleRequest message. * @param message Plain 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 InitializeEncryptionSpecMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteAnalysisRuleRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns InitializeEncryptionSpecMetadata + * @returns DeleteAnalysisRuleRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest; /** - * Creates a plain object from an InitializeEncryptionSpecMetadata message. Also converts values to other types if specified. - * @param message InitializeEncryptionSpecMetadata + * Creates a plain object from a DeleteAnalysisRuleRequest message. Also converts values to other types if specified. + * @param message DeleteAnalysisRuleRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this InitializeEncryptionSpecMetadata to JSON. + * Converts this DeleteAnalysisRuleRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for InitializeEncryptionSpecMetadata + * Gets the default type url for DeleteAnalysisRuleRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateViewRequest. */ - interface ICreateViewRequest { + /** Properties of a ListAnalysisRulesRequest. */ + interface IListAnalysisRulesRequest { - /** CreateViewRequest parent */ + /** ListAnalysisRulesRequest parent */ parent?: (string|null); - /** CreateViewRequest view */ - view?: (google.cloud.contactcenterinsights.v1.IView|null); + /** ListAnalysisRulesRequest pageSize */ + pageSize?: (number|null); + + /** ListAnalysisRulesRequest pageToken */ + pageToken?: (string|null); } - /** Represents a CreateViewRequest. */ - class CreateViewRequest implements ICreateViewRequest { + /** Represents a ListAnalysisRulesRequest. */ + class ListAnalysisRulesRequest implements IListAnalysisRulesRequest { /** - * Constructs a new CreateViewRequest. + * Constructs a new ListAnalysisRulesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.ICreateViewRequest); + constructor(properties?: google.cloud.contactcenterinsights.v1.IListAnalysisRulesRequest); - /** CreateViewRequest parent. */ + /** ListAnalysisRulesRequest parent. */ public parent: string; - /** CreateViewRequest view. */ - public view?: (google.cloud.contactcenterinsights.v1.IView|null); + /** ListAnalysisRulesRequest pageSize. */ + public pageSize: number; + + /** ListAnalysisRulesRequest pageToken. */ + public pageToken: string; /** - * Creates a new CreateViewRequest instance using the specified properties. + * Creates a new ListAnalysisRulesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateViewRequest instance + * @returns ListAnalysisRulesRequest instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.ICreateViewRequest): google.cloud.contactcenterinsights.v1.CreateViewRequest; + public static create(properties?: google.cloud.contactcenterinsights.v1.IListAnalysisRulesRequest): google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest; /** - * Encodes the specified CreateViewRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateViewRequest.verify|verify} messages. - * @param message CreateViewRequest message or plain object to encode + * Encodes the specified ListAnalysisRulesRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest.verify|verify} messages. + * @param message ListAnalysisRulesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.ICreateViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IListAnalysisRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateViewRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateViewRequest.verify|verify} messages. - * @param message CreateViewRequest message or plain object to encode + * Encodes the specified ListAnalysisRulesRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest.verify|verify} messages. + * @param message ListAnalysisRulesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ICreateViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListAnalysisRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateViewRequest message from the specified reader or buffer. + * Decodes a ListAnalysisRulesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateViewRequest + * @returns ListAnalysisRulesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.CreateViewRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest; /** - * Decodes a CreateViewRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAnalysisRulesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateViewRequest + * @returns ListAnalysisRulesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.CreateViewRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest; /** - * Verifies a CreateViewRequest message. + * Verifies a ListAnalysisRulesRequest message. * @param message Plain 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 CreateViewRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAnalysisRulesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateViewRequest + * @returns ListAnalysisRulesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.CreateViewRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest; /** - * Creates a plain object from a CreateViewRequest message. Also converts values to other types if specified. - * @param message CreateViewRequest + * Creates a plain object from a ListAnalysisRulesRequest message. Also converts values to other types if specified. + * @param message ListAnalysisRulesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.CreateViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateViewRequest to JSON. + * Converts this ListAnalysisRulesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateViewRequest + * Gets the default type url for ListAnalysisRulesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetViewRequest. */ - interface IGetViewRequest { + /** Properties of a ListAnalysisRulesResponse. */ + interface IListAnalysisRulesResponse { - /** GetViewRequest name */ - name?: (string|null); + /** ListAnalysisRulesResponse analysisRules */ + analysisRules?: (google.cloud.contactcenterinsights.v1.IAnalysisRule[]|null); + + /** ListAnalysisRulesResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a GetViewRequest. */ - class GetViewRequest implements IGetViewRequest { + /** Represents a ListAnalysisRulesResponse. */ + class ListAnalysisRulesResponse implements IListAnalysisRulesResponse { /** - * Constructs a new GetViewRequest. + * Constructs a new ListAnalysisRulesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IGetViewRequest); + constructor(properties?: google.cloud.contactcenterinsights.v1.IListAnalysisRulesResponse); - /** GetViewRequest name. */ - public name: string; + /** ListAnalysisRulesResponse analysisRules. */ + public analysisRules: google.cloud.contactcenterinsights.v1.IAnalysisRule[]; + + /** ListAnalysisRulesResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new GetViewRequest instance using the specified properties. + * Creates a new ListAnalysisRulesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetViewRequest instance + * @returns ListAnalysisRulesResponse instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IGetViewRequest): google.cloud.contactcenterinsights.v1.GetViewRequest; + public static create(properties?: google.cloud.contactcenterinsights.v1.IListAnalysisRulesResponse): google.cloud.contactcenterinsights.v1.ListAnalysisRulesResponse; /** - * Encodes the specified GetViewRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetViewRequest.verify|verify} messages. - * @param message GetViewRequest message or plain object to encode + * Encodes the specified ListAnalysisRulesResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListAnalysisRulesResponse.verify|verify} messages. + * @param message ListAnalysisRulesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IGetViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IListAnalysisRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetViewRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetViewRequest.verify|verify} messages. - * @param message GetViewRequest message or plain object to encode + * Encodes the specified ListAnalysisRulesResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListAnalysisRulesResponse.verify|verify} messages. + * @param message ListAnalysisRulesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IGetViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListAnalysisRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetViewRequest message from the specified reader or buffer. + * Decodes a ListAnalysisRulesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetViewRequest + * @returns ListAnalysisRulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.GetViewRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListAnalysisRulesResponse; /** - * Decodes a GetViewRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAnalysisRulesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetViewRequest + * @returns ListAnalysisRulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.GetViewRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListAnalysisRulesResponse; /** - * Verifies a GetViewRequest message. + * Verifies a ListAnalysisRulesResponse message. * @param message Plain 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 GetViewRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAnalysisRulesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetViewRequest + * @returns ListAnalysisRulesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.GetViewRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListAnalysisRulesResponse; /** - * Creates a plain object from a GetViewRequest message. Also converts values to other types if specified. - * @param message GetViewRequest + * Creates a plain object from a ListAnalysisRulesResponse message. Also converts values to other types if specified. + * @param message ListAnalysisRulesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.GetViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.ListAnalysisRulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetViewRequest to JSON. + * Converts this ListAnalysisRulesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetViewRequest + * Gets the default type url for ListAnalysisRulesResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListViewsRequest. */ - interface IListViewsRequest { - - /** ListViewsRequest parent */ - parent?: (string|null); - - /** ListViewsRequest pageSize */ - pageSize?: (number|null); + /** Properties of a GetEncryptionSpecRequest. */ + interface IGetEncryptionSpecRequest { - /** ListViewsRequest pageToken */ - pageToken?: (string|null); + /** GetEncryptionSpecRequest name */ + name?: (string|null); } - /** Represents a ListViewsRequest. */ - class ListViewsRequest implements IListViewsRequest { + /** Represents a GetEncryptionSpecRequest. */ + class GetEncryptionSpecRequest implements IGetEncryptionSpecRequest { /** - * Constructs a new ListViewsRequest. + * Constructs a new GetEncryptionSpecRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IListViewsRequest); - - /** ListViewsRequest parent. */ - public parent: string; - - /** ListViewsRequest pageSize. */ - public pageSize: number; + constructor(properties?: google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest); - /** ListViewsRequest pageToken. */ - public pageToken: string; + /** GetEncryptionSpecRequest name. */ + public name: string; /** - * Creates a new ListViewsRequest instance using the specified properties. + * Creates a new GetEncryptionSpecRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListViewsRequest instance + * @returns GetEncryptionSpecRequest instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IListViewsRequest): google.cloud.contactcenterinsights.v1.ListViewsRequest; + public static create(properties?: google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest): google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest; /** - * Encodes the specified ListViewsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListViewsRequest.verify|verify} messages. - * @param message ListViewsRequest message or plain object to encode + * Encodes the specified GetEncryptionSpecRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest.verify|verify} messages. + * @param message GetEncryptionSpecRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IListViewsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListViewsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListViewsRequest.verify|verify} messages. - * @param message ListViewsRequest message or plain object to encode + * Encodes the specified GetEncryptionSpecRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest.verify|verify} messages. + * @param message GetEncryptionSpecRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListViewsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListViewsRequest message from the specified reader or buffer. + * Decodes a GetEncryptionSpecRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListViewsRequest + * @returns GetEncryptionSpecRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListViewsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest; /** - * Decodes a ListViewsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetEncryptionSpecRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListViewsRequest + * @returns GetEncryptionSpecRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListViewsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest; /** - * Verifies a ListViewsRequest message. + * Verifies a GetEncryptionSpecRequest message. * @param message Plain 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 ListViewsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetEncryptionSpecRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListViewsRequest + * @returns GetEncryptionSpecRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListViewsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest; /** - * Creates a plain object from a ListViewsRequest message. Also converts values to other types if specified. - * @param message ListViewsRequest + * Creates a plain object from a GetEncryptionSpecRequest message. Also converts values to other types if specified. + * @param message GetEncryptionSpecRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.ListViewsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListViewsRequest to JSON. + * Converts this GetEncryptionSpecRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListViewsRequest + * Gets the default type url for GetEncryptionSpecRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListViewsResponse. */ - interface IListViewsResponse { - - /** ListViewsResponse views */ - views?: (google.cloud.contactcenterinsights.v1.IView[]|null); + /** Properties of an InitializeEncryptionSpecRequest. */ + interface IInitializeEncryptionSpecRequest { - /** ListViewsResponse nextPageToken */ - nextPageToken?: (string|null); + /** InitializeEncryptionSpecRequest encryptionSpec */ + encryptionSpec?: (google.cloud.contactcenterinsights.v1.IEncryptionSpec|null); } - /** Represents a ListViewsResponse. */ - class ListViewsResponse implements IListViewsResponse { + /** Represents an InitializeEncryptionSpecRequest. */ + class InitializeEncryptionSpecRequest implements IInitializeEncryptionSpecRequest { /** - * Constructs a new ListViewsResponse. + * Constructs a new InitializeEncryptionSpecRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IListViewsResponse); - - /** ListViewsResponse views. */ - public views: google.cloud.contactcenterinsights.v1.IView[]; + constructor(properties?: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest); - /** ListViewsResponse nextPageToken. */ - public nextPageToken: string; + /** InitializeEncryptionSpecRequest encryptionSpec. */ + public encryptionSpec?: (google.cloud.contactcenterinsights.v1.IEncryptionSpec|null); /** - * Creates a new ListViewsResponse instance using the specified properties. + * Creates a new InitializeEncryptionSpecRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListViewsResponse instance + * @returns InitializeEncryptionSpecRequest instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IListViewsResponse): google.cloud.contactcenterinsights.v1.ListViewsResponse; + public static create(properties?: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest): google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest; /** - * Encodes the specified ListViewsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListViewsResponse.verify|verify} messages. - * @param message ListViewsResponse message or plain object to encode + * Encodes the specified InitializeEncryptionSpecRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest.verify|verify} messages. + * @param message InitializeEncryptionSpecRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IListViewsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListViewsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListViewsResponse.verify|verify} messages. - * @param message ListViewsResponse message or plain object to encode + * Encodes the specified InitializeEncryptionSpecRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest.verify|verify} messages. + * @param message InitializeEncryptionSpecRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListViewsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListViewsResponse message from the specified reader or buffer. + * Decodes an InitializeEncryptionSpecRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListViewsResponse + * @returns InitializeEncryptionSpecRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListViewsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest; /** - * Decodes a ListViewsResponse message from the specified reader or buffer, length delimited. + * Decodes an InitializeEncryptionSpecRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListViewsResponse + * @returns InitializeEncryptionSpecRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListViewsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest; /** - * Verifies a ListViewsResponse message. + * Verifies an InitializeEncryptionSpecRequest message. * @param message Plain 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 ListViewsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an InitializeEncryptionSpecRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListViewsResponse + * @returns InitializeEncryptionSpecRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListViewsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest; /** - * Creates a plain object from a ListViewsResponse message. Also converts values to other types if specified. - * @param message ListViewsResponse - * @param [options] Conversion options + * Creates a plain object from an InitializeEncryptionSpecRequest message. Also converts values to other types if specified. + * @param message InitializeEncryptionSpecRequest + * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.ListViewsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListViewsResponse to JSON. + * Converts this InitializeEncryptionSpecRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListViewsResponse + * Gets the default type url for InitializeEncryptionSpecRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateViewRequest. */ - interface IUpdateViewRequest { - - /** UpdateViewRequest view */ - view?: (google.cloud.contactcenterinsights.v1.IView|null); - - /** UpdateViewRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** Properties of an InitializeEncryptionSpecResponse. */ + interface IInitializeEncryptionSpecResponse { } - /** Represents an UpdateViewRequest. */ - class UpdateViewRequest implements IUpdateViewRequest { + /** Represents an InitializeEncryptionSpecResponse. */ + class InitializeEncryptionSpecResponse implements IInitializeEncryptionSpecResponse { /** - * Constructs a new UpdateViewRequest. + * Constructs a new InitializeEncryptionSpecResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IUpdateViewRequest); - - /** UpdateViewRequest view. */ - public view?: (google.cloud.contactcenterinsights.v1.IView|null); - - /** UpdateViewRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + constructor(properties?: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse); /** - * Creates a new UpdateViewRequest instance using the specified properties. + * Creates a new InitializeEncryptionSpecResponse instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateViewRequest instance + * @returns InitializeEncryptionSpecResponse instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IUpdateViewRequest): google.cloud.contactcenterinsights.v1.UpdateViewRequest; + public static create(properties?: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse): google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse; /** - * Encodes the specified UpdateViewRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateViewRequest.verify|verify} messages. - * @param message UpdateViewRequest message or plain object to encode + * Encodes the specified InitializeEncryptionSpecResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse.verify|verify} messages. + * @param message InitializeEncryptionSpecResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IUpdateViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateViewRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateViewRequest.verify|verify} messages. - * @param message UpdateViewRequest message or plain object to encode + * Encodes the specified InitializeEncryptionSpecResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse.verify|verify} messages. + * @param message InitializeEncryptionSpecResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IUpdateViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateViewRequest message from the specified reader or buffer. + * Decodes an InitializeEncryptionSpecResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateViewRequest + * @returns InitializeEncryptionSpecResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.UpdateViewRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse; /** - * Decodes an UpdateViewRequest message from the specified reader or buffer, length delimited. + * Decodes an InitializeEncryptionSpecResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateViewRequest + * @returns InitializeEncryptionSpecResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.UpdateViewRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse; /** - * Verifies an UpdateViewRequest message. + * Verifies an InitializeEncryptionSpecResponse message. * @param message Plain 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 UpdateViewRequest message from a plain object. Also converts values to their respective internal types. + * Creates an InitializeEncryptionSpecResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateViewRequest + * @returns InitializeEncryptionSpecResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.UpdateViewRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse; /** - * Creates a plain object from an UpdateViewRequest message. Also converts values to other types if specified. - * @param message UpdateViewRequest + * Creates a plain object from an InitializeEncryptionSpecResponse message. Also converts values to other types if specified. + * @param message InitializeEncryptionSpecResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.UpdateViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateViewRequest to JSON. + * Converts this InitializeEncryptionSpecResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateViewRequest + * Gets the default type url for InitializeEncryptionSpecResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteViewRequest. */ - interface IDeleteViewRequest { + /** Properties of an InitializeEncryptionSpecMetadata. */ + interface IInitializeEncryptionSpecMetadata { - /** DeleteViewRequest name */ - name?: (string|null); + /** InitializeEncryptionSpecMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** InitializeEncryptionSpecMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** InitializeEncryptionSpecMetadata request */ + request?: (google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest|null); + + /** InitializeEncryptionSpecMetadata partialErrors */ + partialErrors?: (google.rpc.IStatus[]|null); } - /** Represents a DeleteViewRequest. */ - class DeleteViewRequest implements IDeleteViewRequest { + /** Represents an InitializeEncryptionSpecMetadata. */ + class InitializeEncryptionSpecMetadata implements IInitializeEncryptionSpecMetadata { /** - * Constructs a new DeleteViewRequest. + * Constructs a new InitializeEncryptionSpecMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IDeleteViewRequest); + constructor(properties?: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata); - /** DeleteViewRequest name. */ - public name: string; + /** InitializeEncryptionSpecMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** InitializeEncryptionSpecMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** InitializeEncryptionSpecMetadata request. */ + public request?: (google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest|null); + + /** InitializeEncryptionSpecMetadata partialErrors. */ + public partialErrors: google.rpc.IStatus[]; /** - * Creates a new DeleteViewRequest instance using the specified properties. + * Creates a new InitializeEncryptionSpecMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteViewRequest instance + * @returns InitializeEncryptionSpecMetadata instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IDeleteViewRequest): google.cloud.contactcenterinsights.v1.DeleteViewRequest; + public static create(properties?: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata): google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata; /** - * Encodes the specified DeleteViewRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteViewRequest.verify|verify} messages. - * @param message DeleteViewRequest message or plain object to encode + * Encodes the specified InitializeEncryptionSpecMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata.verify|verify} messages. + * @param message InitializeEncryptionSpecMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IDeleteViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteViewRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteViewRequest.verify|verify} messages. - * @param message DeleteViewRequest message or plain object to encode + * Encodes the specified InitializeEncryptionSpecMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata.verify|verify} messages. + * @param message InitializeEncryptionSpecMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IDeleteViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteViewRequest message from the specified reader or buffer. + * Decodes an InitializeEncryptionSpecMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteViewRequest + * @returns InitializeEncryptionSpecMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.DeleteViewRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata; /** - * Decodes a DeleteViewRequest message from the specified reader or buffer, length delimited. + * Decodes an InitializeEncryptionSpecMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteViewRequest + * @returns InitializeEncryptionSpecMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.DeleteViewRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata; /** - * Verifies a DeleteViewRequest message. + * Verifies an InitializeEncryptionSpecMetadata message. * @param message Plain 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 DeleteViewRequest message from a plain object. Also converts values to their respective internal types. + * Creates an InitializeEncryptionSpecMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteViewRequest + * @returns InitializeEncryptionSpecMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.DeleteViewRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata; /** - * Creates a plain object from a DeleteViewRequest message. Also converts values to other types if specified. - * @param message DeleteViewRequest + * Creates a plain object from an InitializeEncryptionSpecMetadata message. Also converts values to other types if specified. + * @param message InitializeEncryptionSpecMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.DeleteViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteViewRequest to JSON. + * Converts this InitializeEncryptionSpecMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteViewRequest + * Gets the default type url for InitializeEncryptionSpecMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Conversation. */ - interface IConversation { + /** Properties of a CreateViewRequest. */ + interface ICreateViewRequest { - /** Conversation callMetadata */ - callMetadata?: (google.cloud.contactcenterinsights.v1.Conversation.ICallMetadata|null); + /** CreateViewRequest parent */ + parent?: (string|null); - /** Conversation expireTime */ - expireTime?: (google.protobuf.ITimestamp|null); + /** CreateViewRequest view */ + view?: (google.cloud.contactcenterinsights.v1.IView|null); + } - /** Conversation ttl */ - ttl?: (google.protobuf.IDuration|null); + /** Represents a CreateViewRequest. */ + class CreateViewRequest implements ICreateViewRequest { - /** Conversation name */ - name?: (string|null); + /** + * Constructs a new CreateViewRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.ICreateViewRequest); - /** Conversation dataSource */ - dataSource?: (google.cloud.contactcenterinsights.v1.IConversationDataSource|null); + /** CreateViewRequest parent. */ + public parent: string; - /** Conversation createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** CreateViewRequest view. */ + public view?: (google.cloud.contactcenterinsights.v1.IView|null); - /** Conversation updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** + * Creates a new CreateViewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateViewRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.ICreateViewRequest): google.cloud.contactcenterinsights.v1.CreateViewRequest; - /** Conversation startTime */ - startTime?: (google.protobuf.ITimestamp|null); + /** + * Encodes the specified CreateViewRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateViewRequest.verify|verify} messages. + * @param message CreateViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.ICreateViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Conversation languageCode */ - languageCode?: (string|null); + /** + * Encodes the specified CreateViewRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateViewRequest.verify|verify} messages. + * @param message CreateViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ICreateViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Conversation agentId */ - agentId?: (string|null); + /** + * Decodes a CreateViewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.CreateViewRequest; - /** Conversation labels */ - labels?: ({ [k: string]: string }|null); + /** + * Decodes a CreateViewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.CreateViewRequest; - /** Conversation qualityMetadata */ - qualityMetadata?: (google.cloud.contactcenterinsights.v1.Conversation.IQualityMetadata|null); + /** + * Verifies a CreateViewRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Conversation metadataJson */ - metadataJson?: (string|null); - - /** Conversation transcript */ - transcript?: (google.cloud.contactcenterinsights.v1.Conversation.ITranscript|null); - - /** Conversation medium */ - medium?: (google.cloud.contactcenterinsights.v1.Conversation.Medium|keyof typeof google.cloud.contactcenterinsights.v1.Conversation.Medium|null); - - /** Conversation duration */ - duration?: (google.protobuf.IDuration|null); - - /** Conversation turnCount */ - turnCount?: (number|null); + /** + * Creates a CreateViewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateViewRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.CreateViewRequest; - /** Conversation latestAnalysis */ - latestAnalysis?: (google.cloud.contactcenterinsights.v1.IAnalysis|null); + /** + * Creates a plain object from a CreateViewRequest message. Also converts values to other types if specified. + * @param message CreateViewRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.CreateViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Conversation latestSummary */ - latestSummary?: (google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData|null); + /** + * Converts this CreateViewRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Conversation runtimeAnnotations */ - runtimeAnnotations?: (google.cloud.contactcenterinsights.v1.IRuntimeAnnotation[]|null); + /** + * Gets the default type url for CreateViewRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Conversation dialogflowIntents */ - dialogflowIntents?: ({ [k: string]: google.cloud.contactcenterinsights.v1.IDialogflowIntent }|null); + /** Properties of a GetViewRequest. */ + interface IGetViewRequest { - /** Conversation obfuscatedUserId */ - obfuscatedUserId?: (string|null); + /** GetViewRequest name */ + name?: (string|null); } - /** Represents a Conversation. */ - class Conversation implements IConversation { + /** Represents a GetViewRequest. */ + class GetViewRequest implements IGetViewRequest { /** - * Constructs a new Conversation. + * Constructs a new GetViewRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IConversation); - - /** Conversation callMetadata. */ - public callMetadata?: (google.cloud.contactcenterinsights.v1.Conversation.ICallMetadata|null); - - /** Conversation expireTime. */ - public expireTime?: (google.protobuf.ITimestamp|null); - - /** Conversation ttl. */ - public ttl?: (google.protobuf.IDuration|null); + constructor(properties?: google.cloud.contactcenterinsights.v1.IGetViewRequest); - /** Conversation name. */ + /** GetViewRequest name. */ public name: string; - /** Conversation dataSource. */ - public dataSource?: (google.cloud.contactcenterinsights.v1.IConversationDataSource|null); - - /** Conversation createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** + * Creates a new GetViewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetViewRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IGetViewRequest): google.cloud.contactcenterinsights.v1.GetViewRequest; - /** Conversation updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** + * Encodes the specified GetViewRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetViewRequest.verify|verify} messages. + * @param message GetViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IGetViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Conversation startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); + /** + * Encodes the specified GetViewRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetViewRequest.verify|verify} messages. + * @param message GetViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IGetViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Conversation languageCode. */ - public languageCode: string; + /** + * Decodes a GetViewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.GetViewRequest; - /** Conversation agentId. */ - public agentId: string; + /** + * Decodes a GetViewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.GetViewRequest; - /** Conversation labels. */ - public labels: { [k: string]: string }; + /** + * Verifies a GetViewRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Conversation qualityMetadata. */ - public qualityMetadata?: (google.cloud.contactcenterinsights.v1.Conversation.IQualityMetadata|null); + /** + * Creates a GetViewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetViewRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.GetViewRequest; - /** Conversation metadataJson. */ - public metadataJson: string; + /** + * Creates a plain object from a GetViewRequest message. Also converts values to other types if specified. + * @param message GetViewRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.GetViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Conversation transcript. */ - public transcript?: (google.cloud.contactcenterinsights.v1.Conversation.ITranscript|null); + /** + * Converts this GetViewRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Conversation medium. */ - public medium: (google.cloud.contactcenterinsights.v1.Conversation.Medium|keyof typeof google.cloud.contactcenterinsights.v1.Conversation.Medium); + /** + * Gets the default type url for GetViewRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Conversation duration. */ - public duration?: (google.protobuf.IDuration|null); + /** Properties of a ListViewsRequest. */ + interface IListViewsRequest { - /** Conversation turnCount. */ - public turnCount: number; + /** ListViewsRequest parent */ + parent?: (string|null); - /** Conversation latestAnalysis. */ - public latestAnalysis?: (google.cloud.contactcenterinsights.v1.IAnalysis|null); + /** ListViewsRequest pageSize */ + pageSize?: (number|null); - /** Conversation latestSummary. */ - public latestSummary?: (google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData|null); + /** ListViewsRequest pageToken */ + pageToken?: (string|null); + } - /** Conversation runtimeAnnotations. */ - public runtimeAnnotations: google.cloud.contactcenterinsights.v1.IRuntimeAnnotation[]; + /** Represents a ListViewsRequest. */ + class ListViewsRequest implements IListViewsRequest { - /** Conversation dialogflowIntents. */ - public dialogflowIntents: { [k: string]: google.cloud.contactcenterinsights.v1.IDialogflowIntent }; + /** + * Constructs a new ListViewsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IListViewsRequest); - /** Conversation obfuscatedUserId. */ - public obfuscatedUserId: string; + /** ListViewsRequest parent. */ + public parent: string; - /** Conversation metadata. */ - public metadata?: "callMetadata"; + /** ListViewsRequest pageSize. */ + public pageSize: number; - /** Conversation expiration. */ - public expiration?: ("expireTime"|"ttl"); + /** ListViewsRequest pageToken. */ + public pageToken: string; /** - * Creates a new Conversation instance using the specified properties. + * Creates a new ListViewsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Conversation instance + * @returns ListViewsRequest instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IConversation): google.cloud.contactcenterinsights.v1.Conversation; + public static create(properties?: google.cloud.contactcenterinsights.v1.IListViewsRequest): google.cloud.contactcenterinsights.v1.ListViewsRequest; /** - * Encodes the specified Conversation message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.verify|verify} messages. - * @param message Conversation message or plain object to encode + * Encodes the specified ListViewsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListViewsRequest.verify|verify} messages. + * @param message ListViewsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IConversation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IListViewsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Conversation message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.verify|verify} messages. - * @param message Conversation message or plain object to encode + * Encodes the specified ListViewsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListViewsRequest.verify|verify} messages. + * @param message ListViewsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IConversation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListViewsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Conversation message from the specified reader or buffer. + * Decodes a ListViewsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Conversation + * @returns ListViewsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Conversation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListViewsRequest; /** - * Decodes a Conversation message from the specified reader or buffer, length delimited. + * Decodes a ListViewsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Conversation + * @returns ListViewsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Conversation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListViewsRequest; /** - * Verifies a Conversation message. + * Verifies a ListViewsRequest message. * @param message Plain 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 Conversation message from a plain object. Also converts values to their respective internal types. + * Creates a ListViewsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Conversation + * @returns ListViewsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Conversation; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListViewsRequest; /** - * Creates a plain object from a Conversation message. Also converts values to other types if specified. - * @param message Conversation + * Creates a plain object from a ListViewsRequest message. Also converts values to other types if specified. + * @param message ListViewsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.Conversation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.ListViewsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Conversation to JSON. + * Converts this ListViewsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Conversation + * Gets the default type url for ListViewsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Conversation { + /** Properties of a ListViewsResponse. */ + interface IListViewsResponse { - /** Properties of a CallMetadata. */ - interface ICallMetadata { + /** ListViewsResponse views */ + views?: (google.cloud.contactcenterinsights.v1.IView[]|null); + + /** ListViewsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListViewsResponse. */ + class ListViewsResponse implements IListViewsResponse { + + /** + * Constructs a new ListViewsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IListViewsResponse); + + /** ListViewsResponse views. */ + public views: google.cloud.contactcenterinsights.v1.IView[]; + + /** ListViewsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListViewsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListViewsResponse instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IListViewsResponse): google.cloud.contactcenterinsights.v1.ListViewsResponse; + + /** + * Encodes the specified ListViewsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListViewsResponse.verify|verify} messages. + * @param message ListViewsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IListViewsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListViewsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListViewsResponse.verify|verify} messages. + * @param message ListViewsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListViewsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListViewsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListViewsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListViewsResponse; + + /** + * Decodes a ListViewsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListViewsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListViewsResponse; + + /** + * Verifies a ListViewsResponse message. + * @param message Plain 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 ListViewsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListViewsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListViewsResponse; + + /** + * Creates a plain object from a ListViewsResponse message. Also converts values to other types if specified. + * @param message ListViewsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ListViewsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListViewsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListViewsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateViewRequest. */ + interface IUpdateViewRequest { + + /** UpdateViewRequest view */ + view?: (google.cloud.contactcenterinsights.v1.IView|null); + + /** UpdateViewRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateViewRequest. */ + class UpdateViewRequest implements IUpdateViewRequest { + + /** + * Constructs a new UpdateViewRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IUpdateViewRequest); + + /** UpdateViewRequest view. */ + public view?: (google.cloud.contactcenterinsights.v1.IView|null); + + /** UpdateViewRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateViewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateViewRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IUpdateViewRequest): google.cloud.contactcenterinsights.v1.UpdateViewRequest; + + /** + * Encodes the specified UpdateViewRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateViewRequest.verify|verify} messages. + * @param message UpdateViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IUpdateViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateViewRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateViewRequest.verify|verify} messages. + * @param message UpdateViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IUpdateViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateViewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.UpdateViewRequest; + + /** + * Decodes an UpdateViewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.UpdateViewRequest; + + /** + * Verifies an UpdateViewRequest message. + * @param message Plain 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 UpdateViewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateViewRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.UpdateViewRequest; + + /** + * Creates a plain object from an UpdateViewRequest message. Also converts values to other types if specified. + * @param message UpdateViewRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.UpdateViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateViewRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateViewRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteViewRequest. */ + interface IDeleteViewRequest { + + /** DeleteViewRequest name */ + name?: (string|null); + } + + /** Represents a DeleteViewRequest. */ + class DeleteViewRequest implements IDeleteViewRequest { + + /** + * Constructs a new DeleteViewRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IDeleteViewRequest); + + /** DeleteViewRequest name. */ + public name: string; + + /** + * Creates a new DeleteViewRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteViewRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IDeleteViewRequest): google.cloud.contactcenterinsights.v1.DeleteViewRequest; + + /** + * Encodes the specified DeleteViewRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteViewRequest.verify|verify} messages. + * @param message DeleteViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IDeleteViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteViewRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteViewRequest.verify|verify} messages. + * @param message DeleteViewRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IDeleteViewRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteViewRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.DeleteViewRequest; + + /** + * Decodes a DeleteViewRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.DeleteViewRequest; + + /** + * Verifies a DeleteViewRequest message. + * @param message Plain 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 DeleteViewRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteViewRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.DeleteViewRequest; + + /** + * Creates a plain object from a DeleteViewRequest message. Also converts values to other types if specified. + * @param message DeleteViewRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.DeleteViewRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteViewRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteViewRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Dimension. */ + interface IDimension { + + /** Dimension issueDimensionMetadata */ + issueDimensionMetadata?: (google.cloud.contactcenterinsights.v1.Dimension.IIssueDimensionMetadata|null); + + /** Dimension agentDimensionMetadata */ + agentDimensionMetadata?: (google.cloud.contactcenterinsights.v1.Dimension.IAgentDimensionMetadata|null); + + /** Dimension qaQuestionDimensionMetadata */ + qaQuestionDimensionMetadata?: (google.cloud.contactcenterinsights.v1.Dimension.IQaQuestionDimensionMetadata|null); + + /** Dimension qaQuestionAnswerDimensionMetadata */ + qaQuestionAnswerDimensionMetadata?: (google.cloud.contactcenterinsights.v1.Dimension.IQaQuestionAnswerDimensionMetadata|null); + + /** Dimension dimensionKey */ + dimensionKey?: (google.cloud.contactcenterinsights.v1.Dimension.DimensionKey|keyof typeof google.cloud.contactcenterinsights.v1.Dimension.DimensionKey|null); + } + + /** Represents a Dimension. */ + class Dimension implements IDimension { + + /** + * Constructs a new Dimension. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IDimension); + + /** Dimension issueDimensionMetadata. */ + public issueDimensionMetadata?: (google.cloud.contactcenterinsights.v1.Dimension.IIssueDimensionMetadata|null); + + /** Dimension agentDimensionMetadata. */ + public agentDimensionMetadata?: (google.cloud.contactcenterinsights.v1.Dimension.IAgentDimensionMetadata|null); + + /** Dimension qaQuestionDimensionMetadata. */ + public qaQuestionDimensionMetadata?: (google.cloud.contactcenterinsights.v1.Dimension.IQaQuestionDimensionMetadata|null); + + /** Dimension qaQuestionAnswerDimensionMetadata. */ + public qaQuestionAnswerDimensionMetadata?: (google.cloud.contactcenterinsights.v1.Dimension.IQaQuestionAnswerDimensionMetadata|null); + + /** Dimension dimensionKey. */ + public dimensionKey: (google.cloud.contactcenterinsights.v1.Dimension.DimensionKey|keyof typeof google.cloud.contactcenterinsights.v1.Dimension.DimensionKey); + + /** Dimension dimensionMetadata. */ + public dimensionMetadata?: ("issueDimensionMetadata"|"agentDimensionMetadata"|"qaQuestionDimensionMetadata"|"qaQuestionAnswerDimensionMetadata"); + + /** + * Creates a new Dimension instance using the specified properties. + * @param [properties] Properties to set + * @returns Dimension instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IDimension): google.cloud.contactcenterinsights.v1.Dimension; + + /** + * Encodes the specified Dimension message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Dimension.verify|verify} messages. + * @param message Dimension message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IDimension, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Dimension message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Dimension.verify|verify} messages. + * @param message Dimension message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IDimension, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Dimension message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Dimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Dimension; + + /** + * Decodes a Dimension message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Dimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Dimension; + + /** + * Verifies a Dimension message. + * @param message Plain 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 Dimension message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Dimension + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Dimension; + + /** + * Creates a plain object from a Dimension message. Also converts values to other types if specified. + * @param message Dimension + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.Dimension, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Dimension to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Dimension + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Dimension { + + /** Properties of an IssueDimensionMetadata. */ + interface IIssueDimensionMetadata { + + /** IssueDimensionMetadata issueId */ + issueId?: (string|null); + + /** IssueDimensionMetadata issueDisplayName */ + issueDisplayName?: (string|null); + + /** IssueDimensionMetadata issueModelId */ + issueModelId?: (string|null); + } + + /** Represents an IssueDimensionMetadata. */ + class IssueDimensionMetadata implements IIssueDimensionMetadata { + + /** + * Constructs a new IssueDimensionMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.Dimension.IIssueDimensionMetadata); + + /** IssueDimensionMetadata issueId. */ + public issueId: string; + + /** IssueDimensionMetadata issueDisplayName. */ + public issueDisplayName: string; + + /** IssueDimensionMetadata issueModelId. */ + public issueModelId: string; + + /** + * Creates a new IssueDimensionMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns IssueDimensionMetadata instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.Dimension.IIssueDimensionMetadata): google.cloud.contactcenterinsights.v1.Dimension.IssueDimensionMetadata; + + /** + * Encodes the specified IssueDimensionMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Dimension.IssueDimensionMetadata.verify|verify} messages. + * @param message IssueDimensionMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.Dimension.IIssueDimensionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IssueDimensionMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Dimension.IssueDimensionMetadata.verify|verify} messages. + * @param message IssueDimensionMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.Dimension.IIssueDimensionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IssueDimensionMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IssueDimensionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Dimension.IssueDimensionMetadata; + + /** + * Decodes an IssueDimensionMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IssueDimensionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Dimension.IssueDimensionMetadata; + + /** + * Verifies an IssueDimensionMetadata message. + * @param message Plain 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 IssueDimensionMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IssueDimensionMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Dimension.IssueDimensionMetadata; + + /** + * Creates a plain object from an IssueDimensionMetadata message. Also converts values to other types if specified. + * @param message IssueDimensionMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.Dimension.IssueDimensionMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IssueDimensionMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IssueDimensionMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AgentDimensionMetadata. */ + interface IAgentDimensionMetadata { + + /** AgentDimensionMetadata agentId */ + agentId?: (string|null); + + /** AgentDimensionMetadata agentDisplayName */ + agentDisplayName?: (string|null); + + /** AgentDimensionMetadata agentTeam */ + agentTeam?: (string|null); + } + + /** Represents an AgentDimensionMetadata. */ + class AgentDimensionMetadata implements IAgentDimensionMetadata { + + /** + * Constructs a new AgentDimensionMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.Dimension.IAgentDimensionMetadata); + + /** AgentDimensionMetadata agentId. */ + public agentId: string; + + /** AgentDimensionMetadata agentDisplayName. */ + public agentDisplayName: string; + + /** AgentDimensionMetadata agentTeam. */ + public agentTeam: string; + + /** + * Creates a new AgentDimensionMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns AgentDimensionMetadata instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.Dimension.IAgentDimensionMetadata): google.cloud.contactcenterinsights.v1.Dimension.AgentDimensionMetadata; + + /** + * Encodes the specified AgentDimensionMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Dimension.AgentDimensionMetadata.verify|verify} messages. + * @param message AgentDimensionMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.Dimension.IAgentDimensionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AgentDimensionMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Dimension.AgentDimensionMetadata.verify|verify} messages. + * @param message AgentDimensionMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.Dimension.IAgentDimensionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AgentDimensionMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AgentDimensionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Dimension.AgentDimensionMetadata; + + /** + * Decodes an AgentDimensionMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AgentDimensionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Dimension.AgentDimensionMetadata; + + /** + * Verifies an AgentDimensionMetadata message. + * @param message Plain 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 AgentDimensionMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AgentDimensionMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Dimension.AgentDimensionMetadata; + + /** + * Creates a plain object from an AgentDimensionMetadata message. Also converts values to other types if specified. + * @param message AgentDimensionMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.Dimension.AgentDimensionMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AgentDimensionMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AgentDimensionMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QaQuestionDimensionMetadata. */ + interface IQaQuestionDimensionMetadata { + + /** QaQuestionDimensionMetadata qaScorecardId */ + qaScorecardId?: (string|null); + + /** QaQuestionDimensionMetadata qaQuestionId */ + qaQuestionId?: (string|null); + + /** QaQuestionDimensionMetadata questionBody */ + questionBody?: (string|null); + } + + /** Represents a QaQuestionDimensionMetadata. */ + class QaQuestionDimensionMetadata implements IQaQuestionDimensionMetadata { + + /** + * Constructs a new QaQuestionDimensionMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.Dimension.IQaQuestionDimensionMetadata); + + /** QaQuestionDimensionMetadata qaScorecardId. */ + public qaScorecardId: string; + + /** QaQuestionDimensionMetadata qaQuestionId. */ + public qaQuestionId: string; + + /** QaQuestionDimensionMetadata questionBody. */ + public questionBody: string; + + /** + * Creates a new QaQuestionDimensionMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns QaQuestionDimensionMetadata instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.Dimension.IQaQuestionDimensionMetadata): google.cloud.contactcenterinsights.v1.Dimension.QaQuestionDimensionMetadata; + + /** + * Encodes the specified QaQuestionDimensionMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Dimension.QaQuestionDimensionMetadata.verify|verify} messages. + * @param message QaQuestionDimensionMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.Dimension.IQaQuestionDimensionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QaQuestionDimensionMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Dimension.QaQuestionDimensionMetadata.verify|verify} messages. + * @param message QaQuestionDimensionMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.Dimension.IQaQuestionDimensionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QaQuestionDimensionMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QaQuestionDimensionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Dimension.QaQuestionDimensionMetadata; + + /** + * Decodes a QaQuestionDimensionMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QaQuestionDimensionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Dimension.QaQuestionDimensionMetadata; + + /** + * Verifies a QaQuestionDimensionMetadata message. + * @param message Plain 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 QaQuestionDimensionMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QaQuestionDimensionMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Dimension.QaQuestionDimensionMetadata; + + /** + * Creates a plain object from a QaQuestionDimensionMetadata message. Also converts values to other types if specified. + * @param message QaQuestionDimensionMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.Dimension.QaQuestionDimensionMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QaQuestionDimensionMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QaQuestionDimensionMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QaQuestionAnswerDimensionMetadata. */ + interface IQaQuestionAnswerDimensionMetadata { + + /** QaQuestionAnswerDimensionMetadata qaScorecardId */ + qaScorecardId?: (string|null); + + /** QaQuestionAnswerDimensionMetadata qaQuestionId */ + qaQuestionId?: (string|null); + + /** QaQuestionAnswerDimensionMetadata questionBody */ + questionBody?: (string|null); + + /** QaQuestionAnswerDimensionMetadata answerValue */ + answerValue?: (string|null); + } + + /** Represents a QaQuestionAnswerDimensionMetadata. */ + class QaQuestionAnswerDimensionMetadata implements IQaQuestionAnswerDimensionMetadata { + + /** + * Constructs a new QaQuestionAnswerDimensionMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.Dimension.IQaQuestionAnswerDimensionMetadata); + + /** QaQuestionAnswerDimensionMetadata qaScorecardId. */ + public qaScorecardId: string; + + /** QaQuestionAnswerDimensionMetadata qaQuestionId. */ + public qaQuestionId: string; + + /** QaQuestionAnswerDimensionMetadata questionBody. */ + public questionBody: string; + + /** QaQuestionAnswerDimensionMetadata answerValue. */ + public answerValue: string; + + /** + * Creates a new QaQuestionAnswerDimensionMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns QaQuestionAnswerDimensionMetadata instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.Dimension.IQaQuestionAnswerDimensionMetadata): google.cloud.contactcenterinsights.v1.Dimension.QaQuestionAnswerDimensionMetadata; + + /** + * Encodes the specified QaQuestionAnswerDimensionMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Dimension.QaQuestionAnswerDimensionMetadata.verify|verify} messages. + * @param message QaQuestionAnswerDimensionMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.Dimension.IQaQuestionAnswerDimensionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QaQuestionAnswerDimensionMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Dimension.QaQuestionAnswerDimensionMetadata.verify|verify} messages. + * @param message QaQuestionAnswerDimensionMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.Dimension.IQaQuestionAnswerDimensionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QaQuestionAnswerDimensionMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QaQuestionAnswerDimensionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Dimension.QaQuestionAnswerDimensionMetadata; + + /** + * Decodes a QaQuestionAnswerDimensionMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QaQuestionAnswerDimensionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Dimension.QaQuestionAnswerDimensionMetadata; + + /** + * Verifies a QaQuestionAnswerDimensionMetadata message. + * @param message Plain 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 QaQuestionAnswerDimensionMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QaQuestionAnswerDimensionMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Dimension.QaQuestionAnswerDimensionMetadata; + + /** + * Creates a plain object from a QaQuestionAnswerDimensionMetadata message. Also converts values to other types if specified. + * @param message QaQuestionAnswerDimensionMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.Dimension.QaQuestionAnswerDimensionMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QaQuestionAnswerDimensionMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QaQuestionAnswerDimensionMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** DimensionKey enum. */ + enum DimensionKey { + DIMENSION_KEY_UNSPECIFIED = 0, + ISSUE = 1, + AGENT = 2, + AGENT_TEAM = 3, + QA_QUESTION_ID = 4, + QA_QUESTION_ANSWER_VALUE = 5, + CONVERSATION_PROFILE_ID = 6 + } + } + + /** Properties of a QueryMetricsRequest. */ + interface IQueryMetricsRequest { + + /** QueryMetricsRequest location */ + location?: (string|null); + + /** QueryMetricsRequest filter */ + filter?: (string|null); + + /** QueryMetricsRequest timeGranularity */ + timeGranularity?: (google.cloud.contactcenterinsights.v1.QueryMetricsRequest.TimeGranularity|keyof typeof google.cloud.contactcenterinsights.v1.QueryMetricsRequest.TimeGranularity|null); + + /** QueryMetricsRequest dimensions */ + dimensions?: (google.cloud.contactcenterinsights.v1.IDimension[]|null); + + /** QueryMetricsRequest measureMask */ + measureMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents a QueryMetricsRequest. */ + class QueryMetricsRequest implements IQueryMetricsRequest { + + /** + * Constructs a new QueryMetricsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IQueryMetricsRequest); + + /** QueryMetricsRequest location. */ + public location: string; + + /** QueryMetricsRequest filter. */ + public filter: string; + + /** QueryMetricsRequest timeGranularity. */ + public timeGranularity: (google.cloud.contactcenterinsights.v1.QueryMetricsRequest.TimeGranularity|keyof typeof google.cloud.contactcenterinsights.v1.QueryMetricsRequest.TimeGranularity); + + /** QueryMetricsRequest dimensions. */ + public dimensions: google.cloud.contactcenterinsights.v1.IDimension[]; + + /** QueryMetricsRequest measureMask. */ + public measureMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new QueryMetricsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryMetricsRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IQueryMetricsRequest): google.cloud.contactcenterinsights.v1.QueryMetricsRequest; + + /** + * Encodes the specified QueryMetricsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QueryMetricsRequest.verify|verify} messages. + * @param message QueryMetricsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IQueryMetricsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryMetricsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QueryMetricsRequest.verify|verify} messages. + * @param message QueryMetricsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IQueryMetricsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryMetricsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryMetricsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.QueryMetricsRequest; + + /** + * Decodes a QueryMetricsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryMetricsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.QueryMetricsRequest; + + /** + * Verifies a QueryMetricsRequest message. + * @param message Plain 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 QueryMetricsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryMetricsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.QueryMetricsRequest; + + /** + * Creates a plain object from a QueryMetricsRequest message. Also converts values to other types if specified. + * @param message QueryMetricsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.QueryMetricsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryMetricsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryMetricsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace QueryMetricsRequest { + + /** TimeGranularity enum. */ + enum TimeGranularity { + TIME_GRANULARITY_UNSPECIFIED = 0, + NONE = 1, + DAILY = 2, + HOURLY = 3, + PER_MINUTE = 4, + PER_5_MINUTES = 5, + MONTHLY = 6 + } + } + + /** Properties of a QueryMetricsResponse. */ + interface IQueryMetricsResponse { + + /** QueryMetricsResponse location */ + location?: (string|null); + + /** QueryMetricsResponse updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** QueryMetricsResponse slices */ + slices?: (google.cloud.contactcenterinsights.v1.QueryMetricsResponse.ISlice[]|null); + + /** QueryMetricsResponse macroAverageSlice */ + macroAverageSlice?: (google.cloud.contactcenterinsights.v1.QueryMetricsResponse.ISlice|null); + } + + /** Represents a QueryMetricsResponse. */ + class QueryMetricsResponse implements IQueryMetricsResponse { + + /** + * Constructs a new QueryMetricsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IQueryMetricsResponse); + + /** QueryMetricsResponse location. */ + public location: string; + + /** QueryMetricsResponse updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** QueryMetricsResponse slices. */ + public slices: google.cloud.contactcenterinsights.v1.QueryMetricsResponse.ISlice[]; + + /** QueryMetricsResponse macroAverageSlice. */ + public macroAverageSlice?: (google.cloud.contactcenterinsights.v1.QueryMetricsResponse.ISlice|null); + + /** QueryMetricsResponse _macroAverageSlice. */ + public _macroAverageSlice?: "macroAverageSlice"; + + /** + * Creates a new QueryMetricsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryMetricsResponse instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IQueryMetricsResponse): google.cloud.contactcenterinsights.v1.QueryMetricsResponse; + + /** + * Encodes the specified QueryMetricsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QueryMetricsResponse.verify|verify} messages. + * @param message QueryMetricsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IQueryMetricsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryMetricsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QueryMetricsResponse.verify|verify} messages. + * @param message QueryMetricsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IQueryMetricsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryMetricsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryMetricsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.QueryMetricsResponse; + + /** + * Decodes a QueryMetricsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryMetricsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.QueryMetricsResponse; + + /** + * Verifies a QueryMetricsResponse message. + * @param message Plain 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 QueryMetricsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryMetricsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.QueryMetricsResponse; + + /** + * Creates a plain object from a QueryMetricsResponse message. Also converts values to other types if specified. + * @param message QueryMetricsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.QueryMetricsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryMetricsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryMetricsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace QueryMetricsResponse { + + /** Properties of a Slice. */ + interface ISlice { + + /** Slice dimensions */ + dimensions?: (google.cloud.contactcenterinsights.v1.IDimension[]|null); + + /** Slice total */ + total?: (google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.IDataPoint|null); + + /** Slice timeSeries */ + timeSeries?: (google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.ITimeSeries|null); + } + + /** Represents a Slice. */ + class Slice implements ISlice { + + /** + * Constructs a new Slice. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.QueryMetricsResponse.ISlice); + + /** Slice dimensions. */ + public dimensions: google.cloud.contactcenterinsights.v1.IDimension[]; + + /** Slice total. */ + public total?: (google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.IDataPoint|null); + + /** Slice timeSeries. */ + public timeSeries?: (google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.ITimeSeries|null); + + /** + * Creates a new Slice instance using the specified properties. + * @param [properties] Properties to set + * @returns Slice instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.QueryMetricsResponse.ISlice): google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice; + + /** + * Encodes the specified Slice message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.verify|verify} messages. + * @param message Slice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.QueryMetricsResponse.ISlice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Slice message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.verify|verify} messages. + * @param message Slice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.QueryMetricsResponse.ISlice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Slice message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Slice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice; + + /** + * Decodes a Slice message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Slice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice; + + /** + * Verifies a Slice message. + * @param message Plain 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 Slice message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Slice + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice; + + /** + * Creates a plain object from a Slice message. Also converts values to other types if specified. + * @param message Slice + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Slice to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Slice + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Slice { + + /** Properties of a DataPoint. */ + interface IDataPoint { + + /** DataPoint conversationMeasure */ + conversationMeasure?: (google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.IConversationMeasure|null); + + /** DataPoint interval */ + interval?: (google.type.IInterval|null); + } + + /** Represents a DataPoint. */ + class DataPoint implements IDataPoint { + + /** + * Constructs a new DataPoint. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.IDataPoint); + + /** DataPoint conversationMeasure. */ + public conversationMeasure?: (google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.IConversationMeasure|null); + + /** DataPoint interval. */ + public interval?: (google.type.IInterval|null); + + /** DataPoint measure. */ + public measure?: "conversationMeasure"; + + /** + * Creates a new DataPoint instance using the specified properties. + * @param [properties] Properties to set + * @returns DataPoint instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.IDataPoint): google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint; + + /** + * Encodes the specified DataPoint message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.verify|verify} messages. + * @param message DataPoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.IDataPoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataPoint message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.verify|verify} messages. + * @param message DataPoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.IDataPoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataPoint message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataPoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint; + + /** + * Decodes a DataPoint message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataPoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint; + + /** + * Verifies a DataPoint message. + * @param message Plain 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 DataPoint message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataPoint + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint; + + /** + * Creates a plain object from a DataPoint message. Also converts values to other types if specified. + * @param message DataPoint + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataPoint to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataPoint + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataPoint { + + /** Properties of a ConversationMeasure. */ + interface IConversationMeasure { + + /** ConversationMeasure conversationCount */ + conversationCount?: (number|null); + + /** ConversationMeasure averageSilencePercentage */ + averageSilencePercentage?: (number|null); + + /** ConversationMeasure averageDuration */ + averageDuration?: (google.protobuf.IDuration|null); + + /** ConversationMeasure averageTurnCount */ + averageTurnCount?: (number|null); + + /** ConversationMeasure averageAgentSentimentScore */ + averageAgentSentimentScore?: (number|null); + + /** ConversationMeasure averageClientSentimentScore */ + averageClientSentimentScore?: (number|null); + + /** ConversationMeasure averageCustomerSatisfactionRating */ + averageCustomerSatisfactionRating?: (number|null); + + /** ConversationMeasure averageQaNormalizedScore */ + averageQaNormalizedScore?: (number|null); + + /** ConversationMeasure qaTagScores */ + qaTagScores?: (google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.IQaTagScore[]|null); + + /** ConversationMeasure averageQaQuestionNormalizedScore */ + averageQaQuestionNormalizedScore?: (number|null); + } + + /** Represents a ConversationMeasure. */ + class ConversationMeasure implements IConversationMeasure { + + /** + * Constructs a new ConversationMeasure. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.IConversationMeasure); + + /** ConversationMeasure conversationCount. */ + public conversationCount?: (number|null); + + /** ConversationMeasure averageSilencePercentage. */ + public averageSilencePercentage?: (number|null); + + /** ConversationMeasure averageDuration. */ + public averageDuration?: (google.protobuf.IDuration|null); + + /** ConversationMeasure averageTurnCount. */ + public averageTurnCount?: (number|null); + + /** ConversationMeasure averageAgentSentimentScore. */ + public averageAgentSentimentScore?: (number|null); + + /** ConversationMeasure averageClientSentimentScore. */ + public averageClientSentimentScore?: (number|null); + + /** ConversationMeasure averageCustomerSatisfactionRating. */ + public averageCustomerSatisfactionRating?: (number|null); + + /** ConversationMeasure averageQaNormalizedScore. */ + public averageQaNormalizedScore?: (number|null); + + /** ConversationMeasure qaTagScores. */ + public qaTagScores: google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.IQaTagScore[]; + + /** ConversationMeasure averageQaQuestionNormalizedScore. */ + public averageQaQuestionNormalizedScore?: (number|null); + + /** ConversationMeasure _conversationCount. */ + public _conversationCount?: "conversationCount"; + + /** ConversationMeasure _averageSilencePercentage. */ + public _averageSilencePercentage?: "averageSilencePercentage"; + + /** ConversationMeasure _averageDuration. */ + public _averageDuration?: "averageDuration"; + + /** ConversationMeasure _averageTurnCount. */ + public _averageTurnCount?: "averageTurnCount"; + + /** ConversationMeasure _averageAgentSentimentScore. */ + public _averageAgentSentimentScore?: "averageAgentSentimentScore"; + + /** ConversationMeasure _averageClientSentimentScore. */ + public _averageClientSentimentScore?: "averageClientSentimentScore"; + + /** ConversationMeasure _averageCustomerSatisfactionRating. */ + public _averageCustomerSatisfactionRating?: "averageCustomerSatisfactionRating"; + + /** ConversationMeasure _averageQaNormalizedScore. */ + public _averageQaNormalizedScore?: "averageQaNormalizedScore"; + + /** ConversationMeasure _averageQaQuestionNormalizedScore. */ + public _averageQaQuestionNormalizedScore?: "averageQaQuestionNormalizedScore"; + + /** + * Creates a new ConversationMeasure instance using the specified properties. + * @param [properties] Properties to set + * @returns ConversationMeasure instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.IConversationMeasure): google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure; + + /** + * Encodes the specified ConversationMeasure message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.verify|verify} messages. + * @param message ConversationMeasure message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.IConversationMeasure, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConversationMeasure message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.verify|verify} messages. + * @param message ConversationMeasure message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.IConversationMeasure, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConversationMeasure message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConversationMeasure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure; + + /** + * Decodes a ConversationMeasure message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConversationMeasure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure; + + /** + * Verifies a ConversationMeasure message. + * @param message Plain 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 ConversationMeasure message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConversationMeasure + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure; + + /** + * Creates a plain object from a ConversationMeasure message. Also converts values to other types if specified. + * @param message ConversationMeasure + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConversationMeasure to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConversationMeasure + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ConversationMeasure { + + /** Properties of a QaTagScore. */ + interface IQaTagScore { + + /** QaTagScore tag */ + tag?: (string|null); + + /** QaTagScore averageTagNormalizedScore */ + averageTagNormalizedScore?: (number|null); + } + + /** Represents a QaTagScore. */ + class QaTagScore implements IQaTagScore { + + /** + * Constructs a new QaTagScore. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.IQaTagScore); + + /** QaTagScore tag. */ + public tag: string; + + /** QaTagScore averageTagNormalizedScore. */ + public averageTagNormalizedScore: number; + + /** + * Creates a new QaTagScore instance using the specified properties. + * @param [properties] Properties to set + * @returns QaTagScore instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.IQaTagScore): google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.QaTagScore; + + /** + * Encodes the specified QaTagScore message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.QaTagScore.verify|verify} messages. + * @param message QaTagScore message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.IQaTagScore, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QaTagScore message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.QaTagScore.verify|verify} messages. + * @param message QaTagScore message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.IQaTagScore, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QaTagScore message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QaTagScore + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.QaTagScore; + + /** + * Decodes a QaTagScore message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QaTagScore + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.QaTagScore; + + /** + * Verifies a QaTagScore message. + * @param message Plain 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 QaTagScore message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QaTagScore + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.QaTagScore; + + /** + * Creates a plain object from a QaTagScore message. Also converts values to other types if specified. + * @param message QaTagScore + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.QaTagScore, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QaTagScore to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QaTagScore + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of a TimeSeries. */ + interface ITimeSeries { + + /** TimeSeries dataPoints */ + dataPoints?: (google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.IDataPoint[]|null); + } + + /** Represents a TimeSeries. */ + class TimeSeries implements ITimeSeries { + + /** + * Constructs a new TimeSeries. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.ITimeSeries); + + /** TimeSeries dataPoints. */ + public dataPoints: google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.IDataPoint[]; + + /** + * Creates a new TimeSeries instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeSeries instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.ITimeSeries): google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.TimeSeries; + + /** + * Encodes the specified TimeSeries message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.TimeSeries.verify|verify} messages. + * @param message TimeSeries message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.ITimeSeries, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeSeries message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.TimeSeries.verify|verify} messages. + * @param message TimeSeries message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.ITimeSeries, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeSeries message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeSeries + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.TimeSeries; + + /** + * Decodes a TimeSeries message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeSeries + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.TimeSeries; + + /** + * Verifies a TimeSeries message. + * @param message Plain 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 TimeSeries message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeSeries + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.TimeSeries; + + /** + * Creates a plain object from a TimeSeries message. Also converts values to other types if specified. + * @param message TimeSeries + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.TimeSeries, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeSeries to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimeSeries + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of a QueryMetricsMetadata. */ + interface IQueryMetricsMetadata { + } + + /** Represents a QueryMetricsMetadata. */ + class QueryMetricsMetadata implements IQueryMetricsMetadata { + + /** + * Constructs a new QueryMetricsMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IQueryMetricsMetadata); + + /** + * Creates a new QueryMetricsMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryMetricsMetadata instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IQueryMetricsMetadata): google.cloud.contactcenterinsights.v1.QueryMetricsMetadata; + + /** + * Encodes the specified QueryMetricsMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QueryMetricsMetadata.verify|verify} messages. + * @param message QueryMetricsMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IQueryMetricsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryMetricsMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QueryMetricsMetadata.verify|verify} messages. + * @param message QueryMetricsMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IQueryMetricsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryMetricsMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryMetricsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.QueryMetricsMetadata; + + /** + * Decodes a QueryMetricsMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryMetricsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.QueryMetricsMetadata; + + /** + * Verifies a QueryMetricsMetadata message. + * @param message Plain 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 QueryMetricsMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryMetricsMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.QueryMetricsMetadata; + + /** + * Creates a plain object from a QueryMetricsMetadata message. Also converts values to other types if specified. + * @param message QueryMetricsMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.QueryMetricsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryMetricsMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryMetricsMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateQaQuestionRequest. */ + interface ICreateQaQuestionRequest { + + /** CreateQaQuestionRequest parent */ + parent?: (string|null); + + /** CreateQaQuestionRequest qaQuestion */ + qaQuestion?: (google.cloud.contactcenterinsights.v1.IQaQuestion|null); + + /** CreateQaQuestionRequest qaQuestionId */ + qaQuestionId?: (string|null); + } + + /** Represents a CreateQaQuestionRequest. */ + class CreateQaQuestionRequest implements ICreateQaQuestionRequest { + + /** + * Constructs a new CreateQaQuestionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.ICreateQaQuestionRequest); + + /** CreateQaQuestionRequest parent. */ + public parent: string; + + /** CreateQaQuestionRequest qaQuestion. */ + public qaQuestion?: (google.cloud.contactcenterinsights.v1.IQaQuestion|null); + + /** CreateQaQuestionRequest qaQuestionId. */ + public qaQuestionId: string; + + /** + * Creates a new CreateQaQuestionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateQaQuestionRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.ICreateQaQuestionRequest): google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest; + + /** + * Encodes the specified CreateQaQuestionRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest.verify|verify} messages. + * @param message CreateQaQuestionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.ICreateQaQuestionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateQaQuestionRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest.verify|verify} messages. + * @param message CreateQaQuestionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ICreateQaQuestionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateQaQuestionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateQaQuestionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest; + + /** + * Decodes a CreateQaQuestionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateQaQuestionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest; + + /** + * Verifies a CreateQaQuestionRequest message. + * @param message Plain 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 CreateQaQuestionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateQaQuestionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest; + + /** + * Creates a plain object from a CreateQaQuestionRequest message. Also converts values to other types if specified. + * @param message CreateQaQuestionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateQaQuestionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateQaQuestionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetQaQuestionRequest. */ + interface IGetQaQuestionRequest { + + /** GetQaQuestionRequest name */ + name?: (string|null); + } + + /** Represents a GetQaQuestionRequest. */ + class GetQaQuestionRequest implements IGetQaQuestionRequest { + + /** + * Constructs a new GetQaQuestionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IGetQaQuestionRequest); + + /** GetQaQuestionRequest name. */ + public name: string; + + /** + * Creates a new GetQaQuestionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetQaQuestionRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IGetQaQuestionRequest): google.cloud.contactcenterinsights.v1.GetQaQuestionRequest; + + /** + * Encodes the specified GetQaQuestionRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetQaQuestionRequest.verify|verify} messages. + * @param message GetQaQuestionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IGetQaQuestionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetQaQuestionRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetQaQuestionRequest.verify|verify} messages. + * @param message GetQaQuestionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IGetQaQuestionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetQaQuestionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetQaQuestionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.GetQaQuestionRequest; + + /** + * Decodes a GetQaQuestionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetQaQuestionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.GetQaQuestionRequest; + + /** + * Verifies a GetQaQuestionRequest message. + * @param message Plain 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 GetQaQuestionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetQaQuestionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.GetQaQuestionRequest; + + /** + * Creates a plain object from a GetQaQuestionRequest message. Also converts values to other types if specified. + * @param message GetQaQuestionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.GetQaQuestionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetQaQuestionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetQaQuestionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListQaQuestionsRequest. */ + interface IListQaQuestionsRequest { + + /** ListQaQuestionsRequest parent */ + parent?: (string|null); + + /** ListQaQuestionsRequest pageSize */ + pageSize?: (number|null); + + /** ListQaQuestionsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListQaQuestionsRequest. */ + class ListQaQuestionsRequest implements IListQaQuestionsRequest { + + /** + * Constructs a new ListQaQuestionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IListQaQuestionsRequest); + + /** ListQaQuestionsRequest parent. */ + public parent: string; + + /** ListQaQuestionsRequest pageSize. */ + public pageSize: number; + + /** ListQaQuestionsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListQaQuestionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListQaQuestionsRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IListQaQuestionsRequest): google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest; + + /** + * Encodes the specified ListQaQuestionsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest.verify|verify} messages. + * @param message ListQaQuestionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IListQaQuestionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListQaQuestionsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest.verify|verify} messages. + * @param message ListQaQuestionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListQaQuestionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListQaQuestionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListQaQuestionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest; + + /** + * Decodes a ListQaQuestionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListQaQuestionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest; + + /** + * Verifies a ListQaQuestionsRequest message. + * @param message Plain 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 ListQaQuestionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListQaQuestionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest; + + /** + * Creates a plain object from a ListQaQuestionsRequest message. Also converts values to other types if specified. + * @param message ListQaQuestionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListQaQuestionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListQaQuestionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListQaQuestionsResponse. */ + interface IListQaQuestionsResponse { + + /** ListQaQuestionsResponse qaQuestions */ + qaQuestions?: (google.cloud.contactcenterinsights.v1.IQaQuestion[]|null); + + /** ListQaQuestionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListQaQuestionsResponse. */ + class ListQaQuestionsResponse implements IListQaQuestionsResponse { + + /** + * Constructs a new ListQaQuestionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IListQaQuestionsResponse); + + /** ListQaQuestionsResponse qaQuestions. */ + public qaQuestions: google.cloud.contactcenterinsights.v1.IQaQuestion[]; + + /** ListQaQuestionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListQaQuestionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListQaQuestionsResponse instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IListQaQuestionsResponse): google.cloud.contactcenterinsights.v1.ListQaQuestionsResponse; + + /** + * Encodes the specified ListQaQuestionsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListQaQuestionsResponse.verify|verify} messages. + * @param message ListQaQuestionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IListQaQuestionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListQaQuestionsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListQaQuestionsResponse.verify|verify} messages. + * @param message ListQaQuestionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListQaQuestionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListQaQuestionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListQaQuestionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListQaQuestionsResponse; + + /** + * Decodes a ListQaQuestionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListQaQuestionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListQaQuestionsResponse; + + /** + * Verifies a ListQaQuestionsResponse message. + * @param message Plain 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 ListQaQuestionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListQaQuestionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListQaQuestionsResponse; + + /** + * Creates a plain object from a ListQaQuestionsResponse message. Also converts values to other types if specified. + * @param message ListQaQuestionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ListQaQuestionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListQaQuestionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListQaQuestionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateQaQuestionRequest. */ + interface IUpdateQaQuestionRequest { + + /** UpdateQaQuestionRequest qaQuestion */ + qaQuestion?: (google.cloud.contactcenterinsights.v1.IQaQuestion|null); + + /** UpdateQaQuestionRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateQaQuestionRequest. */ + class UpdateQaQuestionRequest implements IUpdateQaQuestionRequest { + + /** + * Constructs a new UpdateQaQuestionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IUpdateQaQuestionRequest); + + /** UpdateQaQuestionRequest qaQuestion. */ + public qaQuestion?: (google.cloud.contactcenterinsights.v1.IQaQuestion|null); + + /** UpdateQaQuestionRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateQaQuestionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateQaQuestionRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IUpdateQaQuestionRequest): google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest; + + /** + * Encodes the specified UpdateQaQuestionRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest.verify|verify} messages. + * @param message UpdateQaQuestionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IUpdateQaQuestionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateQaQuestionRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest.verify|verify} messages. + * @param message UpdateQaQuestionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IUpdateQaQuestionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateQaQuestionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateQaQuestionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest; + + /** + * Decodes an UpdateQaQuestionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateQaQuestionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest; + + /** + * Verifies an UpdateQaQuestionRequest message. + * @param message Plain 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 UpdateQaQuestionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateQaQuestionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest; + + /** + * Creates a plain object from an UpdateQaQuestionRequest message. Also converts values to other types if specified. + * @param message UpdateQaQuestionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateQaQuestionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateQaQuestionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteQaQuestionRequest. */ + interface IDeleteQaQuestionRequest { + + /** DeleteQaQuestionRequest name */ + name?: (string|null); + } + + /** Represents a DeleteQaQuestionRequest. */ + class DeleteQaQuestionRequest implements IDeleteQaQuestionRequest { + + /** + * Constructs a new DeleteQaQuestionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IDeleteQaQuestionRequest); + + /** DeleteQaQuestionRequest name. */ + public name: string; + + /** + * Creates a new DeleteQaQuestionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteQaQuestionRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IDeleteQaQuestionRequest): google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest; + + /** + * Encodes the specified DeleteQaQuestionRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest.verify|verify} messages. + * @param message DeleteQaQuestionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IDeleteQaQuestionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteQaQuestionRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest.verify|verify} messages. + * @param message DeleteQaQuestionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IDeleteQaQuestionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteQaQuestionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteQaQuestionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest; + + /** + * Decodes a DeleteQaQuestionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteQaQuestionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest; + + /** + * Verifies a DeleteQaQuestionRequest message. + * @param message Plain 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 DeleteQaQuestionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteQaQuestionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest; + + /** + * Creates a plain object from a DeleteQaQuestionRequest message. Also converts values to other types if specified. + * @param message DeleteQaQuestionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteQaQuestionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteQaQuestionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateQaScorecardRequest. */ + interface ICreateQaScorecardRequest { + + /** CreateQaScorecardRequest parent */ + parent?: (string|null); + + /** CreateQaScorecardRequest qaScorecard */ + qaScorecard?: (google.cloud.contactcenterinsights.v1.IQaScorecard|null); + + /** CreateQaScorecardRequest qaScorecardId */ + qaScorecardId?: (string|null); + } + + /** Represents a CreateQaScorecardRequest. */ + class CreateQaScorecardRequest implements ICreateQaScorecardRequest { + + /** + * Constructs a new CreateQaScorecardRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.ICreateQaScorecardRequest); + + /** CreateQaScorecardRequest parent. */ + public parent: string; + + /** CreateQaScorecardRequest qaScorecard. */ + public qaScorecard?: (google.cloud.contactcenterinsights.v1.IQaScorecard|null); + + /** CreateQaScorecardRequest qaScorecardId. */ + public qaScorecardId: string; + + /** + * Creates a new CreateQaScorecardRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateQaScorecardRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.ICreateQaScorecardRequest): google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest; + + /** + * Encodes the specified CreateQaScorecardRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest.verify|verify} messages. + * @param message CreateQaScorecardRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.ICreateQaScorecardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateQaScorecardRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest.verify|verify} messages. + * @param message CreateQaScorecardRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ICreateQaScorecardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateQaScorecardRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateQaScorecardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest; + + /** + * Decodes a CreateQaScorecardRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateQaScorecardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest; + + /** + * Verifies a CreateQaScorecardRequest message. + * @param message Plain 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 CreateQaScorecardRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateQaScorecardRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest; + + /** + * Creates a plain object from a CreateQaScorecardRequest message. Also converts values to other types if specified. + * @param message CreateQaScorecardRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateQaScorecardRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateQaScorecardRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetQaScorecardRequest. */ + interface IGetQaScorecardRequest { + + /** GetQaScorecardRequest name */ + name?: (string|null); + } + + /** Represents a GetQaScorecardRequest. */ + class GetQaScorecardRequest implements IGetQaScorecardRequest { + + /** + * Constructs a new GetQaScorecardRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IGetQaScorecardRequest); + + /** GetQaScorecardRequest name. */ + public name: string; + + /** + * Creates a new GetQaScorecardRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetQaScorecardRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IGetQaScorecardRequest): google.cloud.contactcenterinsights.v1.GetQaScorecardRequest; + + /** + * Encodes the specified GetQaScorecardRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetQaScorecardRequest.verify|verify} messages. + * @param message GetQaScorecardRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IGetQaScorecardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetQaScorecardRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetQaScorecardRequest.verify|verify} messages. + * @param message GetQaScorecardRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IGetQaScorecardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetQaScorecardRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetQaScorecardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.GetQaScorecardRequest; + + /** + * Decodes a GetQaScorecardRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetQaScorecardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.GetQaScorecardRequest; + + /** + * Verifies a GetQaScorecardRequest message. + * @param message Plain 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 GetQaScorecardRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetQaScorecardRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.GetQaScorecardRequest; + + /** + * Creates a plain object from a GetQaScorecardRequest message. Also converts values to other types if specified. + * @param message GetQaScorecardRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.GetQaScorecardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetQaScorecardRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetQaScorecardRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateQaScorecardRequest. */ + interface IUpdateQaScorecardRequest { + + /** UpdateQaScorecardRequest qaScorecard */ + qaScorecard?: (google.cloud.contactcenterinsights.v1.IQaScorecard|null); + + /** UpdateQaScorecardRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateQaScorecardRequest. */ + class UpdateQaScorecardRequest implements IUpdateQaScorecardRequest { + + /** + * Constructs a new UpdateQaScorecardRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IUpdateQaScorecardRequest); + + /** UpdateQaScorecardRequest qaScorecard. */ + public qaScorecard?: (google.cloud.contactcenterinsights.v1.IQaScorecard|null); + + /** UpdateQaScorecardRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateQaScorecardRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateQaScorecardRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IUpdateQaScorecardRequest): google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest; + + /** + * Encodes the specified UpdateQaScorecardRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest.verify|verify} messages. + * @param message UpdateQaScorecardRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IUpdateQaScorecardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateQaScorecardRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest.verify|verify} messages. + * @param message UpdateQaScorecardRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IUpdateQaScorecardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateQaScorecardRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateQaScorecardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest; + + /** + * Decodes an UpdateQaScorecardRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateQaScorecardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest; + + /** + * Verifies an UpdateQaScorecardRequest message. + * @param message Plain 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 UpdateQaScorecardRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateQaScorecardRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest; + + /** + * Creates a plain object from an UpdateQaScorecardRequest message. Also converts values to other types if specified. + * @param message UpdateQaScorecardRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateQaScorecardRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateQaScorecardRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteQaScorecardRequest. */ + interface IDeleteQaScorecardRequest { + + /** DeleteQaScorecardRequest name */ + name?: (string|null); + + /** DeleteQaScorecardRequest force */ + force?: (boolean|null); + } + + /** Represents a DeleteQaScorecardRequest. */ + class DeleteQaScorecardRequest implements IDeleteQaScorecardRequest { + + /** + * Constructs a new DeleteQaScorecardRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRequest); + + /** DeleteQaScorecardRequest name. */ + public name: string; + + /** DeleteQaScorecardRequest force. */ + public force: boolean; + + /** + * Creates a new DeleteQaScorecardRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteQaScorecardRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRequest): google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest; + + /** + * Encodes the specified DeleteQaScorecardRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest.verify|verify} messages. + * @param message DeleteQaScorecardRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteQaScorecardRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest.verify|verify} messages. + * @param message DeleteQaScorecardRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteQaScorecardRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteQaScorecardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest; + + /** + * Decodes a DeleteQaScorecardRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteQaScorecardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest; + + /** + * Verifies a DeleteQaScorecardRequest message. + * @param message Plain 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 DeleteQaScorecardRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteQaScorecardRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest; + + /** + * Creates a plain object from a DeleteQaScorecardRequest message. Also converts values to other types if specified. + * @param message DeleteQaScorecardRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteQaScorecardRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteQaScorecardRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateQaScorecardRevisionRequest. */ + interface ICreateQaScorecardRevisionRequest { + + /** CreateQaScorecardRevisionRequest parent */ + parent?: (string|null); + + /** CreateQaScorecardRevisionRequest qaScorecardRevision */ + qaScorecardRevision?: (google.cloud.contactcenterinsights.v1.IQaScorecardRevision|null); + + /** CreateQaScorecardRevisionRequest qaScorecardRevisionId */ + qaScorecardRevisionId?: (string|null); + } + + /** Represents a CreateQaScorecardRevisionRequest. */ + class CreateQaScorecardRevisionRequest implements ICreateQaScorecardRevisionRequest { + + /** + * Constructs a new CreateQaScorecardRevisionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.ICreateQaScorecardRevisionRequest); + + /** CreateQaScorecardRevisionRequest parent. */ + public parent: string; + + /** CreateQaScorecardRevisionRequest qaScorecardRevision. */ + public qaScorecardRevision?: (google.cloud.contactcenterinsights.v1.IQaScorecardRevision|null); + + /** CreateQaScorecardRevisionRequest qaScorecardRevisionId. */ + public qaScorecardRevisionId: string; + + /** + * Creates a new CreateQaScorecardRevisionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateQaScorecardRevisionRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.ICreateQaScorecardRevisionRequest): google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest; + + /** + * Encodes the specified CreateQaScorecardRevisionRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest.verify|verify} messages. + * @param message CreateQaScorecardRevisionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.ICreateQaScorecardRevisionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateQaScorecardRevisionRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest.verify|verify} messages. + * @param message CreateQaScorecardRevisionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ICreateQaScorecardRevisionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateQaScorecardRevisionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateQaScorecardRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest; + + /** + * Decodes a CreateQaScorecardRevisionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateQaScorecardRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest; + + /** + * Verifies a CreateQaScorecardRevisionRequest message. + * @param message Plain 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 CreateQaScorecardRevisionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateQaScorecardRevisionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest; + + /** + * Creates a plain object from a CreateQaScorecardRevisionRequest message. Also converts values to other types if specified. + * @param message CreateQaScorecardRevisionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateQaScorecardRevisionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateQaScorecardRevisionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetQaScorecardRevisionRequest. */ + interface IGetQaScorecardRevisionRequest { + + /** GetQaScorecardRevisionRequest name */ + name?: (string|null); + } + + /** Represents a GetQaScorecardRevisionRequest. */ + class GetQaScorecardRevisionRequest implements IGetQaScorecardRevisionRequest { + + /** + * Constructs a new GetQaScorecardRevisionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IGetQaScorecardRevisionRequest); + + /** GetQaScorecardRevisionRequest name. */ + public name: string; + + /** + * Creates a new GetQaScorecardRevisionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetQaScorecardRevisionRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IGetQaScorecardRevisionRequest): google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest; + + /** + * Encodes the specified GetQaScorecardRevisionRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest.verify|verify} messages. + * @param message GetQaScorecardRevisionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IGetQaScorecardRevisionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetQaScorecardRevisionRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest.verify|verify} messages. + * @param message GetQaScorecardRevisionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IGetQaScorecardRevisionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetQaScorecardRevisionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetQaScorecardRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest; + + /** + * Decodes a GetQaScorecardRevisionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetQaScorecardRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest; + + /** + * Verifies a GetQaScorecardRevisionRequest message. + * @param message Plain 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 GetQaScorecardRevisionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetQaScorecardRevisionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest; + + /** + * Creates a plain object from a GetQaScorecardRevisionRequest message. Also converts values to other types if specified. + * @param message GetQaScorecardRevisionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetQaScorecardRevisionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetQaScorecardRevisionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TuneQaScorecardRevisionRequest. */ + interface ITuneQaScorecardRevisionRequest { + + /** TuneQaScorecardRevisionRequest parent */ + parent?: (string|null); + + /** TuneQaScorecardRevisionRequest filter */ + filter?: (string|null); + + /** TuneQaScorecardRevisionRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a TuneQaScorecardRevisionRequest. */ + class TuneQaScorecardRevisionRequest implements ITuneQaScorecardRevisionRequest { + + /** + * Constructs a new TuneQaScorecardRevisionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionRequest); + + /** TuneQaScorecardRevisionRequest parent. */ + public parent: string; + + /** TuneQaScorecardRevisionRequest filter. */ + public filter: string; + + /** TuneQaScorecardRevisionRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new TuneQaScorecardRevisionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns TuneQaScorecardRevisionRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionRequest): google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest; + + /** + * Encodes the specified TuneQaScorecardRevisionRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest.verify|verify} messages. + * @param message TuneQaScorecardRevisionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TuneQaScorecardRevisionRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest.verify|verify} messages. + * @param message TuneQaScorecardRevisionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TuneQaScorecardRevisionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TuneQaScorecardRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest; + + /** + * Decodes a TuneQaScorecardRevisionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TuneQaScorecardRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest; + + /** + * Verifies a TuneQaScorecardRevisionRequest message. + * @param message Plain 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 TuneQaScorecardRevisionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TuneQaScorecardRevisionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest; + + /** + * Creates a plain object from a TuneQaScorecardRevisionRequest message. Also converts values to other types if specified. + * @param message TuneQaScorecardRevisionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TuneQaScorecardRevisionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TuneQaScorecardRevisionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TuneQaScorecardRevisionResponse. */ + interface ITuneQaScorecardRevisionResponse { + } + + /** Represents a TuneQaScorecardRevisionResponse. */ + class TuneQaScorecardRevisionResponse implements ITuneQaScorecardRevisionResponse { + + /** + * Constructs a new TuneQaScorecardRevisionResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionResponse); + + /** + * Creates a new TuneQaScorecardRevisionResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns TuneQaScorecardRevisionResponse instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionResponse): google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionResponse; + + /** + * Encodes the specified TuneQaScorecardRevisionResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionResponse.verify|verify} messages. + * @param message TuneQaScorecardRevisionResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TuneQaScorecardRevisionResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionResponse.verify|verify} messages. + * @param message TuneQaScorecardRevisionResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TuneQaScorecardRevisionResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TuneQaScorecardRevisionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionResponse; + + /** + * Decodes a TuneQaScorecardRevisionResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TuneQaScorecardRevisionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionResponse; + + /** + * Verifies a TuneQaScorecardRevisionResponse message. + * @param message Plain 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 TuneQaScorecardRevisionResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TuneQaScorecardRevisionResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionResponse; + + /** + * Creates a plain object from a TuneQaScorecardRevisionResponse message. Also converts values to other types if specified. + * @param message TuneQaScorecardRevisionResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TuneQaScorecardRevisionResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TuneQaScorecardRevisionResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TuneQaScorecardRevisionMetadata. */ + interface ITuneQaScorecardRevisionMetadata { + + /** TuneQaScorecardRevisionMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** TuneQaScorecardRevisionMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** TuneQaScorecardRevisionMetadata request */ + request?: (google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionRequest|null); + + /** TuneQaScorecardRevisionMetadata qaQuestionDatasetValidationResults */ + qaQuestionDatasetValidationResults?: (google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.IQaQuestionDatasetValidationResult[]|null); + + /** TuneQaScorecardRevisionMetadata qaQuestionDatasetTuningMetrics */ + qaQuestionDatasetTuningMetrics?: (google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.IQaQuestionDatasetTuningMetrics[]|null); + + /** TuneQaScorecardRevisionMetadata tuningCompletionRatio */ + tuningCompletionRatio?: (number|null); + } + + /** Represents a TuneQaScorecardRevisionMetadata. */ + class TuneQaScorecardRevisionMetadata implements ITuneQaScorecardRevisionMetadata { + + /** + * Constructs a new TuneQaScorecardRevisionMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionMetadata); + + /** TuneQaScorecardRevisionMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** TuneQaScorecardRevisionMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** TuneQaScorecardRevisionMetadata request. */ + public request?: (google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionRequest|null); + + /** TuneQaScorecardRevisionMetadata qaQuestionDatasetValidationResults. */ + public qaQuestionDatasetValidationResults: google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.IQaQuestionDatasetValidationResult[]; + + /** TuneQaScorecardRevisionMetadata qaQuestionDatasetTuningMetrics. */ + public qaQuestionDatasetTuningMetrics: google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.IQaQuestionDatasetTuningMetrics[]; + + /** TuneQaScorecardRevisionMetadata tuningCompletionRatio. */ + public tuningCompletionRatio: number; + + /** + * Creates a new TuneQaScorecardRevisionMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns TuneQaScorecardRevisionMetadata instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionMetadata): google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata; + + /** + * Encodes the specified TuneQaScorecardRevisionMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.verify|verify} messages. + * @param message TuneQaScorecardRevisionMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TuneQaScorecardRevisionMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.verify|verify} messages. + * @param message TuneQaScorecardRevisionMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TuneQaScorecardRevisionMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TuneQaScorecardRevisionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata; + + /** + * Decodes a TuneQaScorecardRevisionMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TuneQaScorecardRevisionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata; + + /** + * Verifies a TuneQaScorecardRevisionMetadata message. + * @param message Plain 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 TuneQaScorecardRevisionMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TuneQaScorecardRevisionMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata; + + /** + * Creates a plain object from a TuneQaScorecardRevisionMetadata message. Also converts values to other types if specified. + * @param message TuneQaScorecardRevisionMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TuneQaScorecardRevisionMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TuneQaScorecardRevisionMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace TuneQaScorecardRevisionMetadata { + + /** Properties of a QaQuestionDatasetValidationResult. */ + interface IQaQuestionDatasetValidationResult { + + /** QaQuestionDatasetValidationResult question */ + question?: (string|null); + + /** QaQuestionDatasetValidationResult datasetValidationWarnings */ + datasetValidationWarnings?: (google.cloud.contactcenterinsights.v1.DatasetValidationWarning[]|null); + + /** QaQuestionDatasetValidationResult validFeedbackLabelsCount */ + validFeedbackLabelsCount?: (number|null); + } + + /** Represents a QaQuestionDatasetValidationResult. */ + class QaQuestionDatasetValidationResult implements IQaQuestionDatasetValidationResult { + + /** + * Constructs a new QaQuestionDatasetValidationResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.IQaQuestionDatasetValidationResult); + + /** QaQuestionDatasetValidationResult question. */ + public question: string; + + /** QaQuestionDatasetValidationResult datasetValidationWarnings. */ + public datasetValidationWarnings: google.cloud.contactcenterinsights.v1.DatasetValidationWarning[]; + + /** QaQuestionDatasetValidationResult validFeedbackLabelsCount. */ + public validFeedbackLabelsCount: number; + + /** + * Creates a new QaQuestionDatasetValidationResult instance using the specified properties. + * @param [properties] Properties to set + * @returns QaQuestionDatasetValidationResult instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.IQaQuestionDatasetValidationResult): google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult; + + /** + * Encodes the specified QaQuestionDatasetValidationResult message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult.verify|verify} messages. + * @param message QaQuestionDatasetValidationResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.IQaQuestionDatasetValidationResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QaQuestionDatasetValidationResult message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult.verify|verify} messages. + * @param message QaQuestionDatasetValidationResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.IQaQuestionDatasetValidationResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QaQuestionDatasetValidationResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QaQuestionDatasetValidationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult; + + /** + * Decodes a QaQuestionDatasetValidationResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QaQuestionDatasetValidationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult; + + /** + * Verifies a QaQuestionDatasetValidationResult message. + * @param message Plain 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 QaQuestionDatasetValidationResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QaQuestionDatasetValidationResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult; + + /** + * Creates a plain object from a QaQuestionDatasetValidationResult message. Also converts values to other types if specified. + * @param message QaQuestionDatasetValidationResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QaQuestionDatasetValidationResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QaQuestionDatasetValidationResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QaQuestionDatasetTuningMetrics. */ + interface IQaQuestionDatasetTuningMetrics { + + /** QaQuestionDatasetTuningMetrics question */ + question?: (string|null); + + /** QaQuestionDatasetTuningMetrics metrics */ + metrics?: (google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.IMetrics|null); + } + + /** Represents a QaQuestionDatasetTuningMetrics. */ + class QaQuestionDatasetTuningMetrics implements IQaQuestionDatasetTuningMetrics { + + /** + * Constructs a new QaQuestionDatasetTuningMetrics. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.IQaQuestionDatasetTuningMetrics); + + /** QaQuestionDatasetTuningMetrics question. */ + public question: string; + + /** QaQuestionDatasetTuningMetrics metrics. */ + public metrics?: (google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.IMetrics|null); + + /** + * Creates a new QaQuestionDatasetTuningMetrics instance using the specified properties. + * @param [properties] Properties to set + * @returns QaQuestionDatasetTuningMetrics instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.IQaQuestionDatasetTuningMetrics): google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics; + + /** + * Encodes the specified QaQuestionDatasetTuningMetrics message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.verify|verify} messages. + * @param message QaQuestionDatasetTuningMetrics message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.IQaQuestionDatasetTuningMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QaQuestionDatasetTuningMetrics message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.verify|verify} messages. + * @param message QaQuestionDatasetTuningMetrics message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.IQaQuestionDatasetTuningMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QaQuestionDatasetTuningMetrics message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QaQuestionDatasetTuningMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics; + + /** + * Decodes a QaQuestionDatasetTuningMetrics message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QaQuestionDatasetTuningMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics; + + /** + * Verifies a QaQuestionDatasetTuningMetrics message. + * @param message Plain 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 QaQuestionDatasetTuningMetrics message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QaQuestionDatasetTuningMetrics + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics; + + /** + * Creates a plain object from a QaQuestionDatasetTuningMetrics message. Also converts values to other types if specified. + * @param message QaQuestionDatasetTuningMetrics + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QaQuestionDatasetTuningMetrics to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QaQuestionDatasetTuningMetrics + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace QaQuestionDatasetTuningMetrics { + + /** Properties of a Metrics. */ + interface IMetrics { + + /** Metrics accuracy */ + accuracy?: (number|null); + } + + /** Represents a Metrics. */ + class Metrics implements IMetrics { + + /** + * Constructs a new Metrics. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.IMetrics); + + /** Metrics accuracy. */ + public accuracy: number; + + /** + * Creates a new Metrics instance using the specified properties. + * @param [properties] Properties to set + * @returns Metrics instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.IMetrics): google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.Metrics; + + /** + * Encodes the specified Metrics message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.Metrics.verify|verify} messages. + * @param message Metrics message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.IMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Metrics message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.Metrics.verify|verify} messages. + * @param message Metrics message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.IMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Metrics message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Metrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.Metrics; + + /** + * Decodes a Metrics message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Metrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.Metrics; + + /** + * Verifies a Metrics message. + * @param message Plain 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 Metrics message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Metrics + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.Metrics; + + /** + * Creates a plain object from a Metrics message. Also converts values to other types if specified. + * @param message Metrics + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.Metrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Metrics to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Metrics + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of a DeployQaScorecardRevisionRequest. */ + interface IDeployQaScorecardRevisionRequest { + + /** DeployQaScorecardRevisionRequest name */ + name?: (string|null); + } + + /** Represents a DeployQaScorecardRevisionRequest. */ + class DeployQaScorecardRevisionRequest implements IDeployQaScorecardRevisionRequest { + + /** + * Constructs a new DeployQaScorecardRevisionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IDeployQaScorecardRevisionRequest); + + /** DeployQaScorecardRevisionRequest name. */ + public name: string; + + /** + * Creates a new DeployQaScorecardRevisionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeployQaScorecardRevisionRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IDeployQaScorecardRevisionRequest): google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest; + + /** + * Encodes the specified DeployQaScorecardRevisionRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest.verify|verify} messages. + * @param message DeployQaScorecardRevisionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IDeployQaScorecardRevisionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeployQaScorecardRevisionRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest.verify|verify} messages. + * @param message DeployQaScorecardRevisionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IDeployQaScorecardRevisionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeployQaScorecardRevisionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeployQaScorecardRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest; + + /** + * Decodes a DeployQaScorecardRevisionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeployQaScorecardRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest; + + /** + * Verifies a DeployQaScorecardRevisionRequest message. + * @param message Plain 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 DeployQaScorecardRevisionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeployQaScorecardRevisionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest; + + /** + * Creates a plain object from a DeployQaScorecardRevisionRequest message. Also converts values to other types if specified. + * @param message DeployQaScorecardRevisionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeployQaScorecardRevisionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeployQaScorecardRevisionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UndeployQaScorecardRevisionRequest. */ + interface IUndeployQaScorecardRevisionRequest { + + /** UndeployQaScorecardRevisionRequest name */ + name?: (string|null); + } + + /** Represents an UndeployQaScorecardRevisionRequest. */ + class UndeployQaScorecardRevisionRequest implements IUndeployQaScorecardRevisionRequest { + + /** + * Constructs a new UndeployQaScorecardRevisionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IUndeployQaScorecardRevisionRequest); + + /** UndeployQaScorecardRevisionRequest name. */ + public name: string; + + /** + * Creates a new UndeployQaScorecardRevisionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UndeployQaScorecardRevisionRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IUndeployQaScorecardRevisionRequest): google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest; + + /** + * Encodes the specified UndeployQaScorecardRevisionRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest.verify|verify} messages. + * @param message UndeployQaScorecardRevisionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IUndeployQaScorecardRevisionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UndeployQaScorecardRevisionRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest.verify|verify} messages. + * @param message UndeployQaScorecardRevisionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IUndeployQaScorecardRevisionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UndeployQaScorecardRevisionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UndeployQaScorecardRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest; + + /** + * Decodes an UndeployQaScorecardRevisionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UndeployQaScorecardRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest; + + /** + * Verifies an UndeployQaScorecardRevisionRequest message. + * @param message Plain 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 UndeployQaScorecardRevisionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UndeployQaScorecardRevisionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest; + + /** + * Creates a plain object from an UndeployQaScorecardRevisionRequest message. Also converts values to other types if specified. + * @param message UndeployQaScorecardRevisionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UndeployQaScorecardRevisionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UndeployQaScorecardRevisionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteQaScorecardRevisionRequest. */ + interface IDeleteQaScorecardRevisionRequest { + + /** DeleteQaScorecardRevisionRequest name */ + name?: (string|null); + + /** DeleteQaScorecardRevisionRequest force */ + force?: (boolean|null); + } + + /** Represents a DeleteQaScorecardRevisionRequest. */ + class DeleteQaScorecardRevisionRequest implements IDeleteQaScorecardRevisionRequest { + + /** + * Constructs a new DeleteQaScorecardRevisionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRevisionRequest); + + /** DeleteQaScorecardRevisionRequest name. */ + public name: string; + + /** DeleteQaScorecardRevisionRequest force. */ + public force: boolean; + + /** + * Creates a new DeleteQaScorecardRevisionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteQaScorecardRevisionRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRevisionRequest): google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest; + + /** + * Encodes the specified DeleteQaScorecardRevisionRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest.verify|verify} messages. + * @param message DeleteQaScorecardRevisionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRevisionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteQaScorecardRevisionRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest.verify|verify} messages. + * @param message DeleteQaScorecardRevisionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRevisionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteQaScorecardRevisionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteQaScorecardRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest; + + /** + * Decodes a DeleteQaScorecardRevisionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteQaScorecardRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest; + + /** + * Verifies a DeleteQaScorecardRevisionRequest message. + * @param message Plain 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 DeleteQaScorecardRevisionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteQaScorecardRevisionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest; + + /** + * Creates a plain object from a DeleteQaScorecardRevisionRequest message. Also converts values to other types if specified. + * @param message DeleteQaScorecardRevisionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteQaScorecardRevisionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteQaScorecardRevisionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListQaScorecardsRequest. */ + interface IListQaScorecardsRequest { + + /** ListQaScorecardsRequest parent */ + parent?: (string|null); + + /** ListQaScorecardsRequest pageSize */ + pageSize?: (number|null); + + /** ListQaScorecardsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListQaScorecardsRequest. */ + class ListQaScorecardsRequest implements IListQaScorecardsRequest { + + /** + * Constructs a new ListQaScorecardsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IListQaScorecardsRequest); + + /** ListQaScorecardsRequest parent. */ + public parent: string; + + /** ListQaScorecardsRequest pageSize. */ + public pageSize: number; + + /** ListQaScorecardsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListQaScorecardsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListQaScorecardsRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IListQaScorecardsRequest): google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest; + + /** + * Encodes the specified ListQaScorecardsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest.verify|verify} messages. + * @param message ListQaScorecardsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IListQaScorecardsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListQaScorecardsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest.verify|verify} messages. + * @param message ListQaScorecardsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListQaScorecardsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListQaScorecardsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListQaScorecardsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest; + + /** + * Decodes a ListQaScorecardsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListQaScorecardsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest; + + /** + * Verifies a ListQaScorecardsRequest message. + * @param message Plain 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 ListQaScorecardsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListQaScorecardsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest; + + /** + * Creates a plain object from a ListQaScorecardsRequest message. Also converts values to other types if specified. + * @param message ListQaScorecardsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListQaScorecardsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListQaScorecardsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListQaScorecardsResponse. */ + interface IListQaScorecardsResponse { + + /** ListQaScorecardsResponse qaScorecards */ + qaScorecards?: (google.cloud.contactcenterinsights.v1.IQaScorecard[]|null); + + /** ListQaScorecardsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListQaScorecardsResponse. */ + class ListQaScorecardsResponse implements IListQaScorecardsResponse { + + /** + * Constructs a new ListQaScorecardsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IListQaScorecardsResponse); + + /** ListQaScorecardsResponse qaScorecards. */ + public qaScorecards: google.cloud.contactcenterinsights.v1.IQaScorecard[]; + + /** ListQaScorecardsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListQaScorecardsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListQaScorecardsResponse instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IListQaScorecardsResponse): google.cloud.contactcenterinsights.v1.ListQaScorecardsResponse; + + /** + * Encodes the specified ListQaScorecardsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListQaScorecardsResponse.verify|verify} messages. + * @param message ListQaScorecardsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IListQaScorecardsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListQaScorecardsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListQaScorecardsResponse.verify|verify} messages. + * @param message ListQaScorecardsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListQaScorecardsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListQaScorecardsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListQaScorecardsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListQaScorecardsResponse; + + /** + * Decodes a ListQaScorecardsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListQaScorecardsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListQaScorecardsResponse; + + /** + * Verifies a ListQaScorecardsResponse message. + * @param message Plain 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 ListQaScorecardsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListQaScorecardsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListQaScorecardsResponse; + + /** + * Creates a plain object from a ListQaScorecardsResponse message. Also converts values to other types if specified. + * @param message ListQaScorecardsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ListQaScorecardsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListQaScorecardsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListQaScorecardsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListQaScorecardRevisionsRequest. */ + interface IListQaScorecardRevisionsRequest { + + /** ListQaScorecardRevisionsRequest parent */ + parent?: (string|null); + + /** ListQaScorecardRevisionsRequest pageSize */ + pageSize?: (number|null); + + /** ListQaScorecardRevisionsRequest pageToken */ + pageToken?: (string|null); + + /** ListQaScorecardRevisionsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListQaScorecardRevisionsRequest. */ + class ListQaScorecardRevisionsRequest implements IListQaScorecardRevisionsRequest { + + /** + * Constructs a new ListQaScorecardRevisionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsRequest); + + /** ListQaScorecardRevisionsRequest parent. */ + public parent: string; + + /** ListQaScorecardRevisionsRequest pageSize. */ + public pageSize: number; + + /** ListQaScorecardRevisionsRequest pageToken. */ + public pageToken: string; + + /** ListQaScorecardRevisionsRequest filter. */ + public filter: string; + + /** + * Creates a new ListQaScorecardRevisionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListQaScorecardRevisionsRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsRequest): google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest; + + /** + * Encodes the specified ListQaScorecardRevisionsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest.verify|verify} messages. + * @param message ListQaScorecardRevisionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListQaScorecardRevisionsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest.verify|verify} messages. + * @param message ListQaScorecardRevisionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListQaScorecardRevisionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListQaScorecardRevisionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest; + + /** + * Decodes a ListQaScorecardRevisionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListQaScorecardRevisionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest; + + /** + * Verifies a ListQaScorecardRevisionsRequest message. + * @param message Plain 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 ListQaScorecardRevisionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListQaScorecardRevisionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest; + + /** + * Creates a plain object from a ListQaScorecardRevisionsRequest message. Also converts values to other types if specified. + * @param message ListQaScorecardRevisionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListQaScorecardRevisionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListQaScorecardRevisionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListQaScorecardRevisionsResponse. */ + interface IListQaScorecardRevisionsResponse { + + /** ListQaScorecardRevisionsResponse qaScorecardRevisions */ + qaScorecardRevisions?: (google.cloud.contactcenterinsights.v1.IQaScorecardRevision[]|null); + + /** ListQaScorecardRevisionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListQaScorecardRevisionsResponse. */ + class ListQaScorecardRevisionsResponse implements IListQaScorecardRevisionsResponse { + + /** + * Constructs a new ListQaScorecardRevisionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsResponse); + + /** ListQaScorecardRevisionsResponse qaScorecardRevisions. */ + public qaScorecardRevisions: google.cloud.contactcenterinsights.v1.IQaScorecardRevision[]; + + /** ListQaScorecardRevisionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListQaScorecardRevisionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListQaScorecardRevisionsResponse instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsResponse): google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsResponse; + + /** + * Encodes the specified ListQaScorecardRevisionsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsResponse.verify|verify} messages. + * @param message ListQaScorecardRevisionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListQaScorecardRevisionsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsResponse.verify|verify} messages. + * @param message ListQaScorecardRevisionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListQaScorecardRevisionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListQaScorecardRevisionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsResponse; + + /** + * Decodes a ListQaScorecardRevisionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListQaScorecardRevisionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsResponse; + + /** + * Verifies a ListQaScorecardRevisionsResponse message. + * @param message Plain 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 ListQaScorecardRevisionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListQaScorecardRevisionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsResponse; + + /** + * Creates a plain object from a ListQaScorecardRevisionsResponse message. Also converts values to other types if specified. + * @param message ListQaScorecardRevisionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListQaScorecardRevisionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListQaScorecardRevisionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateFeedbackLabelRequest. */ + interface ICreateFeedbackLabelRequest { + + /** CreateFeedbackLabelRequest parent */ + parent?: (string|null); + + /** CreateFeedbackLabelRequest feedbackLabelId */ + feedbackLabelId?: (string|null); + + /** CreateFeedbackLabelRequest feedbackLabel */ + feedbackLabel?: (google.cloud.contactcenterinsights.v1.IFeedbackLabel|null); + } + + /** Represents a CreateFeedbackLabelRequest. */ + class CreateFeedbackLabelRequest implements ICreateFeedbackLabelRequest { + + /** + * Constructs a new CreateFeedbackLabelRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.ICreateFeedbackLabelRequest); + + /** CreateFeedbackLabelRequest parent. */ + public parent: string; + + /** CreateFeedbackLabelRequest feedbackLabelId. */ + public feedbackLabelId: string; + + /** CreateFeedbackLabelRequest feedbackLabel. */ + public feedbackLabel?: (google.cloud.contactcenterinsights.v1.IFeedbackLabel|null); + + /** + * Creates a new CreateFeedbackLabelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateFeedbackLabelRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.ICreateFeedbackLabelRequest): google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest; + + /** + * Encodes the specified CreateFeedbackLabelRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest.verify|verify} messages. + * @param message CreateFeedbackLabelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.ICreateFeedbackLabelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateFeedbackLabelRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest.verify|verify} messages. + * @param message CreateFeedbackLabelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ICreateFeedbackLabelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateFeedbackLabelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateFeedbackLabelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest; + + /** + * Decodes a CreateFeedbackLabelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateFeedbackLabelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest; + + /** + * Verifies a CreateFeedbackLabelRequest message. + * @param message Plain 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 CreateFeedbackLabelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateFeedbackLabelRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest; + + /** + * Creates a plain object from a CreateFeedbackLabelRequest message. Also converts values to other types if specified. + * @param message CreateFeedbackLabelRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateFeedbackLabelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateFeedbackLabelRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListFeedbackLabelsRequest. */ + interface IListFeedbackLabelsRequest { + + /** ListFeedbackLabelsRequest parent */ + parent?: (string|null); + + /** ListFeedbackLabelsRequest filter */ + filter?: (string|null); + + /** ListFeedbackLabelsRequest pageSize */ + pageSize?: (number|null); + + /** ListFeedbackLabelsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListFeedbackLabelsRequest. */ + class ListFeedbackLabelsRequest implements IListFeedbackLabelsRequest { + + /** + * Constructs a new ListFeedbackLabelsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IListFeedbackLabelsRequest); + + /** ListFeedbackLabelsRequest parent. */ + public parent: string; + + /** ListFeedbackLabelsRequest filter. */ + public filter: string; + + /** ListFeedbackLabelsRequest pageSize. */ + public pageSize: number; + + /** ListFeedbackLabelsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListFeedbackLabelsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListFeedbackLabelsRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IListFeedbackLabelsRequest): google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest; + + /** + * Encodes the specified ListFeedbackLabelsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest.verify|verify} messages. + * @param message ListFeedbackLabelsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IListFeedbackLabelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListFeedbackLabelsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest.verify|verify} messages. + * @param message ListFeedbackLabelsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListFeedbackLabelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListFeedbackLabelsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListFeedbackLabelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest; + + /** + * Decodes a ListFeedbackLabelsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListFeedbackLabelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest; + + /** + * Verifies a ListFeedbackLabelsRequest message. + * @param message Plain 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 ListFeedbackLabelsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListFeedbackLabelsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest; + + /** + * Creates a plain object from a ListFeedbackLabelsRequest message. Also converts values to other types if specified. + * @param message ListFeedbackLabelsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListFeedbackLabelsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListFeedbackLabelsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListFeedbackLabelsResponse. */ + interface IListFeedbackLabelsResponse { + + /** ListFeedbackLabelsResponse feedbackLabels */ + feedbackLabels?: (google.cloud.contactcenterinsights.v1.IFeedbackLabel[]|null); + + /** ListFeedbackLabelsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListFeedbackLabelsResponse. */ + class ListFeedbackLabelsResponse implements IListFeedbackLabelsResponse { + + /** + * Constructs a new ListFeedbackLabelsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IListFeedbackLabelsResponse); + + /** ListFeedbackLabelsResponse feedbackLabels. */ + public feedbackLabels: google.cloud.contactcenterinsights.v1.IFeedbackLabel[]; + + /** ListFeedbackLabelsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListFeedbackLabelsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListFeedbackLabelsResponse instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IListFeedbackLabelsResponse): google.cloud.contactcenterinsights.v1.ListFeedbackLabelsResponse; + + /** + * Encodes the specified ListFeedbackLabelsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListFeedbackLabelsResponse.verify|verify} messages. + * @param message ListFeedbackLabelsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IListFeedbackLabelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListFeedbackLabelsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListFeedbackLabelsResponse.verify|verify} messages. + * @param message ListFeedbackLabelsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListFeedbackLabelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListFeedbackLabelsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListFeedbackLabelsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListFeedbackLabelsResponse; + + /** + * Decodes a ListFeedbackLabelsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListFeedbackLabelsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListFeedbackLabelsResponse; + + /** + * Verifies a ListFeedbackLabelsResponse message. + * @param message Plain 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 ListFeedbackLabelsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListFeedbackLabelsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListFeedbackLabelsResponse; + + /** + * Creates a plain object from a ListFeedbackLabelsResponse message. Also converts values to other types if specified. + * @param message ListFeedbackLabelsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ListFeedbackLabelsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListFeedbackLabelsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListFeedbackLabelsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetFeedbackLabelRequest. */ + interface IGetFeedbackLabelRequest { + + /** GetFeedbackLabelRequest name */ + name?: (string|null); + } + + /** Represents a GetFeedbackLabelRequest. */ + class GetFeedbackLabelRequest implements IGetFeedbackLabelRequest { + + /** + * Constructs a new GetFeedbackLabelRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IGetFeedbackLabelRequest); + + /** GetFeedbackLabelRequest name. */ + public name: string; + + /** + * Creates a new GetFeedbackLabelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetFeedbackLabelRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IGetFeedbackLabelRequest): google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest; + + /** + * Encodes the specified GetFeedbackLabelRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest.verify|verify} messages. + * @param message GetFeedbackLabelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IGetFeedbackLabelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetFeedbackLabelRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest.verify|verify} messages. + * @param message GetFeedbackLabelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IGetFeedbackLabelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetFeedbackLabelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetFeedbackLabelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest; + + /** + * Decodes a GetFeedbackLabelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetFeedbackLabelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest; + + /** + * Verifies a GetFeedbackLabelRequest message. + * @param message Plain 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 GetFeedbackLabelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetFeedbackLabelRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest; + + /** + * Creates a plain object from a GetFeedbackLabelRequest message. Also converts values to other types if specified. + * @param message GetFeedbackLabelRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetFeedbackLabelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetFeedbackLabelRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateFeedbackLabelRequest. */ + interface IUpdateFeedbackLabelRequest { + + /** UpdateFeedbackLabelRequest feedbackLabel */ + feedbackLabel?: (google.cloud.contactcenterinsights.v1.IFeedbackLabel|null); + + /** UpdateFeedbackLabelRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateFeedbackLabelRequest. */ + class UpdateFeedbackLabelRequest implements IUpdateFeedbackLabelRequest { + + /** + * Constructs a new UpdateFeedbackLabelRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IUpdateFeedbackLabelRequest); + + /** UpdateFeedbackLabelRequest feedbackLabel. */ + public feedbackLabel?: (google.cloud.contactcenterinsights.v1.IFeedbackLabel|null); + + /** UpdateFeedbackLabelRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateFeedbackLabelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateFeedbackLabelRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IUpdateFeedbackLabelRequest): google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest; + + /** + * Encodes the specified UpdateFeedbackLabelRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest.verify|verify} messages. + * @param message UpdateFeedbackLabelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IUpdateFeedbackLabelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateFeedbackLabelRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest.verify|verify} messages. + * @param message UpdateFeedbackLabelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IUpdateFeedbackLabelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateFeedbackLabelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateFeedbackLabelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest; + + /** + * Decodes an UpdateFeedbackLabelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateFeedbackLabelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest; + + /** + * Verifies an UpdateFeedbackLabelRequest message. + * @param message Plain 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 UpdateFeedbackLabelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateFeedbackLabelRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest; + + /** + * Creates a plain object from an UpdateFeedbackLabelRequest message. Also converts values to other types if specified. + * @param message UpdateFeedbackLabelRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateFeedbackLabelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateFeedbackLabelRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteFeedbackLabelRequest. */ + interface IDeleteFeedbackLabelRequest { + + /** DeleteFeedbackLabelRequest name */ + name?: (string|null); + } + + /** Represents a DeleteFeedbackLabelRequest. */ + class DeleteFeedbackLabelRequest implements IDeleteFeedbackLabelRequest { + + /** + * Constructs a new DeleteFeedbackLabelRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IDeleteFeedbackLabelRequest); + + /** DeleteFeedbackLabelRequest name. */ + public name: string; + + /** + * Creates a new DeleteFeedbackLabelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteFeedbackLabelRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IDeleteFeedbackLabelRequest): google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest; + + /** + * Encodes the specified DeleteFeedbackLabelRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest.verify|verify} messages. + * @param message DeleteFeedbackLabelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IDeleteFeedbackLabelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteFeedbackLabelRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest.verify|verify} messages. + * @param message DeleteFeedbackLabelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IDeleteFeedbackLabelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteFeedbackLabelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteFeedbackLabelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest; + + /** + * Decodes a DeleteFeedbackLabelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteFeedbackLabelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest; + + /** + * Verifies a DeleteFeedbackLabelRequest message. + * @param message Plain 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 DeleteFeedbackLabelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteFeedbackLabelRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest; + + /** + * Creates a plain object from a DeleteFeedbackLabelRequest message. Also converts values to other types if specified. + * @param message DeleteFeedbackLabelRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteFeedbackLabelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteFeedbackLabelRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAllFeedbackLabelsRequest. */ + interface IListAllFeedbackLabelsRequest { + + /** ListAllFeedbackLabelsRequest parent */ + parent?: (string|null); + + /** ListAllFeedbackLabelsRequest pageSize */ + pageSize?: (number|null); + + /** ListAllFeedbackLabelsRequest pageToken */ + pageToken?: (string|null); + + /** ListAllFeedbackLabelsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListAllFeedbackLabelsRequest. */ + class ListAllFeedbackLabelsRequest implements IListAllFeedbackLabelsRequest { + + /** + * Constructs a new ListAllFeedbackLabelsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsRequest); + + /** ListAllFeedbackLabelsRequest parent. */ + public parent: string; + + /** ListAllFeedbackLabelsRequest pageSize. */ + public pageSize: number; + + /** ListAllFeedbackLabelsRequest pageToken. */ + public pageToken: string; + + /** ListAllFeedbackLabelsRequest filter. */ + public filter: string; + + /** + * Creates a new ListAllFeedbackLabelsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAllFeedbackLabelsRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsRequest): google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest; + + /** + * Encodes the specified ListAllFeedbackLabelsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest.verify|verify} messages. + * @param message ListAllFeedbackLabelsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAllFeedbackLabelsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest.verify|verify} messages. + * @param message ListAllFeedbackLabelsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAllFeedbackLabelsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAllFeedbackLabelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest; + + /** + * Decodes a ListAllFeedbackLabelsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAllFeedbackLabelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest; + + /** + * Verifies a ListAllFeedbackLabelsRequest message. + * @param message Plain 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 ListAllFeedbackLabelsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAllFeedbackLabelsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest; + + /** + * Creates a plain object from a ListAllFeedbackLabelsRequest message. Also converts values to other types if specified. + * @param message ListAllFeedbackLabelsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAllFeedbackLabelsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAllFeedbackLabelsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAllFeedbackLabelsResponse. */ + interface IListAllFeedbackLabelsResponse { + + /** ListAllFeedbackLabelsResponse feedbackLabels */ + feedbackLabels?: (google.cloud.contactcenterinsights.v1.IFeedbackLabel[]|null); + + /** ListAllFeedbackLabelsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListAllFeedbackLabelsResponse. */ + class ListAllFeedbackLabelsResponse implements IListAllFeedbackLabelsResponse { + + /** + * Constructs a new ListAllFeedbackLabelsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsResponse); + + /** ListAllFeedbackLabelsResponse feedbackLabels. */ + public feedbackLabels: google.cloud.contactcenterinsights.v1.IFeedbackLabel[]; + + /** ListAllFeedbackLabelsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListAllFeedbackLabelsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAllFeedbackLabelsResponse instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsResponse): google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsResponse; + + /** + * Encodes the specified ListAllFeedbackLabelsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsResponse.verify|verify} messages. + * @param message ListAllFeedbackLabelsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAllFeedbackLabelsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsResponse.verify|verify} messages. + * @param message ListAllFeedbackLabelsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAllFeedbackLabelsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAllFeedbackLabelsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsResponse; + + /** + * Decodes a ListAllFeedbackLabelsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAllFeedbackLabelsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsResponse; + + /** + * Verifies a ListAllFeedbackLabelsResponse message. + * @param message Plain 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 ListAllFeedbackLabelsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAllFeedbackLabelsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsResponse; + + /** + * Creates a plain object from a ListAllFeedbackLabelsResponse message. Also converts values to other types if specified. + * @param message ListAllFeedbackLabelsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAllFeedbackLabelsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAllFeedbackLabelsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BulkUploadFeedbackLabelsRequest. */ + interface IBulkUploadFeedbackLabelsRequest { + + /** BulkUploadFeedbackLabelsRequest gcsSource */ + gcsSource?: (google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.IGcsSource|null); + + /** BulkUploadFeedbackLabelsRequest parent */ + parent?: (string|null); + + /** BulkUploadFeedbackLabelsRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a BulkUploadFeedbackLabelsRequest. */ + class BulkUploadFeedbackLabelsRequest implements IBulkUploadFeedbackLabelsRequest { + + /** + * Constructs a new BulkUploadFeedbackLabelsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsRequest); + + /** BulkUploadFeedbackLabelsRequest gcsSource. */ + public gcsSource?: (google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.IGcsSource|null); + + /** BulkUploadFeedbackLabelsRequest parent. */ + public parent: string; + + /** BulkUploadFeedbackLabelsRequest validateOnly. */ + public validateOnly: boolean; + + /** BulkUploadFeedbackLabelsRequest source. */ + public source?: "gcsSource"; + + /** + * Creates a new BulkUploadFeedbackLabelsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BulkUploadFeedbackLabelsRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsRequest): google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest; + + /** + * Encodes the specified BulkUploadFeedbackLabelsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.verify|verify} messages. + * @param message BulkUploadFeedbackLabelsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BulkUploadFeedbackLabelsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.verify|verify} messages. + * @param message BulkUploadFeedbackLabelsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BulkUploadFeedbackLabelsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BulkUploadFeedbackLabelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest; + + /** + * Decodes a BulkUploadFeedbackLabelsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BulkUploadFeedbackLabelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest; + + /** + * Verifies a BulkUploadFeedbackLabelsRequest message. + * @param message Plain 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 BulkUploadFeedbackLabelsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BulkUploadFeedbackLabelsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest; + + /** + * Creates a plain object from a BulkUploadFeedbackLabelsRequest message. Also converts values to other types if specified. + * @param message BulkUploadFeedbackLabelsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BulkUploadFeedbackLabelsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BulkUploadFeedbackLabelsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BulkUploadFeedbackLabelsRequest { + + /** Properties of a GcsSource. */ + interface IGcsSource { + + /** GcsSource format */ + format?: (google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource.Format|keyof typeof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource.Format|null); + + /** GcsSource objectUri */ + objectUri?: (string|null); + } + + /** Represents a GcsSource. */ + class GcsSource implements IGcsSource { + + /** + * Constructs a new GcsSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.IGcsSource); + + /** GcsSource format. */ + public format: (google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource.Format|keyof typeof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource.Format); + + /** GcsSource objectUri. */ + public objectUri: string; + + /** + * Creates a new GcsSource instance using the specified properties. + * @param [properties] Properties to set + * @returns GcsSource instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.IGcsSource): google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource; + + /** + * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource.verify|verify} messages. + * @param message GcsSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.IGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource.verify|verify} messages. + * @param message GcsSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.IGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GcsSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcsSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource; + + /** + * Decodes a GcsSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcsSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource; + + /** + * Verifies a GcsSource message. + * @param message Plain 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 GcsSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcsSource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource; + + /** + * Creates a plain object from a GcsSource message. Also converts values to other types if specified. + * @param message GcsSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcsSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GcsSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GcsSource { + + /** Format enum. */ + enum Format { + FORMAT_UNSPECIFIED = 0, + CSV = 1, + JSON = 2 + } + } + } + + /** Properties of a BulkUploadFeedbackLabelsResponse. */ + interface IBulkUploadFeedbackLabelsResponse { + } + + /** Represents a BulkUploadFeedbackLabelsResponse. */ + class BulkUploadFeedbackLabelsResponse implements IBulkUploadFeedbackLabelsResponse { + + /** + * Constructs a new BulkUploadFeedbackLabelsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsResponse); + + /** + * Creates a new BulkUploadFeedbackLabelsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns BulkUploadFeedbackLabelsResponse instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsResponse): google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsResponse; + + /** + * Encodes the specified BulkUploadFeedbackLabelsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsResponse.verify|verify} messages. + * @param message BulkUploadFeedbackLabelsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BulkUploadFeedbackLabelsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsResponse.verify|verify} messages. + * @param message BulkUploadFeedbackLabelsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BulkUploadFeedbackLabelsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BulkUploadFeedbackLabelsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsResponse; + + /** + * Decodes a BulkUploadFeedbackLabelsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BulkUploadFeedbackLabelsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsResponse; + + /** + * Verifies a BulkUploadFeedbackLabelsResponse message. + * @param message Plain 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 BulkUploadFeedbackLabelsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BulkUploadFeedbackLabelsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsResponse; + + /** + * Creates a plain object from a BulkUploadFeedbackLabelsResponse message. Also converts values to other types if specified. + * @param message BulkUploadFeedbackLabelsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BulkUploadFeedbackLabelsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BulkUploadFeedbackLabelsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BulkUploadFeedbackLabelsMetadata. */ + interface IBulkUploadFeedbackLabelsMetadata { + + /** BulkUploadFeedbackLabelsMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** BulkUploadFeedbackLabelsMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** BulkUploadFeedbackLabelsMetadata request */ + request?: (google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsRequest|null); + + /** BulkUploadFeedbackLabelsMetadata partialErrors */ + partialErrors?: (google.rpc.IStatus[]|null); + + /** BulkUploadFeedbackLabelsMetadata uploadStats */ + uploadStats?: (google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.IUploadStats|null); + } + + /** Represents a BulkUploadFeedbackLabelsMetadata. */ + class BulkUploadFeedbackLabelsMetadata implements IBulkUploadFeedbackLabelsMetadata { + + /** + * Constructs a new BulkUploadFeedbackLabelsMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsMetadata); + + /** BulkUploadFeedbackLabelsMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** BulkUploadFeedbackLabelsMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** BulkUploadFeedbackLabelsMetadata request. */ + public request?: (google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsRequest|null); + + /** BulkUploadFeedbackLabelsMetadata partialErrors. */ + public partialErrors: google.rpc.IStatus[]; + + /** BulkUploadFeedbackLabelsMetadata uploadStats. */ + public uploadStats?: (google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.IUploadStats|null); + + /** + * Creates a new BulkUploadFeedbackLabelsMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns BulkUploadFeedbackLabelsMetadata instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsMetadata): google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata; + + /** + * Encodes the specified BulkUploadFeedbackLabelsMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.verify|verify} messages. + * @param message BulkUploadFeedbackLabelsMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BulkUploadFeedbackLabelsMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.verify|verify} messages. + * @param message BulkUploadFeedbackLabelsMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BulkUploadFeedbackLabelsMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BulkUploadFeedbackLabelsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata; + + /** + * Decodes a BulkUploadFeedbackLabelsMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BulkUploadFeedbackLabelsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata; + + /** + * Verifies a BulkUploadFeedbackLabelsMetadata message. + * @param message Plain 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 BulkUploadFeedbackLabelsMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BulkUploadFeedbackLabelsMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata; + + /** + * Creates a plain object from a BulkUploadFeedbackLabelsMetadata message. Also converts values to other types if specified. + * @param message BulkUploadFeedbackLabelsMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BulkUploadFeedbackLabelsMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BulkUploadFeedbackLabelsMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BulkUploadFeedbackLabelsMetadata { + + /** Properties of an UploadStats. */ + interface IUploadStats { + + /** UploadStats processedObjectCount */ + processedObjectCount?: (number|null); + + /** UploadStats failedValidationCount */ + failedValidationCount?: (number|null); + + /** UploadStats successfulUploadCount */ + successfulUploadCount?: (number|null); + } + + /** Represents an UploadStats. */ + class UploadStats implements IUploadStats { + + /** + * Constructs a new UploadStats. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.IUploadStats); + + /** UploadStats processedObjectCount. */ + public processedObjectCount: number; + + /** UploadStats failedValidationCount. */ + public failedValidationCount: number; + + /** UploadStats successfulUploadCount. */ + public successfulUploadCount: number; + + /** + * Creates a new UploadStats instance using the specified properties. + * @param [properties] Properties to set + * @returns UploadStats instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.IUploadStats): google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.UploadStats; + + /** + * Encodes the specified UploadStats message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.UploadStats.verify|verify} messages. + * @param message UploadStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.IUploadStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UploadStats message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.UploadStats.verify|verify} messages. + * @param message UploadStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.IUploadStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UploadStats message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UploadStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.UploadStats; + + /** + * Decodes an UploadStats message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UploadStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.UploadStats; + + /** + * Verifies an UploadStats message. + * @param message Plain 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 UploadStats message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UploadStats + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.UploadStats; + + /** + * Creates a plain object from an UploadStats message. Also converts values to other types if specified. + * @param message UploadStats + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.UploadStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UploadStats to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UploadStats + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a BulkDownloadFeedbackLabelsRequest. */ + interface IBulkDownloadFeedbackLabelsRequest { + + /** BulkDownloadFeedbackLabelsRequest gcsDestination */ + gcsDestination?: (google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.IGcsDestination|null); + + /** BulkDownloadFeedbackLabelsRequest parent */ + parent?: (string|null); + + /** BulkDownloadFeedbackLabelsRequest filter */ + filter?: (string|null); + + /** BulkDownloadFeedbackLabelsRequest maxDownloadCount */ + maxDownloadCount?: (number|null); + + /** BulkDownloadFeedbackLabelsRequest feedbackLabelType */ + feedbackLabelType?: (google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.FeedbackLabelType|keyof typeof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.FeedbackLabelType|null); + + /** BulkDownloadFeedbackLabelsRequest conversationFilter */ + conversationFilter?: (string|null); + + /** BulkDownloadFeedbackLabelsRequest templateQaScorecardId */ + templateQaScorecardId?: (string[]|null); + } + + /** Represents a BulkDownloadFeedbackLabelsRequest. */ + class BulkDownloadFeedbackLabelsRequest implements IBulkDownloadFeedbackLabelsRequest { + + /** + * Constructs a new BulkDownloadFeedbackLabelsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsRequest); + + /** BulkDownloadFeedbackLabelsRequest gcsDestination. */ + public gcsDestination?: (google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.IGcsDestination|null); + + /** BulkDownloadFeedbackLabelsRequest parent. */ + public parent: string; + + /** BulkDownloadFeedbackLabelsRequest filter. */ + public filter: string; + + /** BulkDownloadFeedbackLabelsRequest maxDownloadCount. */ + public maxDownloadCount: number; + + /** BulkDownloadFeedbackLabelsRequest feedbackLabelType. */ + public feedbackLabelType: (google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.FeedbackLabelType|keyof typeof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.FeedbackLabelType); + + /** BulkDownloadFeedbackLabelsRequest conversationFilter. */ + public conversationFilter: string; + + /** BulkDownloadFeedbackLabelsRequest templateQaScorecardId. */ + public templateQaScorecardId: string[]; + + /** BulkDownloadFeedbackLabelsRequest destination. */ + public destination?: "gcsDestination"; + + /** + * Creates a new BulkDownloadFeedbackLabelsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BulkDownloadFeedbackLabelsRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsRequest): google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest; + + /** + * Encodes the specified BulkDownloadFeedbackLabelsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.verify|verify} messages. + * @param message BulkDownloadFeedbackLabelsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BulkDownloadFeedbackLabelsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.verify|verify} messages. + * @param message BulkDownloadFeedbackLabelsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BulkDownloadFeedbackLabelsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BulkDownloadFeedbackLabelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest; + + /** + * Decodes a BulkDownloadFeedbackLabelsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BulkDownloadFeedbackLabelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest; + + /** + * Verifies a BulkDownloadFeedbackLabelsRequest message. + * @param message Plain 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 BulkDownloadFeedbackLabelsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BulkDownloadFeedbackLabelsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest; + + /** + * Creates a plain object from a BulkDownloadFeedbackLabelsRequest message. Also converts values to other types if specified. + * @param message BulkDownloadFeedbackLabelsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BulkDownloadFeedbackLabelsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BulkDownloadFeedbackLabelsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BulkDownloadFeedbackLabelsRequest { + + /** Properties of a GcsDestination. */ + interface IGcsDestination { + + /** GcsDestination format */ + format?: (google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination.Format|keyof typeof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination.Format|null); + + /** GcsDestination objectUri */ + objectUri?: (string|null); + + /** GcsDestination addWhitespace */ + addWhitespace?: (boolean|null); + + /** GcsDestination alwaysPrintEmptyFields */ + alwaysPrintEmptyFields?: (boolean|null); + + /** GcsDestination recordsPerFileCount */ + recordsPerFileCount?: (number|Long|string|null); + } + + /** Represents a GcsDestination. */ + class GcsDestination implements IGcsDestination { + + /** + * Constructs a new GcsDestination. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.IGcsDestination); + + /** GcsDestination format. */ + public format: (google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination.Format|keyof typeof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination.Format); + + /** GcsDestination objectUri. */ + public objectUri: string; + + /** GcsDestination addWhitespace. */ + public addWhitespace: boolean; + + /** GcsDestination alwaysPrintEmptyFields. */ + public alwaysPrintEmptyFields: boolean; + + /** GcsDestination recordsPerFileCount. */ + public recordsPerFileCount: (number|Long|string); + + /** + * Creates a new GcsDestination instance using the specified properties. + * @param [properties] Properties to set + * @returns GcsDestination instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.IGcsDestination): google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination; + + /** + * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.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.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.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.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination; + + /** + * Decodes a GcsDestination message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination; + + /** + * 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 GcsDestination message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcsDestination + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination; + + /** + * 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.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcsDestination to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + namespace GcsDestination { + + /** Format enum. */ + enum Format { + FORMAT_UNSPECIFIED = 0, + CSV = 1, + JSON = 2 + } + } + + /** FeedbackLabelType enum. */ + enum FeedbackLabelType { + FEEDBACK_LABEL_TYPE_UNSPECIFIED = 0, + QUALITY_AI = 1, + TOPIC_MODELING = 2 + } + } + + /** Properties of a BulkDownloadFeedbackLabelsResponse. */ + interface IBulkDownloadFeedbackLabelsResponse { + } + + /** Represents a BulkDownloadFeedbackLabelsResponse. */ + class BulkDownloadFeedbackLabelsResponse implements IBulkDownloadFeedbackLabelsResponse { + + /** + * Constructs a new BulkDownloadFeedbackLabelsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsResponse); + + /** + * Creates a new BulkDownloadFeedbackLabelsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns BulkDownloadFeedbackLabelsResponse instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsResponse): google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsResponse; + + /** + * Encodes the specified BulkDownloadFeedbackLabelsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsResponse.verify|verify} messages. + * @param message BulkDownloadFeedbackLabelsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BulkDownloadFeedbackLabelsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsResponse.verify|verify} messages. + * @param message BulkDownloadFeedbackLabelsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BulkDownloadFeedbackLabelsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BulkDownloadFeedbackLabelsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsResponse; + + /** + * Decodes a BulkDownloadFeedbackLabelsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BulkDownloadFeedbackLabelsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsResponse; + + /** + * Verifies a BulkDownloadFeedbackLabelsResponse message. + * @param message Plain 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 BulkDownloadFeedbackLabelsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BulkDownloadFeedbackLabelsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsResponse; + + /** + * Creates a plain object from a BulkDownloadFeedbackLabelsResponse message. Also converts values to other types if specified. + * @param message BulkDownloadFeedbackLabelsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BulkDownloadFeedbackLabelsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BulkDownloadFeedbackLabelsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BulkDownloadFeedbackLabelsMetadata. */ + interface IBulkDownloadFeedbackLabelsMetadata { + + /** BulkDownloadFeedbackLabelsMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** BulkDownloadFeedbackLabelsMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** BulkDownloadFeedbackLabelsMetadata request */ + request?: (google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsRequest|null); + + /** BulkDownloadFeedbackLabelsMetadata partialErrors */ + partialErrors?: (google.rpc.IStatus[]|null); + + /** BulkDownloadFeedbackLabelsMetadata downloadStats */ + downloadStats?: (google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.IDownloadStats|null); + } + + /** Represents a BulkDownloadFeedbackLabelsMetadata. */ + class BulkDownloadFeedbackLabelsMetadata implements IBulkDownloadFeedbackLabelsMetadata { + + /** + * Constructs a new BulkDownloadFeedbackLabelsMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsMetadata); + + /** BulkDownloadFeedbackLabelsMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** BulkDownloadFeedbackLabelsMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** BulkDownloadFeedbackLabelsMetadata request. */ + public request?: (google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsRequest|null); + + /** BulkDownloadFeedbackLabelsMetadata partialErrors. */ + public partialErrors: google.rpc.IStatus[]; + + /** BulkDownloadFeedbackLabelsMetadata downloadStats. */ + public downloadStats?: (google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.IDownloadStats|null); + + /** + * Creates a new BulkDownloadFeedbackLabelsMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns BulkDownloadFeedbackLabelsMetadata instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsMetadata): google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata; + + /** + * Encodes the specified BulkDownloadFeedbackLabelsMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.verify|verify} messages. + * @param message BulkDownloadFeedbackLabelsMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BulkDownloadFeedbackLabelsMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.verify|verify} messages. + * @param message BulkDownloadFeedbackLabelsMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BulkDownloadFeedbackLabelsMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BulkDownloadFeedbackLabelsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata; + + /** + * Decodes a BulkDownloadFeedbackLabelsMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BulkDownloadFeedbackLabelsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata; + + /** + * Verifies a BulkDownloadFeedbackLabelsMetadata message. + * @param message Plain 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 BulkDownloadFeedbackLabelsMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BulkDownloadFeedbackLabelsMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata; + + /** + * Creates a plain object from a BulkDownloadFeedbackLabelsMetadata message. Also converts values to other types if specified. + * @param message BulkDownloadFeedbackLabelsMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BulkDownloadFeedbackLabelsMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BulkDownloadFeedbackLabelsMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BulkDownloadFeedbackLabelsMetadata { + + /** Properties of a DownloadStats. */ + interface IDownloadStats { + + /** DownloadStats processedObjectCount */ + processedObjectCount?: (number|null); + + /** DownloadStats successfulDownloadCount */ + successfulDownloadCount?: (number|null); + + /** DownloadStats totalFilesWritten */ + totalFilesWritten?: (number|null); + + /** DownloadStats fileNames */ + fileNames?: (string[]|null); + } + + /** Represents a DownloadStats. */ + class DownloadStats implements IDownloadStats { + + /** + * Constructs a new DownloadStats. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.IDownloadStats); + + /** DownloadStats processedObjectCount. */ + public processedObjectCount: number; + + /** DownloadStats successfulDownloadCount. */ + public successfulDownloadCount: number; + + /** DownloadStats totalFilesWritten. */ + public totalFilesWritten: number; + + /** DownloadStats fileNames. */ + public fileNames: string[]; + + /** + * Creates a new DownloadStats instance using the specified properties. + * @param [properties] Properties to set + * @returns DownloadStats instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.IDownloadStats): google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats; + + /** + * Encodes the specified DownloadStats message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats.verify|verify} messages. + * @param message DownloadStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.IDownloadStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DownloadStats message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats.verify|verify} messages. + * @param message DownloadStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.IDownloadStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DownloadStats message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DownloadStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats; + + /** + * Decodes a DownloadStats message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DownloadStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats; + + /** + * Verifies a DownloadStats message. + * @param message Plain 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 DownloadStats message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DownloadStats + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats; + + /** + * Creates a plain object from a DownloadStats message. Also converts values to other types if specified. + * @param message DownloadStats + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DownloadStats to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DownloadStats + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** DatasetValidationWarning enum. */ + enum DatasetValidationWarning { + DATASET_VALIDATION_WARNING_UNSPECIFIED = 0, + TOO_MANY_INVALID_FEEDBACK_LABELS = 1, + INSUFFICIENT_FEEDBACK_LABELS = 2, + INSUFFICIENT_FEEDBACK_LABELS_PER_ANSWER = 3, + ALL_FEEDBACK_LABELS_HAVE_THE_SAME_ANSWER = 4 + } + + /** Properties of a Conversation. */ + interface IConversation { + + /** Conversation callMetadata */ + callMetadata?: (google.cloud.contactcenterinsights.v1.Conversation.ICallMetadata|null); + + /** Conversation expireTime */ + expireTime?: (google.protobuf.ITimestamp|null); + + /** Conversation ttl */ + ttl?: (google.protobuf.IDuration|null); + + /** Conversation name */ + name?: (string|null); + + /** Conversation dataSource */ + dataSource?: (google.cloud.contactcenterinsights.v1.IConversationDataSource|null); + + /** Conversation createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Conversation updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Conversation startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** Conversation languageCode */ + languageCode?: (string|null); + + /** Conversation agentId */ + agentId?: (string|null); + + /** Conversation labels */ + labels?: ({ [k: string]: string }|null); + + /** Conversation qualityMetadata */ + qualityMetadata?: (google.cloud.contactcenterinsights.v1.Conversation.IQualityMetadata|null); + + /** Conversation metadataJson */ + metadataJson?: (string|null); + + /** Conversation transcript */ + transcript?: (google.cloud.contactcenterinsights.v1.Conversation.ITranscript|null); + + /** Conversation medium */ + medium?: (google.cloud.contactcenterinsights.v1.Conversation.Medium|keyof typeof google.cloud.contactcenterinsights.v1.Conversation.Medium|null); + + /** Conversation duration */ + duration?: (google.protobuf.IDuration|null); + + /** Conversation turnCount */ + turnCount?: (number|null); + + /** Conversation latestAnalysis */ + latestAnalysis?: (google.cloud.contactcenterinsights.v1.IAnalysis|null); + + /** Conversation latestSummary */ + latestSummary?: (google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData|null); + + /** Conversation runtimeAnnotations */ + runtimeAnnotations?: (google.cloud.contactcenterinsights.v1.IRuntimeAnnotation[]|null); + + /** Conversation dialogflowIntents */ + dialogflowIntents?: ({ [k: string]: google.cloud.contactcenterinsights.v1.IDialogflowIntent }|null); + + /** Conversation obfuscatedUserId */ + obfuscatedUserId?: (string|null); + } + + /** Represents a Conversation. */ + class Conversation implements IConversation { + + /** + * Constructs a new Conversation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IConversation); + + /** Conversation callMetadata. */ + public callMetadata?: (google.cloud.contactcenterinsights.v1.Conversation.ICallMetadata|null); + + /** Conversation expireTime. */ + public expireTime?: (google.protobuf.ITimestamp|null); + + /** Conversation ttl. */ + public ttl?: (google.protobuf.IDuration|null); + + /** Conversation name. */ + public name: string; + + /** Conversation dataSource. */ + public dataSource?: (google.cloud.contactcenterinsights.v1.IConversationDataSource|null); + + /** Conversation createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Conversation updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Conversation startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** Conversation languageCode. */ + public languageCode: string; + + /** Conversation agentId. */ + public agentId: string; + + /** Conversation labels. */ + public labels: { [k: string]: string }; + + /** Conversation qualityMetadata. */ + public qualityMetadata?: (google.cloud.contactcenterinsights.v1.Conversation.IQualityMetadata|null); + + /** Conversation metadataJson. */ + public metadataJson: string; + + /** Conversation transcript. */ + public transcript?: (google.cloud.contactcenterinsights.v1.Conversation.ITranscript|null); + + /** Conversation medium. */ + public medium: (google.cloud.contactcenterinsights.v1.Conversation.Medium|keyof typeof google.cloud.contactcenterinsights.v1.Conversation.Medium); + + /** Conversation duration. */ + public duration?: (google.protobuf.IDuration|null); + + /** Conversation turnCount. */ + public turnCount: number; + + /** Conversation latestAnalysis. */ + public latestAnalysis?: (google.cloud.contactcenterinsights.v1.IAnalysis|null); + + /** Conversation latestSummary. */ + public latestSummary?: (google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData|null); + + /** Conversation runtimeAnnotations. */ + public runtimeAnnotations: google.cloud.contactcenterinsights.v1.IRuntimeAnnotation[]; + + /** Conversation dialogflowIntents. */ + public dialogflowIntents: { [k: string]: google.cloud.contactcenterinsights.v1.IDialogflowIntent }; + + /** Conversation obfuscatedUserId. */ + public obfuscatedUserId: string; + + /** Conversation metadata. */ + public metadata?: "callMetadata"; + + /** Conversation expiration. */ + public expiration?: ("expireTime"|"ttl"); + + /** + * Creates a new Conversation instance using the specified properties. + * @param [properties] Properties to set + * @returns Conversation instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IConversation): google.cloud.contactcenterinsights.v1.Conversation; + + /** + * Encodes the specified Conversation message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.verify|verify} messages. + * @param message Conversation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IConversation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Conversation message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.verify|verify} messages. + * @param message Conversation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IConversation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Conversation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Conversation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Conversation; + + /** + * Decodes a Conversation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Conversation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Conversation; + + /** + * Verifies a Conversation message. + * @param message Plain 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 Conversation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Conversation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Conversation; + + /** + * Creates a plain object from a Conversation message. Also converts values to other types if specified. + * @param message Conversation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.Conversation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Conversation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Conversation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Conversation { + + /** Properties of a CallMetadata. */ + interface ICallMetadata { /** CallMetadata customerChannel */ customerChannel?: (number|null); - /** CallMetadata agentChannel */ - agentChannel?: (number|null); - } + /** CallMetadata agentChannel */ + agentChannel?: (number|null); + } + + /** Represents a CallMetadata. */ + class CallMetadata implements ICallMetadata { + + /** + * Constructs a new CallMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.Conversation.ICallMetadata); + + /** CallMetadata customerChannel. */ + public customerChannel: number; + + /** CallMetadata agentChannel. */ + public agentChannel: number; + + /** + * Creates a new CallMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns CallMetadata instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.Conversation.ICallMetadata): google.cloud.contactcenterinsights.v1.Conversation.CallMetadata; + + /** + * Encodes the specified CallMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.CallMetadata.verify|verify} messages. + * @param message CallMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.Conversation.ICallMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CallMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.CallMetadata.verify|verify} messages. + * @param message CallMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.Conversation.ICallMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CallMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CallMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Conversation.CallMetadata; + + /** + * Decodes a CallMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CallMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Conversation.CallMetadata; + + /** + * Verifies a CallMetadata message. + * @param message Plain 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 CallMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CallMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Conversation.CallMetadata; + + /** + * Creates a plain object from a CallMetadata message. Also converts values to other types if specified. + * @param message CallMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.Conversation.CallMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CallMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CallMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QualityMetadata. */ + interface IQualityMetadata { + + /** QualityMetadata customerSatisfactionRating */ + customerSatisfactionRating?: (number|null); + + /** QualityMetadata waitDuration */ + waitDuration?: (google.protobuf.IDuration|null); + + /** QualityMetadata menuPath */ + menuPath?: (string|null); + + /** QualityMetadata agentInfo */ + agentInfo?: (google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.IAgentInfo[]|null); + } + + /** Represents a QualityMetadata. */ + class QualityMetadata implements IQualityMetadata { + + /** + * Constructs a new QualityMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.Conversation.IQualityMetadata); + + /** QualityMetadata customerSatisfactionRating. */ + public customerSatisfactionRating: number; + + /** QualityMetadata waitDuration. */ + public waitDuration?: (google.protobuf.IDuration|null); + + /** QualityMetadata menuPath. */ + public menuPath: string; + + /** QualityMetadata agentInfo. */ + public agentInfo: google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.IAgentInfo[]; + + /** + * Creates a new QualityMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns QualityMetadata instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.Conversation.IQualityMetadata): google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata; + + /** + * Encodes the specified QualityMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.verify|verify} messages. + * @param message QualityMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.Conversation.IQualityMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QualityMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.verify|verify} messages. + * @param message QualityMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.Conversation.IQualityMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QualityMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QualityMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata; + + /** + * Decodes a QualityMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QualityMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata; + + /** + * Verifies a QualityMetadata message. + * @param message Plain 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 QualityMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QualityMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata; + + /** + * Creates a plain object from a QualityMetadata message. Also converts values to other types if specified. + * @param message QualityMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QualityMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QualityMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace QualityMetadata { + + /** Properties of an AgentInfo. */ + interface IAgentInfo { + + /** AgentInfo agentId */ + agentId?: (string|null); + + /** AgentInfo displayName */ + displayName?: (string|null); + + /** AgentInfo team */ + team?: (string|null); + + /** AgentInfo dispositionCode */ + dispositionCode?: (string|null); + } + + /** Represents an AgentInfo. */ + class AgentInfo implements IAgentInfo { + + /** + * Constructs a new AgentInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.IAgentInfo); + + /** AgentInfo agentId. */ + public agentId: string; + + /** AgentInfo displayName. */ + public displayName: string; + + /** AgentInfo team. */ + public team: string; + + /** AgentInfo dispositionCode. */ + public dispositionCode: string; + + /** + * Creates a new AgentInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns AgentInfo instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.IAgentInfo): google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo; + + /** + * Encodes the specified AgentInfo message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo.verify|verify} messages. + * @param message AgentInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.IAgentInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AgentInfo message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo.verify|verify} messages. + * @param message AgentInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.IAgentInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AgentInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AgentInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo; + + /** + * Decodes an AgentInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AgentInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo; + + /** + * Verifies an AgentInfo message. + * @param message Plain 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 AgentInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AgentInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo; + + /** + * Creates a plain object from an AgentInfo message. Also converts values to other types if specified. + * @param message AgentInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AgentInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AgentInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a Transcript. */ + interface ITranscript { + + /** Transcript transcriptSegments */ + transcriptSegments?: (google.cloud.contactcenterinsights.v1.Conversation.Transcript.ITranscriptSegment[]|null); + } + + /** Represents a Transcript. */ + class Transcript implements ITranscript { + + /** + * Constructs a new Transcript. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.Conversation.ITranscript); + + /** Transcript transcriptSegments. */ + public transcriptSegments: google.cloud.contactcenterinsights.v1.Conversation.Transcript.ITranscriptSegment[]; + + /** + * Creates a new Transcript instance using the specified properties. + * @param [properties] Properties to set + * @returns Transcript instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.Conversation.ITranscript): google.cloud.contactcenterinsights.v1.Conversation.Transcript; + + /** + * Encodes the specified Transcript message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.verify|verify} messages. + * @param message Transcript message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.Conversation.ITranscript, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Transcript message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.verify|verify} messages. + * @param message Transcript message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.Conversation.ITranscript, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Transcript message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Transcript + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Conversation.Transcript; + + /** + * Decodes a Transcript message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Transcript + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Conversation.Transcript; + + /** + * Verifies a Transcript message. + * @param message Plain 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 Transcript message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Transcript + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Conversation.Transcript; + + /** + * Creates a plain object from a Transcript message. Also converts values to other types if specified. + * @param message Transcript + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.Conversation.Transcript, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Transcript to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Transcript + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Transcript { + + /** Properties of a TranscriptSegment. */ + interface ITranscriptSegment { + + /** TranscriptSegment messageTime */ + messageTime?: (google.protobuf.ITimestamp|null); + + /** TranscriptSegment text */ + text?: (string|null); + + /** TranscriptSegment confidence */ + confidence?: (number|null); + + /** TranscriptSegment words */ + words?: (google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IWordInfo[]|null); + + /** TranscriptSegment languageCode */ + languageCode?: (string|null); + + /** TranscriptSegment channelTag */ + channelTag?: (number|null); + + /** TranscriptSegment segmentParticipant */ + segmentParticipant?: (google.cloud.contactcenterinsights.v1.IConversationParticipant|null); + + /** TranscriptSegment dialogflowSegmentMetadata */ + dialogflowSegmentMetadata?: (google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IDialogflowSegmentMetadata|null); + + /** TranscriptSegment sentiment */ + sentiment?: (google.cloud.contactcenterinsights.v1.ISentimentData|null); + } + + /** Represents a TranscriptSegment. */ + class TranscriptSegment implements ITranscriptSegment { + + /** + * Constructs a new TranscriptSegment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.Conversation.Transcript.ITranscriptSegment); + + /** TranscriptSegment messageTime. */ + public messageTime?: (google.protobuf.ITimestamp|null); + + /** TranscriptSegment text. */ + public text: string; + + /** TranscriptSegment confidence. */ + public confidence: number; + + /** TranscriptSegment words. */ + public words: google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IWordInfo[]; + + /** TranscriptSegment languageCode. */ + public languageCode: string; + + /** TranscriptSegment channelTag. */ + public channelTag: number; + + /** TranscriptSegment segmentParticipant. */ + public segmentParticipant?: (google.cloud.contactcenterinsights.v1.IConversationParticipant|null); + + /** TranscriptSegment dialogflowSegmentMetadata. */ + public dialogflowSegmentMetadata?: (google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IDialogflowSegmentMetadata|null); + + /** TranscriptSegment sentiment. */ + public sentiment?: (google.cloud.contactcenterinsights.v1.ISentimentData|null); + + /** + * Creates a new TranscriptSegment instance using the specified properties. + * @param [properties] Properties to set + * @returns TranscriptSegment instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.Conversation.Transcript.ITranscriptSegment): google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment; + + /** + * Encodes the specified TranscriptSegment message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.verify|verify} messages. + * @param message TranscriptSegment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.Conversation.Transcript.ITranscriptSegment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TranscriptSegment message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.verify|verify} messages. + * @param message TranscriptSegment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.Conversation.Transcript.ITranscriptSegment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TranscriptSegment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TranscriptSegment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment; + + /** + * Decodes a TranscriptSegment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TranscriptSegment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment; + + /** + * Verifies a TranscriptSegment message. + * @param message Plain 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 TranscriptSegment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TranscriptSegment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment; + + /** + * Creates a plain object from a TranscriptSegment message. Also converts values to other types if specified. + * @param message TranscriptSegment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TranscriptSegment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TranscriptSegment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace TranscriptSegment { + + /** Properties of a WordInfo. */ + interface IWordInfo { + + /** WordInfo startOffset */ + startOffset?: (google.protobuf.IDuration|null); + + /** WordInfo endOffset */ + endOffset?: (google.protobuf.IDuration|null); + + /** WordInfo word */ + word?: (string|null); + + /** WordInfo confidence */ + confidence?: (number|null); + } + + /** Represents a WordInfo. */ + class WordInfo implements IWordInfo { + + /** + * Constructs a new WordInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IWordInfo); + + /** WordInfo startOffset. */ + public startOffset?: (google.protobuf.IDuration|null); + + /** WordInfo endOffset. */ + public endOffset?: (google.protobuf.IDuration|null); + + /** WordInfo word. */ + public word: string; + + /** WordInfo confidence. */ + public confidence: number; + + /** + * Creates a new WordInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns WordInfo instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IWordInfo): google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo; + + /** + * Encodes the specified WordInfo message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo.verify|verify} messages. + * @param message WordInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IWordInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WordInfo message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo.verify|verify} messages. + * @param message WordInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IWordInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WordInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WordInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo; + + /** + * Decodes a WordInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WordInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo; + + /** + * Verifies a WordInfo message. + * @param message Plain 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 WordInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WordInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo; + + /** + * Creates a plain object from a WordInfo message. Also converts values to other types if specified. + * @param message WordInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WordInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WordInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DialogflowSegmentMetadata. */ + interface IDialogflowSegmentMetadata { + + /** DialogflowSegmentMetadata smartReplyAllowlistCovered */ + smartReplyAllowlistCovered?: (boolean|null); + } + + /** Represents a DialogflowSegmentMetadata. */ + class DialogflowSegmentMetadata implements IDialogflowSegmentMetadata { + + /** + * Constructs a new DialogflowSegmentMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IDialogflowSegmentMetadata); + + /** DialogflowSegmentMetadata smartReplyAllowlistCovered. */ + public smartReplyAllowlistCovered: boolean; + + /** + * Creates a new DialogflowSegmentMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns DialogflowSegmentMetadata instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IDialogflowSegmentMetadata): google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata; + + /** + * Encodes the specified DialogflowSegmentMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata.verify|verify} messages. + * @param message DialogflowSegmentMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IDialogflowSegmentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DialogflowSegmentMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata.verify|verify} messages. + * @param message DialogflowSegmentMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IDialogflowSegmentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DialogflowSegmentMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DialogflowSegmentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata; + + /** + * Decodes a DialogflowSegmentMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DialogflowSegmentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata; + + /** + * Verifies a DialogflowSegmentMetadata message. + * @param message Plain 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 DialogflowSegmentMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DialogflowSegmentMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata; + + /** + * Creates a plain object from a DialogflowSegmentMetadata message. Also converts values to other types if specified. + * @param message DialogflowSegmentMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DialogflowSegmentMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DialogflowSegmentMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Medium enum. */ + enum Medium { + MEDIUM_UNSPECIFIED = 0, + PHONE_CALL = 1, + CHAT = 2 + } + } + + /** Properties of an Analysis. */ + interface IAnalysis { + + /** Analysis name */ + name?: (string|null); + + /** Analysis requestTime */ + requestTime?: (google.protobuf.ITimestamp|null); + + /** Analysis createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Analysis analysisResult */ + analysisResult?: (google.cloud.contactcenterinsights.v1.IAnalysisResult|null); + + /** Analysis annotatorSelector */ + annotatorSelector?: (google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null); + } + + /** Represents an Analysis. */ + class Analysis implements IAnalysis { + + /** + * Constructs a new Analysis. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IAnalysis); + + /** Analysis name. */ + public name: string; + + /** Analysis requestTime. */ + public requestTime?: (google.protobuf.ITimestamp|null); + + /** Analysis createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Analysis analysisResult. */ + public analysisResult?: (google.cloud.contactcenterinsights.v1.IAnalysisResult|null); + + /** Analysis annotatorSelector. */ + public annotatorSelector?: (google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null); + + /** + * Creates a new Analysis instance using the specified properties. + * @param [properties] Properties to set + * @returns Analysis instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IAnalysis): google.cloud.contactcenterinsights.v1.Analysis; + + /** + * Encodes the specified Analysis message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Analysis.verify|verify} messages. + * @param message Analysis message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IAnalysis, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Analysis message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Analysis.verify|verify} messages. + * @param message Analysis message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IAnalysis, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Analysis message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Analysis + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Analysis; + + /** + * Decodes an Analysis message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Analysis + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Analysis; + + /** + * Verifies an Analysis message. + * @param message Plain 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 Analysis message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Analysis + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Analysis; + + /** + * Creates a plain object from an Analysis message. Also converts values to other types if specified. + * @param message Analysis + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.Analysis, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Analysis to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Analysis + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConversationDataSource. */ + interface IConversationDataSource { + + /** ConversationDataSource gcsSource */ + gcsSource?: (google.cloud.contactcenterinsights.v1.IGcsSource|null); + + /** ConversationDataSource dialogflowSource */ + dialogflowSource?: (google.cloud.contactcenterinsights.v1.IDialogflowSource|null); + } + + /** Represents a ConversationDataSource. */ + class ConversationDataSource implements IConversationDataSource { + + /** + * Constructs a new ConversationDataSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IConversationDataSource); + + /** ConversationDataSource gcsSource. */ + public gcsSource?: (google.cloud.contactcenterinsights.v1.IGcsSource|null); + + /** ConversationDataSource dialogflowSource. */ + public dialogflowSource?: (google.cloud.contactcenterinsights.v1.IDialogflowSource|null); + + /** ConversationDataSource source. */ + public source?: ("gcsSource"|"dialogflowSource"); + + /** + * Creates a new ConversationDataSource instance using the specified properties. + * @param [properties] Properties to set + * @returns ConversationDataSource instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IConversationDataSource): google.cloud.contactcenterinsights.v1.ConversationDataSource; + + /** + * Encodes the specified ConversationDataSource message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationDataSource.verify|verify} messages. + * @param message ConversationDataSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IConversationDataSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConversationDataSource message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationDataSource.verify|verify} messages. + * @param message ConversationDataSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IConversationDataSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConversationDataSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConversationDataSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ConversationDataSource; + + /** + * Decodes a ConversationDataSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConversationDataSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ConversationDataSource; + + /** + * Verifies a ConversationDataSource message. + * @param message Plain 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 ConversationDataSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConversationDataSource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ConversationDataSource; + + /** + * Creates a plain object from a ConversationDataSource message. Also converts values to other types if specified. + * @param message ConversationDataSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ConversationDataSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConversationDataSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConversationDataSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GcsSource. */ + interface IGcsSource { + + /** GcsSource audioUri */ + audioUri?: (string|null); + + /** GcsSource transcriptUri */ + transcriptUri?: (string|null); + } + + /** Represents a GcsSource. */ + class GcsSource implements IGcsSource { + + /** + * Constructs a new GcsSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IGcsSource); + + /** GcsSource audioUri. */ + public audioUri: string; + + /** GcsSource transcriptUri. */ + public transcriptUri: string; + + /** + * Creates a new GcsSource instance using the specified properties. + * @param [properties] Properties to set + * @returns GcsSource instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IGcsSource): google.cloud.contactcenterinsights.v1.GcsSource; + + /** + * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GcsSource.verify|verify} messages. + * @param message GcsSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GcsSource.verify|verify} messages. + * @param message GcsSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GcsSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcsSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.GcsSource; + + /** + * Decodes a GcsSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcsSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.GcsSource; + + /** + * Verifies a GcsSource message. + * @param message Plain 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 GcsSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcsSource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.GcsSource; + + /** + * Creates a plain object from a GcsSource message. Also converts values to other types if specified. + * @param message GcsSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.GcsSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcsSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GcsSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DialogflowSource. */ + interface IDialogflowSource { + + /** DialogflowSource dialogflowConversation */ + dialogflowConversation?: (string|null); + + /** DialogflowSource audioUri */ + audioUri?: (string|null); + } + + /** Represents a DialogflowSource. */ + class DialogflowSource implements IDialogflowSource { + + /** + * Constructs a new DialogflowSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IDialogflowSource); + + /** DialogflowSource dialogflowConversation. */ + public dialogflowConversation: string; + + /** DialogflowSource audioUri. */ + public audioUri: string; + + /** + * Creates a new DialogflowSource instance using the specified properties. + * @param [properties] Properties to set + * @returns DialogflowSource instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IDialogflowSource): google.cloud.contactcenterinsights.v1.DialogflowSource; + + /** + * Encodes the specified DialogflowSource message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DialogflowSource.verify|verify} messages. + * @param message DialogflowSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IDialogflowSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DialogflowSource message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DialogflowSource.verify|verify} messages. + * @param message DialogflowSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IDialogflowSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DialogflowSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DialogflowSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.DialogflowSource; + + /** + * Decodes a DialogflowSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DialogflowSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.DialogflowSource; + + /** + * Verifies a DialogflowSource message. + * @param message Plain 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 DialogflowSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DialogflowSource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.DialogflowSource; + + /** + * Creates a plain object from a DialogflowSource message. Also converts values to other types if specified. + * @param message DialogflowSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.DialogflowSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DialogflowSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DialogflowSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AnalysisResult. */ + interface IAnalysisResult { - /** Represents a CallMetadata. */ - class CallMetadata implements ICallMetadata { + /** AnalysisResult callAnalysisMetadata */ + callAnalysisMetadata?: (google.cloud.contactcenterinsights.v1.AnalysisResult.ICallAnalysisMetadata|null); - /** - * Constructs a new CallMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.contactcenterinsights.v1.Conversation.ICallMetadata); + /** AnalysisResult endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } - /** CallMetadata customerChannel. */ - public customerChannel: number; + /** Represents an AnalysisResult. */ + class AnalysisResult implements IAnalysisResult { - /** CallMetadata agentChannel. */ - public agentChannel: number; + /** + * Constructs a new AnalysisResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IAnalysisResult); - /** - * Creates a new CallMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns CallMetadata instance - */ - public static create(properties?: google.cloud.contactcenterinsights.v1.Conversation.ICallMetadata): google.cloud.contactcenterinsights.v1.Conversation.CallMetadata; + /** AnalysisResult callAnalysisMetadata. */ + public callAnalysisMetadata?: (google.cloud.contactcenterinsights.v1.AnalysisResult.ICallAnalysisMetadata|null); - /** - * Encodes the specified CallMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.CallMetadata.verify|verify} messages. - * @param message CallMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.contactcenterinsights.v1.Conversation.ICallMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + /** AnalysisResult endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); - /** - * Encodes the specified CallMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.CallMetadata.verify|verify} messages. - * @param message CallMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.Conversation.ICallMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + /** AnalysisResult metadata. */ + public metadata?: "callAnalysisMetadata"; - /** - * Decodes a CallMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CallMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Conversation.CallMetadata; + /** + * Creates a new AnalysisResult instance using the specified properties. + * @param [properties] Properties to set + * @returns AnalysisResult instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IAnalysisResult): google.cloud.contactcenterinsights.v1.AnalysisResult; - /** - * Decodes a CallMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CallMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Conversation.CallMetadata; + /** + * Encodes the specified AnalysisResult message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnalysisResult.verify|verify} messages. + * @param message AnalysisResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IAnalysisResult, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a CallMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified AnalysisResult message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnalysisResult.verify|verify} messages. + * @param message AnalysisResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IAnalysisResult, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a CallMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CallMetadata - */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Conversation.CallMetadata; + /** + * Decodes an AnalysisResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnalysisResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.AnalysisResult; - /** - * Creates a plain object from a CallMetadata message. Also converts values to other types if specified. - * @param message CallMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.contactcenterinsights.v1.Conversation.CallMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes an AnalysisResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnalysisResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.AnalysisResult; - /** - * Converts this CallMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Verifies an AnalysisResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Gets the default type url for CallMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates an AnalysisResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnalysisResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.AnalysisResult; - /** Properties of a QualityMetadata. */ - interface IQualityMetadata { + /** + * Creates a plain object from an AnalysisResult message. Also converts values to other types if specified. + * @param message AnalysisResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.AnalysisResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** QualityMetadata customerSatisfactionRating */ - customerSatisfactionRating?: (number|null); + /** + * Converts this AnalysisResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** QualityMetadata waitDuration */ - waitDuration?: (google.protobuf.IDuration|null); + /** + * Gets the default type url for AnalysisResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** QualityMetadata menuPath */ - menuPath?: (string|null); + namespace AnalysisResult { - /** QualityMetadata agentInfo */ - agentInfo?: (google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.IAgentInfo[]|null); + /** Properties of a CallAnalysisMetadata. */ + interface ICallAnalysisMetadata { + + /** CallAnalysisMetadata annotations */ + annotations?: (google.cloud.contactcenterinsights.v1.ICallAnnotation[]|null); + + /** CallAnalysisMetadata entities */ + entities?: ({ [k: string]: google.cloud.contactcenterinsights.v1.IEntity }|null); + + /** CallAnalysisMetadata sentiments */ + sentiments?: (google.cloud.contactcenterinsights.v1.IConversationLevelSentiment[]|null); + + /** CallAnalysisMetadata silence */ + silence?: (google.cloud.contactcenterinsights.v1.IConversationLevelSilence|null); + + /** CallAnalysisMetadata intents */ + intents?: ({ [k: string]: google.cloud.contactcenterinsights.v1.IIntent }|null); + + /** CallAnalysisMetadata phraseMatchers */ + phraseMatchers?: ({ [k: string]: google.cloud.contactcenterinsights.v1.IPhraseMatchData }|null); + + /** CallAnalysisMetadata issueModelResult */ + issueModelResult?: (google.cloud.contactcenterinsights.v1.IIssueModelResult|null); + + /** CallAnalysisMetadata qaScorecardResults */ + qaScorecardResults?: (google.cloud.contactcenterinsights.v1.IQaScorecardResult[]|null); } - /** Represents a QualityMetadata. */ - class QualityMetadata implements IQualityMetadata { + /** Represents a CallAnalysisMetadata. */ + class CallAnalysisMetadata implements ICallAnalysisMetadata { /** - * Constructs a new QualityMetadata. + * Constructs a new CallAnalysisMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.Conversation.IQualityMetadata); + constructor(properties?: google.cloud.contactcenterinsights.v1.AnalysisResult.ICallAnalysisMetadata); - /** QualityMetadata customerSatisfactionRating. */ - public customerSatisfactionRating: number; + /** CallAnalysisMetadata annotations. */ + public annotations: google.cloud.contactcenterinsights.v1.ICallAnnotation[]; - /** QualityMetadata waitDuration. */ - public waitDuration?: (google.protobuf.IDuration|null); + /** CallAnalysisMetadata entities. */ + public entities: { [k: string]: google.cloud.contactcenterinsights.v1.IEntity }; - /** QualityMetadata menuPath. */ - public menuPath: string; + /** CallAnalysisMetadata sentiments. */ + public sentiments: google.cloud.contactcenterinsights.v1.IConversationLevelSentiment[]; - /** QualityMetadata agentInfo. */ - public agentInfo: google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.IAgentInfo[]; + /** CallAnalysisMetadata silence. */ + public silence?: (google.cloud.contactcenterinsights.v1.IConversationLevelSilence|null); + + /** CallAnalysisMetadata intents. */ + public intents: { [k: string]: google.cloud.contactcenterinsights.v1.IIntent }; + + /** CallAnalysisMetadata phraseMatchers. */ + public phraseMatchers: { [k: string]: google.cloud.contactcenterinsights.v1.IPhraseMatchData }; + + /** CallAnalysisMetadata issueModelResult. */ + public issueModelResult?: (google.cloud.contactcenterinsights.v1.IIssueModelResult|null); + + /** CallAnalysisMetadata qaScorecardResults. */ + public qaScorecardResults: google.cloud.contactcenterinsights.v1.IQaScorecardResult[]; /** - * Creates a new QualityMetadata instance using the specified properties. + * Creates a new CallAnalysisMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns QualityMetadata instance + * @returns CallAnalysisMetadata instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.Conversation.IQualityMetadata): google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata; + public static create(properties?: google.cloud.contactcenterinsights.v1.AnalysisResult.ICallAnalysisMetadata): google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata; /** - * Encodes the specified QualityMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.verify|verify} messages. - * @param message QualityMetadata message or plain object to encode + * Encodes the specified CallAnalysisMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.verify|verify} messages. + * @param message CallAnalysisMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.Conversation.IQualityMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.AnalysisResult.ICallAnalysisMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified QualityMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.verify|verify} messages. - * @param message QualityMetadata message or plain object to encode + * Encodes the specified CallAnalysisMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.verify|verify} messages. + * @param message CallAnalysisMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.Conversation.IQualityMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.AnalysisResult.ICallAnalysisMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a QualityMetadata message from the specified reader or buffer. + * Decodes a CallAnalysisMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns QualityMetadata + * @returns CallAnalysisMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata; /** - * Decodes a QualityMetadata message from the specified reader or buffer, length delimited. + * Decodes a CallAnalysisMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns QualityMetadata + * @returns CallAnalysisMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata; /** - * Verifies a QualityMetadata message. + * Verifies a CallAnalysisMetadata message. * @param message Plain 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 QualityMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a CallAnalysisMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns QualityMetadata + * @returns CallAnalysisMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata; /** - * Creates a plain object from a QualityMetadata message. Also converts values to other types if specified. - * @param message QualityMetadata + * Creates a plain object from a CallAnalysisMetadata message. Also converts values to other types if specified. + * @param message CallAnalysisMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this QualityMetadata to JSON. + * Converts this CallAnalysisMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for QualityMetadata + * Gets the default type url for CallAnalysisMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } + } - namespace QualityMetadata { - - /** Properties of an AgentInfo. */ - interface IAgentInfo { - - /** AgentInfo agentId */ - agentId?: (string|null); - - /** AgentInfo displayName */ - displayName?: (string|null); - - /** AgentInfo team */ - team?: (string|null); - - /** AgentInfo dispositionCode */ - dispositionCode?: (string|null); - } - - /** Represents an AgentInfo. */ - class AgentInfo implements IAgentInfo { - - /** - * Constructs a new AgentInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.IAgentInfo); + /** Properties of an IssueModelResult. */ + interface IIssueModelResult { - /** AgentInfo agentId. */ - public agentId: string; + /** IssueModelResult issueModel */ + issueModel?: (string|null); - /** AgentInfo displayName. */ - public displayName: string; + /** IssueModelResult issues */ + issues?: (google.cloud.contactcenterinsights.v1.IIssueAssignment[]|null); + } - /** AgentInfo team. */ - public team: string; + /** Represents an IssueModelResult. */ + class IssueModelResult implements IIssueModelResult { - /** AgentInfo dispositionCode. */ - public dispositionCode: string; + /** + * Constructs a new IssueModelResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IIssueModelResult); - /** - * Creates a new AgentInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns AgentInfo instance - */ - public static create(properties?: google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.IAgentInfo): google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo; + /** IssueModelResult issueModel. */ + public issueModel: string; - /** - * Encodes the specified AgentInfo message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo.verify|verify} messages. - * @param message AgentInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.IAgentInfo, writer?: $protobuf.Writer): $protobuf.Writer; + /** IssueModelResult issues. */ + public issues: google.cloud.contactcenterinsights.v1.IIssueAssignment[]; - /** - * Encodes the specified AgentInfo message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo.verify|verify} messages. - * @param message AgentInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.IAgentInfo, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new IssueModelResult instance using the specified properties. + * @param [properties] Properties to set + * @returns IssueModelResult instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IIssueModelResult): google.cloud.contactcenterinsights.v1.IssueModelResult; - /** - * Decodes an AgentInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AgentInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo; + /** + * Encodes the specified IssueModelResult message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModelResult.verify|verify} messages. + * @param message IssueModelResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IIssueModelResult, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes an AgentInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AgentInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo; + /** + * Encodes the specified IssueModelResult message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModelResult.verify|verify} messages. + * @param message IssueModelResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IIssueModelResult, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies an AgentInfo message. - * @param message 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 an IssueModelResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IssueModelResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.IssueModelResult; - /** - * Creates an AgentInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AgentInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo; + /** + * Decodes an IssueModelResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IssueModelResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.IssueModelResult; - /** - * Creates a plain object from an AgentInfo message. Also converts values to other types if specified. - * @param message AgentInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies an IssueModelResult message. + * @param message 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 AgentInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates an IssueModelResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IssueModelResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.IssueModelResult; - /** - * Gets the default type url for AgentInfo - * @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 IssueModelResult message. Also converts values to other types if specified. + * @param message IssueModelResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.IssueModelResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of a Transcript. */ - interface ITranscript { + /** + * Converts this IssueModelResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Transcript transcriptSegments */ - transcriptSegments?: (google.cloud.contactcenterinsights.v1.Conversation.Transcript.ITranscriptSegment[]|null); - } + /** + * Gets the default type url for IssueModelResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Represents a Transcript. */ - class Transcript implements ITranscript { + /** Properties of a FeedbackLabel. */ + interface IFeedbackLabel { - /** - * Constructs a new Transcript. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.contactcenterinsights.v1.Conversation.ITranscript); + /** FeedbackLabel label */ + label?: (string|null); - /** Transcript transcriptSegments. */ - public transcriptSegments: google.cloud.contactcenterinsights.v1.Conversation.Transcript.ITranscriptSegment[]; + /** FeedbackLabel qaAnswerLabel */ + qaAnswerLabel?: (google.cloud.contactcenterinsights.v1.QaAnswer.IAnswerValue|null); - /** - * Creates a new Transcript instance using the specified properties. - * @param [properties] Properties to set - * @returns Transcript instance - */ - public static create(properties?: google.cloud.contactcenterinsights.v1.Conversation.ITranscript): google.cloud.contactcenterinsights.v1.Conversation.Transcript; + /** FeedbackLabel name */ + name?: (string|null); - /** - * Encodes the specified Transcript message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.verify|verify} messages. - * @param message Transcript message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.contactcenterinsights.v1.Conversation.ITranscript, writer?: $protobuf.Writer): $protobuf.Writer; + /** FeedbackLabel labeledResource */ + labeledResource?: (string|null); - /** - * Encodes the specified Transcript message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.verify|verify} messages. - * @param message Transcript message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.Conversation.ITranscript, writer?: $protobuf.Writer): $protobuf.Writer; + /** FeedbackLabel createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** - * Decodes a Transcript message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Transcript - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Conversation.Transcript; + /** FeedbackLabel updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } - /** - * Decodes a Transcript message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Transcript - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Conversation.Transcript; + /** Represents a FeedbackLabel. */ + class FeedbackLabel implements IFeedbackLabel { - /** - * Verifies a Transcript message. - * @param message 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 FeedbackLabel. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IFeedbackLabel); - /** - * Creates a Transcript message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Transcript - */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Conversation.Transcript; + /** FeedbackLabel label. */ + public label?: (string|null); - /** - * Creates a plain object from a Transcript message. Also converts values to other types if specified. - * @param message Transcript - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.contactcenterinsights.v1.Conversation.Transcript, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FeedbackLabel qaAnswerLabel. */ + public qaAnswerLabel?: (google.cloud.contactcenterinsights.v1.QaAnswer.IAnswerValue|null); - /** - * Converts this Transcript to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** FeedbackLabel name. */ + public name: string; - /** - * Gets the default type url for Transcript - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** FeedbackLabel labeledResource. */ + public labeledResource: string; - namespace Transcript { + /** FeedbackLabel createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** Properties of a TranscriptSegment. */ - interface ITranscriptSegment { + /** FeedbackLabel updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** TranscriptSegment messageTime */ - messageTime?: (google.protobuf.ITimestamp|null); + /** FeedbackLabel labelType. */ + public labelType?: ("label"|"qaAnswerLabel"); - /** TranscriptSegment text */ - text?: (string|null); + /** + * Creates a new FeedbackLabel instance using the specified properties. + * @param [properties] Properties to set + * @returns FeedbackLabel instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IFeedbackLabel): google.cloud.contactcenterinsights.v1.FeedbackLabel; - /** TranscriptSegment confidence */ - confidence?: (number|null); + /** + * Encodes the specified FeedbackLabel message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.FeedbackLabel.verify|verify} messages. + * @param message FeedbackLabel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IFeedbackLabel, writer?: $protobuf.Writer): $protobuf.Writer; - /** TranscriptSegment words */ - words?: (google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IWordInfo[]|null); + /** + * Encodes the specified FeedbackLabel message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.FeedbackLabel.verify|verify} messages. + * @param message FeedbackLabel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IFeedbackLabel, writer?: $protobuf.Writer): $protobuf.Writer; - /** TranscriptSegment languageCode */ - languageCode?: (string|null); + /** + * Decodes a FeedbackLabel message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeedbackLabel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.FeedbackLabel; - /** TranscriptSegment channelTag */ - channelTag?: (number|null); + /** + * Decodes a FeedbackLabel message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeedbackLabel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.FeedbackLabel; - /** TranscriptSegment segmentParticipant */ - segmentParticipant?: (google.cloud.contactcenterinsights.v1.IConversationParticipant|null); + /** + * Verifies a FeedbackLabel message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** TranscriptSegment dialogflowSegmentMetadata */ - dialogflowSegmentMetadata?: (google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IDialogflowSegmentMetadata|null); + /** + * Creates a FeedbackLabel message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeedbackLabel + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.FeedbackLabel; - /** TranscriptSegment sentiment */ - sentiment?: (google.cloud.contactcenterinsights.v1.ISentimentData|null); - } + /** + * Creates a plain object from a FeedbackLabel message. Also converts values to other types if specified. + * @param message FeedbackLabel + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.FeedbackLabel, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Represents a TranscriptSegment. */ - class TranscriptSegment implements ITranscriptSegment { + /** + * Converts this FeedbackLabel to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Constructs a new TranscriptSegment. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.contactcenterinsights.v1.Conversation.Transcript.ITranscriptSegment); + /** + * Gets the default type url for FeedbackLabel + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** TranscriptSegment messageTime. */ - public messageTime?: (google.protobuf.ITimestamp|null); + /** Properties of a ConversationLevelSentiment. */ + interface IConversationLevelSentiment { - /** TranscriptSegment text. */ - public text: string; + /** ConversationLevelSentiment channelTag */ + channelTag?: (number|null); - /** TranscriptSegment confidence. */ - public confidence: number; + /** ConversationLevelSentiment sentimentData */ + sentimentData?: (google.cloud.contactcenterinsights.v1.ISentimentData|null); + } - /** TranscriptSegment words. */ - public words: google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IWordInfo[]; + /** Represents a ConversationLevelSentiment. */ + class ConversationLevelSentiment implements IConversationLevelSentiment { - /** TranscriptSegment languageCode. */ - public languageCode: string; + /** + * Constructs a new ConversationLevelSentiment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IConversationLevelSentiment); - /** TranscriptSegment channelTag. */ - public channelTag: number; + /** ConversationLevelSentiment channelTag. */ + public channelTag: number; - /** TranscriptSegment segmentParticipant. */ - public segmentParticipant?: (google.cloud.contactcenterinsights.v1.IConversationParticipant|null); + /** ConversationLevelSentiment sentimentData. */ + public sentimentData?: (google.cloud.contactcenterinsights.v1.ISentimentData|null); - /** TranscriptSegment dialogflowSegmentMetadata. */ - public dialogflowSegmentMetadata?: (google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IDialogflowSegmentMetadata|null); + /** + * Creates a new ConversationLevelSentiment instance using the specified properties. + * @param [properties] Properties to set + * @returns ConversationLevelSentiment instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IConversationLevelSentiment): google.cloud.contactcenterinsights.v1.ConversationLevelSentiment; - /** TranscriptSegment sentiment. */ - public sentiment?: (google.cloud.contactcenterinsights.v1.ISentimentData|null); + /** + * Encodes the specified ConversationLevelSentiment message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationLevelSentiment.verify|verify} messages. + * @param message ConversationLevelSentiment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IConversationLevelSentiment, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new TranscriptSegment instance using the specified properties. - * @param [properties] Properties to set - * @returns TranscriptSegment instance - */ - public static create(properties?: google.cloud.contactcenterinsights.v1.Conversation.Transcript.ITranscriptSegment): google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment; + /** + * Encodes the specified ConversationLevelSentiment message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationLevelSentiment.verify|verify} messages. + * @param message ConversationLevelSentiment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IConversationLevelSentiment, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified TranscriptSegment message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.verify|verify} messages. - * @param message TranscriptSegment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.contactcenterinsights.v1.Conversation.Transcript.ITranscriptSegment, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a ConversationLevelSentiment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConversationLevelSentiment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ConversationLevelSentiment; - /** - * Encodes the specified TranscriptSegment message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.verify|verify} messages. - * @param message TranscriptSegment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.Conversation.Transcript.ITranscriptSegment, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a ConversationLevelSentiment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConversationLevelSentiment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ConversationLevelSentiment; - /** - * Decodes a TranscriptSegment message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TranscriptSegment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment; + /** + * Verifies a ConversationLevelSentiment message. + * @param message Plain 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 ConversationLevelSentiment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConversationLevelSentiment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ConversationLevelSentiment; + + /** + * Creates a plain object from a ConversationLevelSentiment message. Also converts values to other types if specified. + * @param message ConversationLevelSentiment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ConversationLevelSentiment, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a TranscriptSegment message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TranscriptSegment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment; + /** + * Converts this ConversationLevelSentiment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Verifies a TranscriptSegment message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Gets the default type url for ConversationLevelSentiment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Creates a TranscriptSegment message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TranscriptSegment - */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment; + /** Properties of a ConversationLevelSilence. */ + interface IConversationLevelSilence { - /** - * Creates a plain object from a TranscriptSegment message. Also converts values to other types if specified. - * @param message TranscriptSegment - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ConversationLevelSilence silenceDuration */ + silenceDuration?: (google.protobuf.IDuration|null); - /** - * Converts this TranscriptSegment to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** ConversationLevelSilence silencePercentage */ + silencePercentage?: (number|null); + } - /** - * Gets the default type url for TranscriptSegment - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Represents a ConversationLevelSilence. */ + class ConversationLevelSilence implements IConversationLevelSilence { - namespace TranscriptSegment { + /** + * Constructs a new ConversationLevelSilence. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IConversationLevelSilence); - /** Properties of a WordInfo. */ - interface IWordInfo { + /** ConversationLevelSilence silenceDuration. */ + public silenceDuration?: (google.protobuf.IDuration|null); - /** WordInfo startOffset */ - startOffset?: (google.protobuf.IDuration|null); + /** ConversationLevelSilence silencePercentage. */ + public silencePercentage: number; - /** WordInfo endOffset */ - endOffset?: (google.protobuf.IDuration|null); + /** + * Creates a new ConversationLevelSilence instance using the specified properties. + * @param [properties] Properties to set + * @returns ConversationLevelSilence instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IConversationLevelSilence): google.cloud.contactcenterinsights.v1.ConversationLevelSilence; - /** WordInfo word */ - word?: (string|null); + /** + * Encodes the specified ConversationLevelSilence message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationLevelSilence.verify|verify} messages. + * @param message ConversationLevelSilence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IConversationLevelSilence, writer?: $protobuf.Writer): $protobuf.Writer; - /** WordInfo confidence */ - confidence?: (number|null); - } + /** + * Encodes the specified ConversationLevelSilence message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationLevelSilence.verify|verify} messages. + * @param message ConversationLevelSilence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IConversationLevelSilence, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a WordInfo. */ - class WordInfo implements IWordInfo { + /** + * Decodes a ConversationLevelSilence message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConversationLevelSilence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ConversationLevelSilence; - /** - * Constructs a new WordInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IWordInfo); + /** + * Decodes a ConversationLevelSilence message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConversationLevelSilence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ConversationLevelSilence; - /** WordInfo startOffset. */ - public startOffset?: (google.protobuf.IDuration|null); + /** + * Verifies a ConversationLevelSilence message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** WordInfo endOffset. */ - public endOffset?: (google.protobuf.IDuration|null); + /** + * Creates a ConversationLevelSilence message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConversationLevelSilence + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ConversationLevelSilence; - /** WordInfo word. */ - public word: string; + /** + * Creates a plain object from a ConversationLevelSilence message. Also converts values to other types if specified. + * @param message ConversationLevelSilence + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ConversationLevelSilence, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** WordInfo confidence. */ - public confidence: number; + /** + * Converts this ConversationLevelSilence to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates a new WordInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns WordInfo instance - */ - public static create(properties?: google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IWordInfo): google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo; + /** + * Gets the default type url for ConversationLevelSilence + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Encodes the specified WordInfo message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo.verify|verify} messages. - * @param message WordInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IWordInfo, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of an IssueAssignment. */ + interface IIssueAssignment { - /** - * Encodes the specified WordInfo message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo.verify|verify} messages. - * @param message WordInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IWordInfo, writer?: $protobuf.Writer): $protobuf.Writer; + /** IssueAssignment issue */ + issue?: (string|null); - /** - * Decodes a WordInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WordInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo; + /** IssueAssignment score */ + score?: (number|null); - /** - * Decodes a WordInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WordInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo; + /** IssueAssignment displayName */ + displayName?: (string|null); + } - /** - * Verifies a WordInfo message. - * @param message 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 an IssueAssignment. */ + class IssueAssignment implements IIssueAssignment { - /** - * Creates a WordInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WordInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo; + /** + * Constructs a new IssueAssignment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IIssueAssignment); - /** - * Creates a plain object from a WordInfo message. Also converts values to other types if specified. - * @param message WordInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** IssueAssignment issue. */ + public issue: string; - /** - * Converts this WordInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** IssueAssignment score. */ + public score: number; - /** - * Gets the default type url for WordInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** IssueAssignment displayName. */ + public displayName: string; - /** Properties of a DialogflowSegmentMetadata. */ - interface IDialogflowSegmentMetadata { + /** + * Creates a new IssueAssignment instance using the specified properties. + * @param [properties] Properties to set + * @returns IssueAssignment instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IIssueAssignment): google.cloud.contactcenterinsights.v1.IssueAssignment; - /** DialogflowSegmentMetadata smartReplyAllowlistCovered */ - smartReplyAllowlistCovered?: (boolean|null); - } + /** + * Encodes the specified IssueAssignment message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueAssignment.verify|verify} messages. + * @param message IssueAssignment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IIssueAssignment, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a DialogflowSegmentMetadata. */ - class DialogflowSegmentMetadata implements IDialogflowSegmentMetadata { + /** + * Encodes the specified IssueAssignment message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueAssignment.verify|verify} messages. + * @param message IssueAssignment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IIssueAssignment, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new DialogflowSegmentMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IDialogflowSegmentMetadata); + /** + * Decodes an IssueAssignment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IssueAssignment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.IssueAssignment; - /** DialogflowSegmentMetadata smartReplyAllowlistCovered. */ - public smartReplyAllowlistCovered: boolean; + /** + * Decodes an IssueAssignment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IssueAssignment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.IssueAssignment; - /** - * Creates a new DialogflowSegmentMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns DialogflowSegmentMetadata instance - */ - public static create(properties?: google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IDialogflowSegmentMetadata): google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata; + /** + * Verifies an IssueAssignment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Encodes the specified DialogflowSegmentMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata.verify|verify} messages. - * @param message DialogflowSegmentMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IDialogflowSegmentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates an IssueAssignment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IssueAssignment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.IssueAssignment; - /** - * Encodes the specified DialogflowSegmentMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata.verify|verify} messages. - * @param message DialogflowSegmentMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IDialogflowSegmentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from an IssueAssignment message. Also converts values to other types if specified. + * @param message IssueAssignment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.IssueAssignment, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a DialogflowSegmentMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DialogflowSegmentMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata; + /** + * Converts this IssueAssignment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Decodes a DialogflowSegmentMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DialogflowSegmentMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata; + /** + * Gets the default type url for IssueAssignment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Verifies a DialogflowSegmentMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Properties of a CallAnnotation. */ + interface ICallAnnotation { - /** - * Creates a DialogflowSegmentMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DialogflowSegmentMetadata - */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata; + /** CallAnnotation interruptionData */ + interruptionData?: (google.cloud.contactcenterinsights.v1.IInterruptionData|null); - /** - * Creates a plain object from a DialogflowSegmentMetadata message. Also converts values to other types if specified. - * @param message DialogflowSegmentMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** CallAnnotation sentimentData */ + sentimentData?: (google.cloud.contactcenterinsights.v1.ISentimentData|null); - /** - * Converts this DialogflowSegmentMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** CallAnnotation silenceData */ + silenceData?: (google.cloud.contactcenterinsights.v1.ISilenceData|null); - /** - * Gets the default type url for DialogflowSegmentMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } + /** CallAnnotation holdData */ + holdData?: (google.cloud.contactcenterinsights.v1.IHoldData|null); - /** Medium enum. */ - enum Medium { - MEDIUM_UNSPECIFIED = 0, - PHONE_CALL = 1, - CHAT = 2 - } - } + /** CallAnnotation entityMentionData */ + entityMentionData?: (google.cloud.contactcenterinsights.v1.IEntityMentionData|null); - /** Properties of an Analysis. */ - interface IAnalysis { + /** CallAnnotation intentMatchData */ + intentMatchData?: (google.cloud.contactcenterinsights.v1.IIntentMatchData|null); - /** Analysis name */ - name?: (string|null); + /** CallAnnotation phraseMatchData */ + phraseMatchData?: (google.cloud.contactcenterinsights.v1.IPhraseMatchData|null); - /** Analysis requestTime */ - requestTime?: (google.protobuf.ITimestamp|null); + /** CallAnnotation issueMatchData */ + issueMatchData?: (google.cloud.contactcenterinsights.v1.IIssueMatchData|null); - /** Analysis createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** CallAnnotation channelTag */ + channelTag?: (number|null); - /** Analysis analysisResult */ - analysisResult?: (google.cloud.contactcenterinsights.v1.IAnalysisResult|null); + /** CallAnnotation annotationStartBoundary */ + annotationStartBoundary?: (google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null); - /** Analysis annotatorSelector */ - annotatorSelector?: (google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null); + /** CallAnnotation annotationEndBoundary */ + annotationEndBoundary?: (google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null); } - /** Represents an Analysis. */ - class Analysis implements IAnalysis { + /** Represents a CallAnnotation. */ + class CallAnnotation implements ICallAnnotation { /** - * Constructs a new Analysis. + * Constructs a new CallAnnotation. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IAnalysis); + constructor(properties?: google.cloud.contactcenterinsights.v1.ICallAnnotation); - /** Analysis name. */ - public name: string; + /** CallAnnotation interruptionData. */ + public interruptionData?: (google.cloud.contactcenterinsights.v1.IInterruptionData|null); - /** Analysis requestTime. */ - public requestTime?: (google.protobuf.ITimestamp|null); + /** CallAnnotation sentimentData. */ + public sentimentData?: (google.cloud.contactcenterinsights.v1.ISentimentData|null); - /** Analysis createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** CallAnnotation silenceData. */ + public silenceData?: (google.cloud.contactcenterinsights.v1.ISilenceData|null); - /** Analysis analysisResult. */ - public analysisResult?: (google.cloud.contactcenterinsights.v1.IAnalysisResult|null); + /** CallAnnotation holdData. */ + public holdData?: (google.cloud.contactcenterinsights.v1.IHoldData|null); - /** Analysis annotatorSelector. */ - public annotatorSelector?: (google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null); + /** CallAnnotation entityMentionData. */ + public entityMentionData?: (google.cloud.contactcenterinsights.v1.IEntityMentionData|null); + + /** CallAnnotation intentMatchData. */ + public intentMatchData?: (google.cloud.contactcenterinsights.v1.IIntentMatchData|null); + + /** CallAnnotation phraseMatchData. */ + public phraseMatchData?: (google.cloud.contactcenterinsights.v1.IPhraseMatchData|null); + + /** CallAnnotation issueMatchData. */ + public issueMatchData?: (google.cloud.contactcenterinsights.v1.IIssueMatchData|null); + + /** CallAnnotation channelTag. */ + public channelTag: number; + + /** CallAnnotation annotationStartBoundary. */ + public annotationStartBoundary?: (google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null); + + /** CallAnnotation annotationEndBoundary. */ + public annotationEndBoundary?: (google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null); + + /** CallAnnotation data. */ + public data?: ("interruptionData"|"sentimentData"|"silenceData"|"holdData"|"entityMentionData"|"intentMatchData"|"phraseMatchData"|"issueMatchData"); /** - * Creates a new Analysis instance using the specified properties. + * Creates a new CallAnnotation instance using the specified properties. * @param [properties] Properties to set - * @returns Analysis instance + * @returns CallAnnotation instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IAnalysis): google.cloud.contactcenterinsights.v1.Analysis; + public static create(properties?: google.cloud.contactcenterinsights.v1.ICallAnnotation): google.cloud.contactcenterinsights.v1.CallAnnotation; /** - * Encodes the specified Analysis message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Analysis.verify|verify} messages. - * @param message Analysis message or plain object to encode + * Encodes the specified CallAnnotation message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CallAnnotation.verify|verify} messages. + * @param message CallAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IAnalysis, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.ICallAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Analysis message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Analysis.verify|verify} messages. - * @param message Analysis message or plain object to encode + * Encodes the specified CallAnnotation message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CallAnnotation.verify|verify} messages. + * @param message CallAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IAnalysis, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ICallAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Analysis message from the specified reader or buffer. + * Decodes a CallAnnotation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Analysis + * @returns CallAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Analysis; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.CallAnnotation; /** - * Decodes an Analysis message from the specified reader or buffer, length delimited. + * Decodes a CallAnnotation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Analysis + * @returns CallAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Analysis; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.CallAnnotation; /** - * Verifies an Analysis message. + * Verifies a CallAnnotation message. * @param message Plain 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 Analysis message from a plain object. Also converts values to their respective internal types. + * Creates a CallAnnotation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Analysis + * @returns CallAnnotation */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Analysis; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.CallAnnotation; /** - * Creates a plain object from an Analysis message. Also converts values to other types if specified. - * @param message Analysis + * Creates a plain object from a CallAnnotation message. Also converts values to other types if specified. + * @param message CallAnnotation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.Analysis, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.CallAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Analysis to JSON. + * Converts this CallAnnotation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Analysis + * Gets the default type url for CallAnnotation * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ConversationDataSource. */ - interface IConversationDataSource { + /** Properties of an AnnotationBoundary. */ + interface IAnnotationBoundary { - /** ConversationDataSource gcsSource */ - gcsSource?: (google.cloud.contactcenterinsights.v1.IGcsSource|null); + /** AnnotationBoundary wordIndex */ + wordIndex?: (number|null); - /** ConversationDataSource dialogflowSource */ - dialogflowSource?: (google.cloud.contactcenterinsights.v1.IDialogflowSource|null); + /** AnnotationBoundary transcriptIndex */ + transcriptIndex?: (number|null); } - /** Represents a ConversationDataSource. */ - class ConversationDataSource implements IConversationDataSource { + /** Represents an AnnotationBoundary. */ + class AnnotationBoundary implements IAnnotationBoundary { /** - * Constructs a new ConversationDataSource. + * Constructs a new AnnotationBoundary. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IConversationDataSource); + constructor(properties?: google.cloud.contactcenterinsights.v1.IAnnotationBoundary); - /** ConversationDataSource gcsSource. */ - public gcsSource?: (google.cloud.contactcenterinsights.v1.IGcsSource|null); + /** AnnotationBoundary wordIndex. */ + public wordIndex?: (number|null); - /** ConversationDataSource dialogflowSource. */ - public dialogflowSource?: (google.cloud.contactcenterinsights.v1.IDialogflowSource|null); + /** AnnotationBoundary transcriptIndex. */ + public transcriptIndex: number; - /** ConversationDataSource source. */ - public source?: ("gcsSource"|"dialogflowSource"); + /** AnnotationBoundary detailedBoundary. */ + public detailedBoundary?: "wordIndex"; /** - * Creates a new ConversationDataSource instance using the specified properties. + * Creates a new AnnotationBoundary instance using the specified properties. * @param [properties] Properties to set - * @returns ConversationDataSource instance + * @returns AnnotationBoundary instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IConversationDataSource): google.cloud.contactcenterinsights.v1.ConversationDataSource; + public static create(properties?: google.cloud.contactcenterinsights.v1.IAnnotationBoundary): google.cloud.contactcenterinsights.v1.AnnotationBoundary; /** - * Encodes the specified ConversationDataSource message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationDataSource.verify|verify} messages. - * @param message ConversationDataSource message or plain object to encode + * Encodes the specified AnnotationBoundary message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotationBoundary.verify|verify} messages. + * @param message AnnotationBoundary message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IConversationDataSource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IAnnotationBoundary, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ConversationDataSource message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationDataSource.verify|verify} messages. - * @param message ConversationDataSource message or plain object to encode + * Encodes the specified AnnotationBoundary message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotationBoundary.verify|verify} messages. + * @param message AnnotationBoundary message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IConversationDataSource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IAnnotationBoundary, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ConversationDataSource message from the specified reader or buffer. + * Decodes an AnnotationBoundary message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ConversationDataSource + * @returns AnnotationBoundary * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ConversationDataSource; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.AnnotationBoundary; /** - * Decodes a ConversationDataSource message from the specified reader or buffer, length delimited. + * Decodes an AnnotationBoundary message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ConversationDataSource + * @returns AnnotationBoundary * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ConversationDataSource; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.AnnotationBoundary; /** - * Verifies a ConversationDataSource message. + * Verifies an AnnotationBoundary message. * @param message Plain 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 ConversationDataSource message from a plain object. Also converts values to their respective internal types. + * Creates an AnnotationBoundary message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ConversationDataSource + * @returns AnnotationBoundary */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ConversationDataSource; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.AnnotationBoundary; /** - * Creates a plain object from a ConversationDataSource message. Also converts values to other types if specified. - * @param message ConversationDataSource + * Creates a plain object from an AnnotationBoundary message. Also converts values to other types if specified. + * @param message AnnotationBoundary * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.ConversationDataSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.AnnotationBoundary, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ConversationDataSource to JSON. + * Converts this AnnotationBoundary to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ConversationDataSource + * Gets the default type url for AnnotationBoundary * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GcsSource. */ - interface IGcsSource { + /** Properties of an Entity. */ + interface IEntity { - /** GcsSource audioUri */ - audioUri?: (string|null); + /** Entity displayName */ + displayName?: (string|null); - /** GcsSource transcriptUri */ - transcriptUri?: (string|null); + /** Entity type */ + type?: (google.cloud.contactcenterinsights.v1.Entity.Type|keyof typeof google.cloud.contactcenterinsights.v1.Entity.Type|null); + + /** Entity metadata */ + metadata?: ({ [k: string]: string }|null); + + /** Entity salience */ + salience?: (number|null); + + /** Entity sentiment */ + sentiment?: (google.cloud.contactcenterinsights.v1.ISentimentData|null); } - /** Represents a GcsSource. */ - class GcsSource implements IGcsSource { + /** Represents an Entity. */ + class Entity implements IEntity { /** - * Constructs a new GcsSource. + * Constructs a new Entity. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IGcsSource); + constructor(properties?: google.cloud.contactcenterinsights.v1.IEntity); - /** GcsSource audioUri. */ - public audioUri: string; + /** Entity displayName. */ + public displayName: string; - /** GcsSource transcriptUri. */ - public transcriptUri: string; + /** Entity type. */ + public type: (google.cloud.contactcenterinsights.v1.Entity.Type|keyof typeof google.cloud.contactcenterinsights.v1.Entity.Type); + + /** Entity metadata. */ + public metadata: { [k: string]: string }; + + /** Entity salience. */ + public salience: number; + + /** Entity sentiment. */ + public sentiment?: (google.cloud.contactcenterinsights.v1.ISentimentData|null); /** - * Creates a new GcsSource instance using the specified properties. + * Creates a new Entity instance using the specified properties. * @param [properties] Properties to set - * @returns GcsSource instance + * @returns Entity instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IGcsSource): google.cloud.contactcenterinsights.v1.GcsSource; + public static create(properties?: google.cloud.contactcenterinsights.v1.IEntity): google.cloud.contactcenterinsights.v1.Entity; /** - * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GcsSource.verify|verify} messages. - * @param message GcsSource message or plain object to encode + * Encodes the specified Entity message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Entity.verify|verify} messages. + * @param message Entity message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GcsSource.verify|verify} messages. - * @param message GcsSource message or plain object to encode + * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Entity.verify|verify} messages. + * @param message Entity message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GcsSource message from the specified reader or buffer. + * Decodes an Entity message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GcsSource + * @returns Entity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.GcsSource; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Entity; /** - * Decodes a GcsSource message from the specified reader or buffer, length delimited. + * Decodes an Entity message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GcsSource + * @returns Entity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.GcsSource; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Entity; /** - * Verifies a GcsSource message. + * Verifies an Entity message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GcsSource message from a plain object. Also converts values to their respective internal types. + * Creates an Entity message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GcsSource + * @returns Entity */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.GcsSource; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Entity; /** - * Creates a plain object from a GcsSource message. Also converts values to other types if specified. - * @param message GcsSource + * Creates a plain object from an Entity message. Also converts values to other types if specified. + * @param message Entity * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.GcsSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.Entity, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GcsSource to JSON. + * Converts this Entity to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GcsSource + * Gets the default type url for Entity * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DialogflowSource. */ - interface IDialogflowSource { + namespace Entity { - /** DialogflowSource dialogflowConversation */ - dialogflowConversation?: (string|null); + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + PERSON = 1, + LOCATION = 2, + ORGANIZATION = 3, + EVENT = 4, + WORK_OF_ART = 5, + CONSUMER_GOOD = 6, + OTHER = 7, + PHONE_NUMBER = 9, + ADDRESS = 10, + DATE = 11, + NUMBER = 12, + PRICE = 13 + } + } - /** DialogflowSource audioUri */ - audioUri?: (string|null); + /** Properties of an Intent. */ + interface IIntent { + + /** Intent id */ + id?: (string|null); + + /** Intent displayName */ + displayName?: (string|null); } - /** Represents a DialogflowSource. */ - class DialogflowSource implements IDialogflowSource { + /** Represents an Intent. */ + class Intent implements IIntent { /** - * Constructs a new DialogflowSource. + * Constructs a new Intent. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IDialogflowSource); + constructor(properties?: google.cloud.contactcenterinsights.v1.IIntent); - /** DialogflowSource dialogflowConversation. */ - public dialogflowConversation: string; + /** Intent id. */ + public id: string; - /** DialogflowSource audioUri. */ - public audioUri: string; + /** Intent displayName. */ + public displayName: string; /** - * Creates a new DialogflowSource instance using the specified properties. + * Creates a new Intent instance using the specified properties. * @param [properties] Properties to set - * @returns DialogflowSource instance + * @returns Intent instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IDialogflowSource): google.cloud.contactcenterinsights.v1.DialogflowSource; + public static create(properties?: google.cloud.contactcenterinsights.v1.IIntent): google.cloud.contactcenterinsights.v1.Intent; /** - * Encodes the specified DialogflowSource message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DialogflowSource.verify|verify} messages. - * @param message DialogflowSource message or plain object to encode + * Encodes the specified Intent message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Intent.verify|verify} messages. + * @param message Intent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IDialogflowSource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IIntent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DialogflowSource message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DialogflowSource.verify|verify} messages. - * @param message DialogflowSource message or plain object to encode + * Encodes the specified Intent message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Intent.verify|verify} messages. + * @param message Intent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IDialogflowSource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IIntent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DialogflowSource message from the specified reader or buffer. + * Decodes an Intent message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DialogflowSource + * @returns Intent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.DialogflowSource; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Intent; /** - * Decodes a DialogflowSource message from the specified reader or buffer, length delimited. + * Decodes an Intent message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DialogflowSource + * @returns Intent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.DialogflowSource; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Intent; /** - * Verifies a DialogflowSource message. + * Verifies an Intent message. * @param message Plain 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 DialogflowSource message from a plain object. Also converts values to their respective internal types. + * Creates an Intent message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DialogflowSource + * @returns Intent */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.DialogflowSource; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Intent; /** - * Creates a plain object from a DialogflowSource message. Also converts values to other types if specified. - * @param message DialogflowSource + * Creates a plain object from an Intent message. Also converts values to other types if specified. + * @param message Intent * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.DialogflowSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.Intent, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DialogflowSource to JSON. + * Converts this Intent to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DialogflowSource + * Gets the default type url for Intent * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AnalysisResult. */ - interface IAnalysisResult { + /** Properties of a PhraseMatchData. */ + interface IPhraseMatchData { - /** AnalysisResult callAnalysisMetadata */ - callAnalysisMetadata?: (google.cloud.contactcenterinsights.v1.AnalysisResult.ICallAnalysisMetadata|null); + /** PhraseMatchData phraseMatcher */ + phraseMatcher?: (string|null); - /** AnalysisResult endTime */ - endTime?: (google.protobuf.ITimestamp|null); + /** PhraseMatchData displayName */ + displayName?: (string|null); } - /** Represents an AnalysisResult. */ - class AnalysisResult implements IAnalysisResult { + /** Represents a PhraseMatchData. */ + class PhraseMatchData implements IPhraseMatchData { /** - * Constructs a new AnalysisResult. + * Constructs a new PhraseMatchData. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IAnalysisResult); - - /** AnalysisResult callAnalysisMetadata. */ - public callAnalysisMetadata?: (google.cloud.contactcenterinsights.v1.AnalysisResult.ICallAnalysisMetadata|null); + constructor(properties?: google.cloud.contactcenterinsights.v1.IPhraseMatchData); - /** AnalysisResult endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); + /** PhraseMatchData phraseMatcher. */ + public phraseMatcher: string; - /** AnalysisResult metadata. */ - public metadata?: "callAnalysisMetadata"; + /** PhraseMatchData displayName. */ + public displayName: string; /** - * Creates a new AnalysisResult instance using the specified properties. + * Creates a new PhraseMatchData instance using the specified properties. * @param [properties] Properties to set - * @returns AnalysisResult instance + * @returns PhraseMatchData instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IAnalysisResult): google.cloud.contactcenterinsights.v1.AnalysisResult; + public static create(properties?: google.cloud.contactcenterinsights.v1.IPhraseMatchData): google.cloud.contactcenterinsights.v1.PhraseMatchData; /** - * Encodes the specified AnalysisResult message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnalysisResult.verify|verify} messages. - * @param message AnalysisResult message or plain object to encode + * Encodes the specified PhraseMatchData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchData.verify|verify} messages. + * @param message PhraseMatchData message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IAnalysisResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IPhraseMatchData, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AnalysisResult message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnalysisResult.verify|verify} messages. - * @param message AnalysisResult message or plain object to encode + * Encodes the specified PhraseMatchData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchData.verify|verify} messages. + * @param message PhraseMatchData message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IAnalysisResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IPhraseMatchData, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AnalysisResult message from the specified reader or buffer. + * Decodes a PhraseMatchData message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AnalysisResult + * @returns PhraseMatchData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.AnalysisResult; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.PhraseMatchData; /** - * Decodes an AnalysisResult message from the specified reader or buffer, length delimited. + * Decodes a PhraseMatchData message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AnalysisResult + * @returns PhraseMatchData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.AnalysisResult; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.PhraseMatchData; /** - * Verifies an AnalysisResult message. + * Verifies a PhraseMatchData message. * @param message Plain 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 AnalysisResult message from a plain object. Also converts values to their respective internal types. + * Creates a PhraseMatchData message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AnalysisResult + * @returns PhraseMatchData */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.AnalysisResult; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.PhraseMatchData; /** - * Creates a plain object from an AnalysisResult message. Also converts values to other types if specified. - * @param message AnalysisResult + * Creates a plain object from a PhraseMatchData message. Also converts values to other types if specified. + * @param message PhraseMatchData * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.AnalysisResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.PhraseMatchData, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AnalysisResult to JSON. + * Converts this PhraseMatchData to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AnalysisResult + * Gets the default type url for PhraseMatchData * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace AnalysisResult { - - /** Properties of a CallAnalysisMetadata. */ - interface ICallAnalysisMetadata { - - /** CallAnalysisMetadata annotations */ - annotations?: (google.cloud.contactcenterinsights.v1.ICallAnnotation[]|null); - - /** CallAnalysisMetadata entities */ - entities?: ({ [k: string]: google.cloud.contactcenterinsights.v1.IEntity }|null); - - /** CallAnalysisMetadata sentiments */ - sentiments?: (google.cloud.contactcenterinsights.v1.IConversationLevelSentiment[]|null); - - /** CallAnalysisMetadata silence */ - silence?: (google.cloud.contactcenterinsights.v1.IConversationLevelSilence|null); - - /** CallAnalysisMetadata intents */ - intents?: ({ [k: string]: google.cloud.contactcenterinsights.v1.IIntent }|null); - - /** CallAnalysisMetadata phraseMatchers */ - phraseMatchers?: ({ [k: string]: google.cloud.contactcenterinsights.v1.IPhraseMatchData }|null); - - /** CallAnalysisMetadata issueModelResult */ - issueModelResult?: (google.cloud.contactcenterinsights.v1.IIssueModelResult|null); - } - - /** Represents a CallAnalysisMetadata. */ - class CallAnalysisMetadata implements ICallAnalysisMetadata { - - /** - * Constructs a new CallAnalysisMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.contactcenterinsights.v1.AnalysisResult.ICallAnalysisMetadata); - - /** CallAnalysisMetadata annotations. */ - public annotations: google.cloud.contactcenterinsights.v1.ICallAnnotation[]; - - /** CallAnalysisMetadata entities. */ - public entities: { [k: string]: google.cloud.contactcenterinsights.v1.IEntity }; - - /** CallAnalysisMetadata sentiments. */ - public sentiments: google.cloud.contactcenterinsights.v1.IConversationLevelSentiment[]; - - /** CallAnalysisMetadata silence. */ - public silence?: (google.cloud.contactcenterinsights.v1.IConversationLevelSilence|null); - - /** CallAnalysisMetadata intents. */ - public intents: { [k: string]: google.cloud.contactcenterinsights.v1.IIntent }; + /** Properties of a DialogflowIntent. */ + interface IDialogflowIntent { - /** CallAnalysisMetadata phraseMatchers. */ - public phraseMatchers: { [k: string]: google.cloud.contactcenterinsights.v1.IPhraseMatchData }; + /** DialogflowIntent displayName */ + displayName?: (string|null); + } - /** CallAnalysisMetadata issueModelResult. */ - public issueModelResult?: (google.cloud.contactcenterinsights.v1.IIssueModelResult|null); + /** Represents a DialogflowIntent. */ + class DialogflowIntent implements IDialogflowIntent { - /** - * Creates a new CallAnalysisMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns CallAnalysisMetadata instance - */ - public static create(properties?: google.cloud.contactcenterinsights.v1.AnalysisResult.ICallAnalysisMetadata): google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata; + /** + * Constructs a new DialogflowIntent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IDialogflowIntent); - /** - * Encodes the specified CallAnalysisMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.verify|verify} messages. - * @param message CallAnalysisMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.contactcenterinsights.v1.AnalysisResult.ICallAnalysisMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + /** DialogflowIntent displayName. */ + public displayName: string; - /** - * Encodes the specified CallAnalysisMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.verify|verify} messages. - * @param message CallAnalysisMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.AnalysisResult.ICallAnalysisMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new DialogflowIntent instance using the specified properties. + * @param [properties] Properties to set + * @returns DialogflowIntent instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IDialogflowIntent): google.cloud.contactcenterinsights.v1.DialogflowIntent; - /** - * Decodes a CallAnalysisMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CallAnalysisMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata; + /** + * Encodes the specified DialogflowIntent message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DialogflowIntent.verify|verify} messages. + * @param message DialogflowIntent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IDialogflowIntent, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a CallAnalysisMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CallAnalysisMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata; + /** + * Encodes the specified DialogflowIntent message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DialogflowIntent.verify|verify} messages. + * @param message DialogflowIntent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IDialogflowIntent, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a CallAnalysisMetadata message. - * @param message 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 DialogflowIntent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DialogflowIntent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.DialogflowIntent; - /** - * Creates a CallAnalysisMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CallAnalysisMetadata - */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata; + /** + * Decodes a DialogflowIntent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DialogflowIntent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.DialogflowIntent; - /** - * Creates a plain object from a CallAnalysisMetadata message. Also converts values to other types if specified. - * @param message CallAnalysisMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies a DialogflowIntent message. + * @param message 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 CallAnalysisMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a DialogflowIntent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DialogflowIntent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.DialogflowIntent; - /** - * Gets the default type url for CallAnalysisMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } + /** + * Creates a plain object from a DialogflowIntent message. Also converts values to other types if specified. + * @param message DialogflowIntent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.DialogflowIntent, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of an IssueModelResult. */ - interface IIssueModelResult { + /** + * Converts this DialogflowIntent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** IssueModelResult issueModel */ - issueModel?: (string|null); + /** + * Gets the default type url for DialogflowIntent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** IssueModelResult issues */ - issues?: (google.cloud.contactcenterinsights.v1.IIssueAssignment[]|null); + /** Properties of an InterruptionData. */ + interface IInterruptionData { } - /** Represents an IssueModelResult. */ - class IssueModelResult implements IIssueModelResult { + /** Represents an InterruptionData. */ + class InterruptionData implements IInterruptionData { /** - * Constructs a new IssueModelResult. + * Constructs a new InterruptionData. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IIssueModelResult); - - /** IssueModelResult issueModel. */ - public issueModel: string; - - /** IssueModelResult issues. */ - public issues: google.cloud.contactcenterinsights.v1.IIssueAssignment[]; + constructor(properties?: google.cloud.contactcenterinsights.v1.IInterruptionData); /** - * Creates a new IssueModelResult instance using the specified properties. + * Creates a new InterruptionData instance using the specified properties. * @param [properties] Properties to set - * @returns IssueModelResult instance + * @returns InterruptionData instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IIssueModelResult): google.cloud.contactcenterinsights.v1.IssueModelResult; + public static create(properties?: google.cloud.contactcenterinsights.v1.IInterruptionData): google.cloud.contactcenterinsights.v1.InterruptionData; /** - * Encodes the specified IssueModelResult message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModelResult.verify|verify} messages. - * @param message IssueModelResult message or plain object to encode + * Encodes the specified InterruptionData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InterruptionData.verify|verify} messages. + * @param message InterruptionData message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IIssueModelResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IInterruptionData, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified IssueModelResult message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModelResult.verify|verify} messages. - * @param message IssueModelResult message or plain object to encode + * Encodes the specified InterruptionData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InterruptionData.verify|verify} messages. + * @param message InterruptionData message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IIssueModelResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IInterruptionData, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an IssueModelResult message from the specified reader or buffer. + * Decodes an InterruptionData message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns IssueModelResult + * @returns InterruptionData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.IssueModelResult; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.InterruptionData; /** - * Decodes an IssueModelResult message from the specified reader or buffer, length delimited. + * Decodes an InterruptionData message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns IssueModelResult + * @returns InterruptionData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.IssueModelResult; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.InterruptionData; /** - * Verifies an IssueModelResult message. + * Verifies an InterruptionData message. * @param message Plain 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 IssueModelResult message from a plain object. Also converts values to their respective internal types. + * Creates an InterruptionData message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns IssueModelResult + * @returns InterruptionData */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.IssueModelResult; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.InterruptionData; /** - * Creates a plain object from an IssueModelResult message. Also converts values to other types if specified. - * @param message IssueModelResult + * Creates a plain object from an InterruptionData message. Also converts values to other types if specified. + * @param message InterruptionData * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.IssueModelResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.InterruptionData, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this IssueModelResult to JSON. + * Converts this InterruptionData to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for IssueModelResult + * Gets the default type url for InterruptionData * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ConversationLevelSentiment. */ - interface IConversationLevelSentiment { - - /** ConversationLevelSentiment channelTag */ - channelTag?: (number|null); - - /** ConversationLevelSentiment sentimentData */ - sentimentData?: (google.cloud.contactcenterinsights.v1.ISentimentData|null); + /** Properties of a SilenceData. */ + interface ISilenceData { } - /** Represents a ConversationLevelSentiment. */ - class ConversationLevelSentiment implements IConversationLevelSentiment { + /** Represents a SilenceData. */ + class SilenceData implements ISilenceData { /** - * Constructs a new ConversationLevelSentiment. + * Constructs a new SilenceData. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IConversationLevelSentiment); - - /** ConversationLevelSentiment channelTag. */ - public channelTag: number; - - /** ConversationLevelSentiment sentimentData. */ - public sentimentData?: (google.cloud.contactcenterinsights.v1.ISentimentData|null); + constructor(properties?: google.cloud.contactcenterinsights.v1.ISilenceData); /** - * Creates a new ConversationLevelSentiment instance using the specified properties. + * Creates a new SilenceData instance using the specified properties. * @param [properties] Properties to set - * @returns ConversationLevelSentiment instance + * @returns SilenceData instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IConversationLevelSentiment): google.cloud.contactcenterinsights.v1.ConversationLevelSentiment; + public static create(properties?: google.cloud.contactcenterinsights.v1.ISilenceData): google.cloud.contactcenterinsights.v1.SilenceData; /** - * Encodes the specified ConversationLevelSentiment message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationLevelSentiment.verify|verify} messages. - * @param message ConversationLevelSentiment message or plain object to encode + * Encodes the specified SilenceData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SilenceData.verify|verify} messages. + * @param message SilenceData message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IConversationLevelSentiment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.ISilenceData, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ConversationLevelSentiment message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationLevelSentiment.verify|verify} messages. - * @param message ConversationLevelSentiment message or plain object to encode + * Encodes the specified SilenceData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SilenceData.verify|verify} messages. + * @param message SilenceData message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IConversationLevelSentiment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ISilenceData, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ConversationLevelSentiment message from the specified reader or buffer. + * Decodes a SilenceData message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ConversationLevelSentiment + * @returns SilenceData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ConversationLevelSentiment; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.SilenceData; /** - * Decodes a ConversationLevelSentiment message from the specified reader or buffer, length delimited. + * Decodes a SilenceData message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ConversationLevelSentiment + * @returns SilenceData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ConversationLevelSentiment; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.SilenceData; /** - * Verifies a ConversationLevelSentiment message. + * Verifies a SilenceData message. * @param message Plain 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 ConversationLevelSentiment message from a plain object. Also converts values to their respective internal types. + * Creates a SilenceData message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ConversationLevelSentiment + * @returns SilenceData */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ConversationLevelSentiment; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.SilenceData; /** - * Creates a plain object from a ConversationLevelSentiment message. Also converts values to other types if specified. - * @param message ConversationLevelSentiment + * Creates a plain object from a SilenceData message. Also converts values to other types if specified. + * @param message SilenceData * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.ConversationLevelSentiment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.SilenceData, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ConversationLevelSentiment to JSON. + * Converts this SilenceData to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ConversationLevelSentiment + * Gets the default type url for SilenceData * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ConversationLevelSilence. */ - interface IConversationLevelSilence { - - /** ConversationLevelSilence silenceDuration */ - silenceDuration?: (google.protobuf.IDuration|null); - - /** ConversationLevelSilence silencePercentage */ - silencePercentage?: (number|null); + /** Properties of a HoldData. */ + interface IHoldData { } - /** Represents a ConversationLevelSilence. */ - class ConversationLevelSilence implements IConversationLevelSilence { + /** Represents a HoldData. */ + class HoldData implements IHoldData { /** - * Constructs a new ConversationLevelSilence. + * Constructs a new HoldData. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IConversationLevelSilence); - - /** ConversationLevelSilence silenceDuration. */ - public silenceDuration?: (google.protobuf.IDuration|null); - - /** ConversationLevelSilence silencePercentage. */ - public silencePercentage: number; + constructor(properties?: google.cloud.contactcenterinsights.v1.IHoldData); /** - * Creates a new ConversationLevelSilence instance using the specified properties. + * Creates a new HoldData instance using the specified properties. * @param [properties] Properties to set - * @returns ConversationLevelSilence instance + * @returns HoldData instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IConversationLevelSilence): google.cloud.contactcenterinsights.v1.ConversationLevelSilence; + public static create(properties?: google.cloud.contactcenterinsights.v1.IHoldData): google.cloud.contactcenterinsights.v1.HoldData; /** - * Encodes the specified ConversationLevelSilence message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationLevelSilence.verify|verify} messages. - * @param message ConversationLevelSilence message or plain object to encode + * Encodes the specified HoldData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.HoldData.verify|verify} messages. + * @param message HoldData message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IConversationLevelSilence, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IHoldData, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ConversationLevelSilence message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationLevelSilence.verify|verify} messages. - * @param message ConversationLevelSilence message or plain object to encode + * Encodes the specified HoldData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.HoldData.verify|verify} messages. + * @param message HoldData message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IConversationLevelSilence, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IHoldData, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ConversationLevelSilence message from the specified reader or buffer. + * Decodes a HoldData message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ConversationLevelSilence + * @returns HoldData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ConversationLevelSilence; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.HoldData; /** - * Decodes a ConversationLevelSilence message from the specified reader or buffer, length delimited. + * Decodes a HoldData message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ConversationLevelSilence + * @returns HoldData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ConversationLevelSilence; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.HoldData; /** - * Verifies a ConversationLevelSilence message. + * Verifies a HoldData message. * @param message Plain 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 ConversationLevelSilence message from a plain object. Also converts values to their respective internal types. + * Creates a HoldData message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ConversationLevelSilence + * @returns HoldData */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ConversationLevelSilence; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.HoldData; /** - * Creates a plain object from a ConversationLevelSilence message. Also converts values to other types if specified. - * @param message ConversationLevelSilence + * Creates a plain object from a HoldData message. Also converts values to other types if specified. + * @param message HoldData * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.ConversationLevelSilence, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.HoldData, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ConversationLevelSilence to JSON. + * Converts this HoldData to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ConversationLevelSilence + * Gets the default type url for HoldData * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an IssueAssignment. */ - interface IIssueAssignment { + /** Properties of an EntityMentionData. */ + interface IEntityMentionData { - /** IssueAssignment issue */ - issue?: (string|null); + /** EntityMentionData entityUniqueId */ + entityUniqueId?: (string|null); - /** IssueAssignment score */ - score?: (number|null); + /** EntityMentionData type */ + type?: (google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType|keyof typeof google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType|null); - /** IssueAssignment displayName */ - displayName?: (string|null); + /** EntityMentionData sentiment */ + sentiment?: (google.cloud.contactcenterinsights.v1.ISentimentData|null); } - /** Represents an IssueAssignment. */ - class IssueAssignment implements IIssueAssignment { + /** Represents an EntityMentionData. */ + class EntityMentionData implements IEntityMentionData { /** - * Constructs a new IssueAssignment. + * Constructs a new EntityMentionData. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IIssueAssignment); + constructor(properties?: google.cloud.contactcenterinsights.v1.IEntityMentionData); - /** IssueAssignment issue. */ - public issue: string; + /** EntityMentionData entityUniqueId. */ + public entityUniqueId: string; - /** IssueAssignment score. */ - public score: number; + /** EntityMentionData type. */ + public type: (google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType|keyof typeof google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType); - /** IssueAssignment displayName. */ - public displayName: string; + /** EntityMentionData sentiment. */ + public sentiment?: (google.cloud.contactcenterinsights.v1.ISentimentData|null); /** - * Creates a new IssueAssignment instance using the specified properties. + * Creates a new EntityMentionData instance using the specified properties. * @param [properties] Properties to set - * @returns IssueAssignment instance + * @returns EntityMentionData instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IIssueAssignment): google.cloud.contactcenterinsights.v1.IssueAssignment; + public static create(properties?: google.cloud.contactcenterinsights.v1.IEntityMentionData): google.cloud.contactcenterinsights.v1.EntityMentionData; /** - * Encodes the specified IssueAssignment message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueAssignment.verify|verify} messages. - * @param message IssueAssignment message or plain object to encode + * Encodes the specified EntityMentionData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.EntityMentionData.verify|verify} messages. + * @param message EntityMentionData message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IIssueAssignment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IEntityMentionData, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified IssueAssignment message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueAssignment.verify|verify} messages. - * @param message IssueAssignment message or plain object to encode + * Encodes the specified EntityMentionData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.EntityMentionData.verify|verify} messages. + * @param message EntityMentionData message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IIssueAssignment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IEntityMentionData, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an IssueAssignment message from the specified reader or buffer. + * Decodes an EntityMentionData message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns IssueAssignment + * @returns EntityMentionData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.IssueAssignment; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.EntityMentionData; /** - * Decodes an IssueAssignment message from the specified reader or buffer, length delimited. + * Decodes an EntityMentionData message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns IssueAssignment + * @returns EntityMentionData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.IssueAssignment; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.EntityMentionData; /** - * Verifies an IssueAssignment message. + * Verifies an EntityMentionData message. * @param message Plain 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 IssueAssignment message from a plain object. Also converts values to their respective internal types. + * Creates an EntityMentionData message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns IssueAssignment + * @returns EntityMentionData */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.IssueAssignment; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.EntityMentionData; /** - * Creates a plain object from an IssueAssignment message. Also converts values to other types if specified. - * @param message IssueAssignment + * Creates a plain object from an EntityMentionData message. Also converts values to other types if specified. + * @param message EntityMentionData * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.IssueAssignment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.EntityMentionData, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this IssueAssignment to JSON. + * Converts this EntityMentionData to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for IssueAssignment + * Gets the default type url for EntityMentionData * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CallAnnotation. */ - interface ICallAnnotation { - - /** CallAnnotation interruptionData */ - interruptionData?: (google.cloud.contactcenterinsights.v1.IInterruptionData|null); - - /** CallAnnotation sentimentData */ - sentimentData?: (google.cloud.contactcenterinsights.v1.ISentimentData|null); - - /** CallAnnotation silenceData */ - silenceData?: (google.cloud.contactcenterinsights.v1.ISilenceData|null); - - /** CallAnnotation holdData */ - holdData?: (google.cloud.contactcenterinsights.v1.IHoldData|null); - - /** CallAnnotation entityMentionData */ - entityMentionData?: (google.cloud.contactcenterinsights.v1.IEntityMentionData|null); - - /** CallAnnotation intentMatchData */ - intentMatchData?: (google.cloud.contactcenterinsights.v1.IIntentMatchData|null); - - /** CallAnnotation phraseMatchData */ - phraseMatchData?: (google.cloud.contactcenterinsights.v1.IPhraseMatchData|null); - - /** CallAnnotation issueMatchData */ - issueMatchData?: (google.cloud.contactcenterinsights.v1.IIssueMatchData|null); + namespace EntityMentionData { - /** CallAnnotation channelTag */ - channelTag?: (number|null); + /** MentionType enum. */ + enum MentionType { + MENTION_TYPE_UNSPECIFIED = 0, + PROPER = 1, + COMMON = 2 + } + } - /** CallAnnotation annotationStartBoundary */ - annotationStartBoundary?: (google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null); + /** Properties of an IntentMatchData. */ + interface IIntentMatchData { - /** CallAnnotation annotationEndBoundary */ - annotationEndBoundary?: (google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null); + /** IntentMatchData intentUniqueId */ + intentUniqueId?: (string|null); } - /** Represents a CallAnnotation. */ - class CallAnnotation implements ICallAnnotation { + /** Represents an IntentMatchData. */ + class IntentMatchData implements IIntentMatchData { /** - * Constructs a new CallAnnotation. + * Constructs a new IntentMatchData. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.ICallAnnotation); - - /** CallAnnotation interruptionData. */ - public interruptionData?: (google.cloud.contactcenterinsights.v1.IInterruptionData|null); - - /** CallAnnotation sentimentData. */ - public sentimentData?: (google.cloud.contactcenterinsights.v1.ISentimentData|null); - - /** CallAnnotation silenceData. */ - public silenceData?: (google.cloud.contactcenterinsights.v1.ISilenceData|null); - - /** CallAnnotation holdData. */ - public holdData?: (google.cloud.contactcenterinsights.v1.IHoldData|null); - - /** CallAnnotation entityMentionData. */ - public entityMentionData?: (google.cloud.contactcenterinsights.v1.IEntityMentionData|null); - - /** CallAnnotation intentMatchData. */ - public intentMatchData?: (google.cloud.contactcenterinsights.v1.IIntentMatchData|null); - - /** CallAnnotation phraseMatchData. */ - public phraseMatchData?: (google.cloud.contactcenterinsights.v1.IPhraseMatchData|null); - - /** CallAnnotation issueMatchData. */ - public issueMatchData?: (google.cloud.contactcenterinsights.v1.IIssueMatchData|null); - - /** CallAnnotation channelTag. */ - public channelTag: number; - - /** CallAnnotation annotationStartBoundary. */ - public annotationStartBoundary?: (google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null); - - /** CallAnnotation annotationEndBoundary. */ - public annotationEndBoundary?: (google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null); + constructor(properties?: google.cloud.contactcenterinsights.v1.IIntentMatchData); - /** CallAnnotation data. */ - public data?: ("interruptionData"|"sentimentData"|"silenceData"|"holdData"|"entityMentionData"|"intentMatchData"|"phraseMatchData"|"issueMatchData"); + /** IntentMatchData intentUniqueId. */ + public intentUniqueId: string; /** - * Creates a new CallAnnotation instance using the specified properties. + * Creates a new IntentMatchData instance using the specified properties. * @param [properties] Properties to set - * @returns CallAnnotation instance + * @returns IntentMatchData instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.ICallAnnotation): google.cloud.contactcenterinsights.v1.CallAnnotation; + public static create(properties?: google.cloud.contactcenterinsights.v1.IIntentMatchData): google.cloud.contactcenterinsights.v1.IntentMatchData; /** - * Encodes the specified CallAnnotation message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CallAnnotation.verify|verify} messages. - * @param message CallAnnotation message or plain object to encode + * Encodes the specified IntentMatchData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IntentMatchData.verify|verify} messages. + * @param message IntentMatchData message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.ICallAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IIntentMatchData, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CallAnnotation message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CallAnnotation.verify|verify} messages. - * @param message CallAnnotation message or plain object to encode + * Encodes the specified IntentMatchData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IntentMatchData.verify|verify} messages. + * @param message IntentMatchData message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ICallAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IIntentMatchData, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CallAnnotation message from the specified reader or buffer. + * Decodes an IntentMatchData message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CallAnnotation + * @returns IntentMatchData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.CallAnnotation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.IntentMatchData; /** - * Decodes a CallAnnotation message from the specified reader or buffer, length delimited. + * Decodes an IntentMatchData message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CallAnnotation + * @returns IntentMatchData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.CallAnnotation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.IntentMatchData; /** - * Verifies a CallAnnotation message. + * Verifies an IntentMatchData message. * @param message Plain 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 CallAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates an IntentMatchData message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CallAnnotation + * @returns IntentMatchData */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.CallAnnotation; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.IntentMatchData; /** - * Creates a plain object from a CallAnnotation message. Also converts values to other types if specified. - * @param message CallAnnotation + * Creates a plain object from an IntentMatchData message. Also converts values to other types if specified. + * @param message IntentMatchData * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.CallAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.IntentMatchData, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CallAnnotation to JSON. + * Converts this IntentMatchData to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CallAnnotation + * Gets the default type url for IntentMatchData * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AnnotationBoundary. */ - interface IAnnotationBoundary { + /** Properties of a SentimentData. */ + interface ISentimentData { - /** AnnotationBoundary wordIndex */ - wordIndex?: (number|null); + /** SentimentData magnitude */ + magnitude?: (number|null); - /** AnnotationBoundary transcriptIndex */ - transcriptIndex?: (number|null); + /** SentimentData score */ + score?: (number|null); } - /** Represents an AnnotationBoundary. */ - class AnnotationBoundary implements IAnnotationBoundary { + /** Represents a SentimentData. */ + class SentimentData implements ISentimentData { /** - * Constructs a new AnnotationBoundary. + * Constructs a new SentimentData. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IAnnotationBoundary); - - /** AnnotationBoundary wordIndex. */ - public wordIndex?: (number|null); + constructor(properties?: google.cloud.contactcenterinsights.v1.ISentimentData); - /** AnnotationBoundary transcriptIndex. */ - public transcriptIndex: number; + /** SentimentData magnitude. */ + public magnitude: number; - /** AnnotationBoundary detailedBoundary. */ - public detailedBoundary?: "wordIndex"; + /** SentimentData score. */ + public score: number; /** - * Creates a new AnnotationBoundary instance using the specified properties. + * Creates a new SentimentData instance using the specified properties. * @param [properties] Properties to set - * @returns AnnotationBoundary instance + * @returns SentimentData instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IAnnotationBoundary): google.cloud.contactcenterinsights.v1.AnnotationBoundary; + public static create(properties?: google.cloud.contactcenterinsights.v1.ISentimentData): google.cloud.contactcenterinsights.v1.SentimentData; /** - * Encodes the specified AnnotationBoundary message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotationBoundary.verify|verify} messages. - * @param message AnnotationBoundary message or plain object to encode + * Encodes the specified SentimentData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SentimentData.verify|verify} messages. + * @param message SentimentData message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IAnnotationBoundary, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.ISentimentData, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AnnotationBoundary message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotationBoundary.verify|verify} messages. - * @param message AnnotationBoundary message or plain object to encode + * Encodes the specified SentimentData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SentimentData.verify|verify} messages. + * @param message SentimentData message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IAnnotationBoundary, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ISentimentData, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AnnotationBoundary message from the specified reader or buffer. + * Decodes a SentimentData message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AnnotationBoundary + * @returns SentimentData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.AnnotationBoundary; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.SentimentData; /** - * Decodes an AnnotationBoundary message from the specified reader or buffer, length delimited. + * Decodes a SentimentData message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AnnotationBoundary + * @returns SentimentData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.AnnotationBoundary; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.SentimentData; /** - * Verifies an AnnotationBoundary message. + * Verifies a SentimentData message. * @param message Plain 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 AnnotationBoundary message from a plain object. Also converts values to their respective internal types. + * Creates a SentimentData message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AnnotationBoundary + * @returns SentimentData */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.AnnotationBoundary; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.SentimentData; /** - * Creates a plain object from an AnnotationBoundary message. Also converts values to other types if specified. - * @param message AnnotationBoundary + * Creates a plain object from a SentimentData message. Also converts values to other types if specified. + * @param message SentimentData * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.AnnotationBoundary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.SentimentData, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AnnotationBoundary to JSON. + * Converts this SentimentData to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AnnotationBoundary + * Gets the default type url for SentimentData * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an Entity. */ - interface IEntity { - - /** Entity displayName */ - displayName?: (string|null); - - /** Entity type */ - type?: (google.cloud.contactcenterinsights.v1.Entity.Type|keyof typeof google.cloud.contactcenterinsights.v1.Entity.Type|null); - - /** Entity metadata */ - metadata?: ({ [k: string]: string }|null); - - /** Entity salience */ - salience?: (number|null); + /** Properties of an IssueMatchData. */ + interface IIssueMatchData { - /** Entity sentiment */ - sentiment?: (google.cloud.contactcenterinsights.v1.ISentimentData|null); + /** IssueMatchData issueAssignment */ + issueAssignment?: (google.cloud.contactcenterinsights.v1.IIssueAssignment|null); } - /** Represents an Entity. */ - class Entity implements IEntity { + /** Represents an IssueMatchData. */ + class IssueMatchData implements IIssueMatchData { /** - * Constructs a new Entity. + * Constructs a new IssueMatchData. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IEntity); - - /** Entity displayName. */ - public displayName: string; - - /** Entity type. */ - public type: (google.cloud.contactcenterinsights.v1.Entity.Type|keyof typeof google.cloud.contactcenterinsights.v1.Entity.Type); - - /** Entity metadata. */ - public metadata: { [k: string]: string }; - - /** Entity salience. */ - public salience: number; + constructor(properties?: google.cloud.contactcenterinsights.v1.IIssueMatchData); - /** Entity sentiment. */ - public sentiment?: (google.cloud.contactcenterinsights.v1.ISentimentData|null); + /** IssueMatchData issueAssignment. */ + public issueAssignment?: (google.cloud.contactcenterinsights.v1.IIssueAssignment|null); /** - * Creates a new Entity instance using the specified properties. + * Creates a new IssueMatchData instance using the specified properties. * @param [properties] Properties to set - * @returns Entity instance + * @returns IssueMatchData instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IEntity): google.cloud.contactcenterinsights.v1.Entity; + public static create(properties?: google.cloud.contactcenterinsights.v1.IIssueMatchData): google.cloud.contactcenterinsights.v1.IssueMatchData; /** - * Encodes the specified Entity message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Entity.verify|verify} messages. - * @param message Entity message or plain object to encode + * Encodes the specified IssueMatchData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueMatchData.verify|verify} messages. + * @param message IssueMatchData message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IIssueMatchData, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Entity.verify|verify} messages. - * @param message Entity message or plain object to encode + * Encodes the specified IssueMatchData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueMatchData.verify|verify} messages. + * @param message IssueMatchData message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IIssueMatchData, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Entity message from the specified reader or buffer. + * Decodes an IssueMatchData message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Entity + * @returns IssueMatchData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Entity; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.IssueMatchData; /** - * Decodes an Entity message from the specified reader or buffer, length delimited. + * Decodes an IssueMatchData message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Entity + * @returns IssueMatchData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Entity; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.IssueMatchData; /** - * Verifies an Entity message. + * Verifies an IssueMatchData message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an Entity message from a plain object. Also converts values to their respective internal types. + * Creates an IssueMatchData message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Entity + * @returns IssueMatchData */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Entity; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.IssueMatchData; /** - * Creates a plain object from an Entity message. Also converts values to other types if specified. - * @param message Entity + * Creates a plain object from an IssueMatchData message. Also converts values to other types if specified. + * @param message IssueMatchData * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.Entity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.IssueMatchData, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Entity to JSON. + * Converts this IssueMatchData to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Entity + * Gets the default type url for IssueMatchData * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Entity { + /** Properties of an IssueModel. */ + interface IIssueModel { - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - PERSON = 1, - LOCATION = 2, - ORGANIZATION = 3, - EVENT = 4, - WORK_OF_ART = 5, - CONSUMER_GOOD = 6, - OTHER = 7, - PHONE_NUMBER = 9, - ADDRESS = 10, - DATE = 11, - NUMBER = 12, - PRICE = 13 - } - } + /** IssueModel name */ + name?: (string|null); - /** Properties of an Intent. */ - interface IIntent { + /** IssueModel displayName */ + displayName?: (string|null); - /** Intent id */ - id?: (string|null); + /** IssueModel createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** Intent displayName */ - displayName?: (string|null); + /** IssueModel updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** IssueModel issueCount */ + issueCount?: (number|Long|string|null); + + /** IssueModel state */ + state?: (google.cloud.contactcenterinsights.v1.IssueModel.State|keyof typeof google.cloud.contactcenterinsights.v1.IssueModel.State|null); + + /** IssueModel inputDataConfig */ + inputDataConfig?: (google.cloud.contactcenterinsights.v1.IssueModel.IInputDataConfig|null); + + /** IssueModel trainingStats */ + trainingStats?: (google.cloud.contactcenterinsights.v1.IIssueModelLabelStats|null); + + /** IssueModel modelType */ + modelType?: (google.cloud.contactcenterinsights.v1.IssueModel.ModelType|keyof typeof google.cloud.contactcenterinsights.v1.IssueModel.ModelType|null); + + /** IssueModel languageCode */ + languageCode?: (string|null); } - /** Represents an Intent. */ - class Intent implements IIntent { + /** Represents an IssueModel. */ + class IssueModel implements IIssueModel { + + /** + * Constructs a new IssueModel. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IIssueModel); + + /** IssueModel name. */ + public name: string; + + /** IssueModel displayName. */ + public displayName: string; + + /** IssueModel createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** IssueModel updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** IssueModel issueCount. */ + public issueCount: (number|Long|string); + + /** IssueModel state. */ + public state: (google.cloud.contactcenterinsights.v1.IssueModel.State|keyof typeof google.cloud.contactcenterinsights.v1.IssueModel.State); + + /** IssueModel inputDataConfig. */ + public inputDataConfig?: (google.cloud.contactcenterinsights.v1.IssueModel.IInputDataConfig|null); - /** - * Constructs a new Intent. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IIntent); + /** IssueModel trainingStats. */ + public trainingStats?: (google.cloud.contactcenterinsights.v1.IIssueModelLabelStats|null); - /** Intent id. */ - public id: string; + /** IssueModel modelType. */ + public modelType: (google.cloud.contactcenterinsights.v1.IssueModel.ModelType|keyof typeof google.cloud.contactcenterinsights.v1.IssueModel.ModelType); - /** Intent displayName. */ - public displayName: string; + /** IssueModel languageCode. */ + public languageCode: string; /** - * Creates a new Intent instance using the specified properties. + * Creates a new IssueModel instance using the specified properties. * @param [properties] Properties to set - * @returns Intent instance + * @returns IssueModel instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IIntent): google.cloud.contactcenterinsights.v1.Intent; + public static create(properties?: google.cloud.contactcenterinsights.v1.IIssueModel): google.cloud.contactcenterinsights.v1.IssueModel; /** - * Encodes the specified Intent message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Intent.verify|verify} messages. - * @param message Intent message or plain object to encode + * Encodes the specified IssueModel message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModel.verify|verify} messages. + * @param message IssueModel message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IIntent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IIssueModel, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Intent message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Intent.verify|verify} messages. - * @param message Intent message or plain object to encode + * Encodes the specified IssueModel message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModel.verify|verify} messages. + * @param message IssueModel message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IIntent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IIssueModel, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Intent message from the specified reader or buffer. + * Decodes an IssueModel message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Intent + * @returns IssueModel * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Intent; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.IssueModel; /** - * Decodes an Intent message from the specified reader or buffer, length delimited. + * Decodes an IssueModel message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Intent + * @returns IssueModel * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Intent; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.IssueModel; /** - * Verifies an Intent message. + * Verifies an IssueModel message. * @param message Plain 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 Intent message from a plain object. Also converts values to their respective internal types. + * Creates an IssueModel message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Intent + * @returns IssueModel */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Intent; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.IssueModel; /** - * Creates a plain object from an Intent message. Also converts values to other types if specified. - * @param message Intent + * Creates a plain object from an IssueModel message. Also converts values to other types if specified. + * @param message IssueModel * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.Intent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.IssueModel, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Intent to JSON. + * Converts this IssueModel to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Intent + * Gets the default type url for IssueModel * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a PhraseMatchData. */ - interface IPhraseMatchData { + namespace IssueModel { - /** PhraseMatchData phraseMatcher */ - phraseMatcher?: (string|null); + /** Properties of an InputDataConfig. */ + interface IInputDataConfig { - /** PhraseMatchData displayName */ + /** InputDataConfig medium */ + medium?: (google.cloud.contactcenterinsights.v1.Conversation.Medium|keyof typeof google.cloud.contactcenterinsights.v1.Conversation.Medium|null); + + /** InputDataConfig trainingConversationsCount */ + trainingConversationsCount?: (number|Long|string|null); + + /** InputDataConfig filter */ + filter?: (string|null); + } + + /** Represents an InputDataConfig. */ + class InputDataConfig implements IInputDataConfig { + + /** + * Constructs a new InputDataConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IssueModel.IInputDataConfig); + + /** InputDataConfig medium. */ + public medium: (google.cloud.contactcenterinsights.v1.Conversation.Medium|keyof typeof google.cloud.contactcenterinsights.v1.Conversation.Medium); + + /** InputDataConfig trainingConversationsCount. */ + public trainingConversationsCount: (number|Long|string); + + /** InputDataConfig filter. */ + public filter: string; + + /** + * Creates a new InputDataConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns InputDataConfig instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IssueModel.IInputDataConfig): google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig; + + /** + * Encodes the specified InputDataConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig.verify|verify} messages. + * @param message InputDataConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IssueModel.IInputDataConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InputDataConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig.verify|verify} messages. + * @param message InputDataConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IssueModel.IInputDataConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InputDataConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InputDataConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig; + + /** + * Decodes an InputDataConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InputDataConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig; + + /** + * Verifies an InputDataConfig message. + * @param message Plain 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 InputDataConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InputDataConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig; + + /** + * Creates a plain object from an InputDataConfig message. Also converts values to other types if specified. + * @param message InputDataConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InputDataConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InputDataConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + UNDEPLOYED = 1, + DEPLOYING = 2, + DEPLOYED = 3, + UNDEPLOYING = 4, + DELETING = 5 + } + + /** ModelType enum. */ + enum ModelType { + MODEL_TYPE_UNSPECIFIED = 0, + TYPE_V1 = 1, + TYPE_V2 = 2 + } + } + + /** Properties of an Issue. */ + interface IIssue { + + /** Issue name */ + name?: (string|null); + + /** Issue displayName */ displayName?: (string|null); + + /** Issue createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Issue updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Issue sampleUtterances */ + sampleUtterances?: (string[]|null); + + /** Issue displayDescription */ + displayDescription?: (string|null); } - /** Represents a PhraseMatchData. */ - class PhraseMatchData implements IPhraseMatchData { + /** Represents an Issue. */ + class Issue implements IIssue { /** - * Constructs a new PhraseMatchData. + * Constructs a new Issue. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IPhraseMatchData); + constructor(properties?: google.cloud.contactcenterinsights.v1.IIssue); - /** PhraseMatchData phraseMatcher. */ - public phraseMatcher: string; + /** Issue name. */ + public name: string; - /** PhraseMatchData displayName. */ + /** Issue displayName. */ public displayName: string; + /** Issue createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Issue updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Issue sampleUtterances. */ + public sampleUtterances: string[]; + + /** Issue displayDescription. */ + public displayDescription: string; + /** - * Creates a new PhraseMatchData instance using the specified properties. + * Creates a new Issue instance using the specified properties. * @param [properties] Properties to set - * @returns PhraseMatchData instance + * @returns Issue instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IPhraseMatchData): google.cloud.contactcenterinsights.v1.PhraseMatchData; + public static create(properties?: google.cloud.contactcenterinsights.v1.IIssue): google.cloud.contactcenterinsights.v1.Issue; /** - * Encodes the specified PhraseMatchData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchData.verify|verify} messages. - * @param message PhraseMatchData message or plain object to encode + * Encodes the specified Issue message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Issue.verify|verify} messages. + * @param message Issue message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IPhraseMatchData, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IIssue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PhraseMatchData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchData.verify|verify} messages. - * @param message PhraseMatchData message or plain object to encode + * Encodes the specified Issue message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Issue.verify|verify} messages. + * @param message Issue message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IPhraseMatchData, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IIssue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PhraseMatchData message from the specified reader or buffer. + * Decodes an Issue message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PhraseMatchData + * @returns Issue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.PhraseMatchData; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Issue; /** - * Decodes a PhraseMatchData message from the specified reader or buffer, length delimited. + * Decodes an Issue message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PhraseMatchData + * @returns Issue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.PhraseMatchData; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Issue; /** - * Verifies a PhraseMatchData message. + * Verifies an Issue message. * @param message Plain 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 PhraseMatchData message from a plain object. Also converts values to their respective internal types. + * Creates an Issue message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PhraseMatchData + * @returns Issue */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.PhraseMatchData; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Issue; /** - * Creates a plain object from a PhraseMatchData message. Also converts values to other types if specified. - * @param message PhraseMatchData + * Creates a plain object from an Issue message. Also converts values to other types if specified. + * @param message Issue * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.PhraseMatchData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.Issue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PhraseMatchData to JSON. + * Converts this Issue to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PhraseMatchData + * Gets the default type url for Issue * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DialogflowIntent. */ - interface IDialogflowIntent { + /** Properties of an IssueModelLabelStats. */ + interface IIssueModelLabelStats { - /** DialogflowIntent displayName */ - displayName?: (string|null); + /** IssueModelLabelStats analyzedConversationsCount */ + analyzedConversationsCount?: (number|Long|string|null); + + /** IssueModelLabelStats unclassifiedConversationsCount */ + unclassifiedConversationsCount?: (number|Long|string|null); + + /** IssueModelLabelStats issueStats */ + issueStats?: ({ [k: string]: google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IIssueStats }|null); } - /** Represents a DialogflowIntent. */ - class DialogflowIntent implements IDialogflowIntent { + /** Represents an IssueModelLabelStats. */ + class IssueModelLabelStats implements IIssueModelLabelStats { /** - * Constructs a new DialogflowIntent. + * Constructs a new IssueModelLabelStats. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IDialogflowIntent); + constructor(properties?: google.cloud.contactcenterinsights.v1.IIssueModelLabelStats); - /** DialogflowIntent displayName. */ - public displayName: string; + /** IssueModelLabelStats analyzedConversationsCount. */ + public analyzedConversationsCount: (number|Long|string); + + /** IssueModelLabelStats unclassifiedConversationsCount. */ + public unclassifiedConversationsCount: (number|Long|string); + + /** IssueModelLabelStats issueStats. */ + public issueStats: { [k: string]: google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IIssueStats }; /** - * Creates a new DialogflowIntent instance using the specified properties. + * Creates a new IssueModelLabelStats instance using the specified properties. * @param [properties] Properties to set - * @returns DialogflowIntent instance + * @returns IssueModelLabelStats instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IDialogflowIntent): google.cloud.contactcenterinsights.v1.DialogflowIntent; + public static create(properties?: google.cloud.contactcenterinsights.v1.IIssueModelLabelStats): google.cloud.contactcenterinsights.v1.IssueModelLabelStats; /** - * Encodes the specified DialogflowIntent message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DialogflowIntent.verify|verify} messages. - * @param message DialogflowIntent message or plain object to encode + * Encodes the specified IssueModelLabelStats message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModelLabelStats.verify|verify} messages. + * @param message IssueModelLabelStats message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IDialogflowIntent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IIssueModelLabelStats, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DialogflowIntent message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DialogflowIntent.verify|verify} messages. - * @param message DialogflowIntent message or plain object to encode + * Encodes the specified IssueModelLabelStats message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModelLabelStats.verify|verify} messages. + * @param message IssueModelLabelStats message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IDialogflowIntent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IIssueModelLabelStats, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DialogflowIntent message from the specified reader or buffer. + * Decodes an IssueModelLabelStats message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DialogflowIntent + * @returns IssueModelLabelStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.DialogflowIntent; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.IssueModelLabelStats; /** - * Decodes a DialogflowIntent message from the specified reader or buffer, length delimited. + * Decodes an IssueModelLabelStats message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DialogflowIntent + * @returns IssueModelLabelStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.DialogflowIntent; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.IssueModelLabelStats; /** - * Verifies a DialogflowIntent message. + * Verifies an IssueModelLabelStats message. * @param message Plain 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 DialogflowIntent message from a plain object. Also converts values to their respective internal types. + * Creates an IssueModelLabelStats message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DialogflowIntent + * @returns IssueModelLabelStats */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.DialogflowIntent; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.IssueModelLabelStats; /** - * Creates a plain object from a DialogflowIntent message. Also converts values to other types if specified. - * @param message DialogflowIntent + * Creates a plain object from an IssueModelLabelStats message. Also converts values to other types if specified. + * @param message IssueModelLabelStats * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.DialogflowIntent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.IssueModelLabelStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DialogflowIntent to JSON. + * Converts this IssueModelLabelStats to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DialogflowIntent + * Gets the default type url for IssueModelLabelStats * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an InterruptionData. */ - interface IInterruptionData { + namespace IssueModelLabelStats { + + /** Properties of an IssueStats. */ + interface IIssueStats { + + /** IssueStats issue */ + issue?: (string|null); + + /** IssueStats labeledConversationsCount */ + labeledConversationsCount?: (number|Long|string|null); + + /** IssueStats displayName */ + displayName?: (string|null); + } + + /** Represents an IssueStats. */ + class IssueStats implements IIssueStats { + + /** + * Constructs a new IssueStats. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IIssueStats); + + /** IssueStats issue. */ + public issue: string; + + /** IssueStats labeledConversationsCount. */ + public labeledConversationsCount: (number|Long|string); + + /** IssueStats displayName. */ + public displayName: string; + + /** + * Creates a new IssueStats instance using the specified properties. + * @param [properties] Properties to set + * @returns IssueStats instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IIssueStats): google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats; + + /** + * Encodes the specified IssueStats message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats.verify|verify} messages. + * @param message IssueStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IIssueStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IssueStats message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats.verify|verify} messages. + * @param message IssueStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IIssueStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IssueStats message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IssueStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats; + + /** + * Decodes an IssueStats message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IssueStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats; + + /** + * Verifies an IssueStats message. + * @param message Plain 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 IssueStats message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IssueStats + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats; + + /** + * Creates a plain object from an IssueStats message. Also converts values to other types if specified. + * @param message IssueStats + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IssueStats to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IssueStats + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a PhraseMatcher. */ + interface IPhraseMatcher { + + /** PhraseMatcher name */ + name?: (string|null); + + /** PhraseMatcher revisionId */ + revisionId?: (string|null); + + /** PhraseMatcher versionTag */ + versionTag?: (string|null); + + /** PhraseMatcher revisionCreateTime */ + revisionCreateTime?: (google.protobuf.ITimestamp|null); + + /** PhraseMatcher displayName */ + displayName?: (string|null); + + /** PhraseMatcher type */ + type?: (google.cloud.contactcenterinsights.v1.PhraseMatcher.PhraseMatcherType|keyof typeof google.cloud.contactcenterinsights.v1.PhraseMatcher.PhraseMatcherType|null); + + /** PhraseMatcher active */ + active?: (boolean|null); + + /** PhraseMatcher phraseMatchRuleGroups */ + phraseMatchRuleGroups?: (google.cloud.contactcenterinsights.v1.IPhraseMatchRuleGroup[]|null); + + /** PhraseMatcher activationUpdateTime */ + activationUpdateTime?: (google.protobuf.ITimestamp|null); + + /** PhraseMatcher roleMatch */ + roleMatch?: (google.cloud.contactcenterinsights.v1.ConversationParticipant.Role|keyof typeof google.cloud.contactcenterinsights.v1.ConversationParticipant.Role|null); + + /** PhraseMatcher updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); } - /** Represents an InterruptionData. */ - class InterruptionData implements IInterruptionData { - - /** - * Constructs a new InterruptionData. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IInterruptionData); + /** Represents a PhraseMatcher. */ + class PhraseMatcher implements IPhraseMatcher { /** - * Creates a new InterruptionData instance using the specified properties. + * Constructs a new PhraseMatcher. * @param [properties] Properties to set - * @returns InterruptionData instance - */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IInterruptionData): google.cloud.contactcenterinsights.v1.InterruptionData; - - /** - * Encodes the specified InterruptionData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InterruptionData.verify|verify} messages. - * @param message InterruptionData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IInterruptionData, writer?: $protobuf.Writer): $protobuf.Writer; + constructor(properties?: google.cloud.contactcenterinsights.v1.IPhraseMatcher); - /** - * Encodes the specified InterruptionData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InterruptionData.verify|verify} messages. - * @param message InterruptionData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IInterruptionData, writer?: $protobuf.Writer): $protobuf.Writer; + /** PhraseMatcher name. */ + public name: string; - /** - * Decodes an InterruptionData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InterruptionData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.InterruptionData; + /** PhraseMatcher revisionId. */ + public revisionId: string; - /** - * Decodes an InterruptionData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InterruptionData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.InterruptionData; + /** PhraseMatcher versionTag. */ + public versionTag: string; - /** - * Verifies an InterruptionData message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** PhraseMatcher revisionCreateTime. */ + public revisionCreateTime?: (google.protobuf.ITimestamp|null); - /** - * Creates an InterruptionData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InterruptionData - */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.InterruptionData; + /** PhraseMatcher displayName. */ + public displayName: string; - /** - * Creates a plain object from an InterruptionData message. Also converts values to other types if specified. - * @param message InterruptionData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.contactcenterinsights.v1.InterruptionData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** PhraseMatcher type. */ + public type: (google.cloud.contactcenterinsights.v1.PhraseMatcher.PhraseMatcherType|keyof typeof google.cloud.contactcenterinsights.v1.PhraseMatcher.PhraseMatcherType); - /** - * Converts this InterruptionData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** PhraseMatcher active. */ + public active: boolean; - /** - * Gets the default type url for InterruptionData - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** PhraseMatcher phraseMatchRuleGroups. */ + public phraseMatchRuleGroups: google.cloud.contactcenterinsights.v1.IPhraseMatchRuleGroup[]; - /** Properties of a SilenceData. */ - interface ISilenceData { - } + /** PhraseMatcher activationUpdateTime. */ + public activationUpdateTime?: (google.protobuf.ITimestamp|null); - /** Represents a SilenceData. */ - class SilenceData implements ISilenceData { + /** PhraseMatcher roleMatch. */ + public roleMatch: (google.cloud.contactcenterinsights.v1.ConversationParticipant.Role|keyof typeof google.cloud.contactcenterinsights.v1.ConversationParticipant.Role); - /** - * Constructs a new SilenceData. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.contactcenterinsights.v1.ISilenceData); + /** PhraseMatcher updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new SilenceData instance using the specified properties. + * Creates a new PhraseMatcher instance using the specified properties. * @param [properties] Properties to set - * @returns SilenceData instance + * @returns PhraseMatcher instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.ISilenceData): google.cloud.contactcenterinsights.v1.SilenceData; + public static create(properties?: google.cloud.contactcenterinsights.v1.IPhraseMatcher): google.cloud.contactcenterinsights.v1.PhraseMatcher; /** - * Encodes the specified SilenceData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SilenceData.verify|verify} messages. - * @param message SilenceData message or plain object to encode + * Encodes the specified PhraseMatcher message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatcher.verify|verify} messages. + * @param message PhraseMatcher message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.ISilenceData, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IPhraseMatcher, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SilenceData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SilenceData.verify|verify} messages. - * @param message SilenceData message or plain object to encode + * Encodes the specified PhraseMatcher message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatcher.verify|verify} messages. + * @param message PhraseMatcher message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ISilenceData, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IPhraseMatcher, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SilenceData message from the specified reader or buffer. + * Decodes a PhraseMatcher message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SilenceData + * @returns PhraseMatcher * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.SilenceData; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.PhraseMatcher; /** - * Decodes a SilenceData message from the specified reader or buffer, length delimited. + * Decodes a PhraseMatcher message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SilenceData + * @returns PhraseMatcher * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.SilenceData; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.PhraseMatcher; /** - * Verifies a SilenceData message. + * Verifies a PhraseMatcher message. * @param message Plain 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 SilenceData message from a plain object. Also converts values to their respective internal types. + * Creates a PhraseMatcher message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SilenceData + * @returns PhraseMatcher */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.SilenceData; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.PhraseMatcher; /** - * Creates a plain object from a SilenceData message. Also converts values to other types if specified. - * @param message SilenceData + * Creates a plain object from a PhraseMatcher message. Also converts values to other types if specified. + * @param message PhraseMatcher * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.SilenceData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.PhraseMatcher, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SilenceData to JSON. + * Converts this PhraseMatcher to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SilenceData + * Gets the default type url for PhraseMatcher * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a HoldData. */ - interface IHoldData { + namespace PhraseMatcher { + + /** PhraseMatcherType enum. */ + enum PhraseMatcherType { + PHRASE_MATCHER_TYPE_UNSPECIFIED = 0, + ALL_OF = 1, + ANY_OF = 2 + } } - /** Represents a HoldData. */ - class HoldData implements IHoldData { + /** Properties of a PhraseMatchRuleGroup. */ + interface IPhraseMatchRuleGroup { + + /** PhraseMatchRuleGroup type */ + type?: (google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType|keyof typeof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType|null); + + /** PhraseMatchRuleGroup phraseMatchRules */ + phraseMatchRules?: (google.cloud.contactcenterinsights.v1.IPhraseMatchRule[]|null); + } + + /** Represents a PhraseMatchRuleGroup. */ + class PhraseMatchRuleGroup implements IPhraseMatchRuleGroup { /** - * Constructs a new HoldData. + * Constructs a new PhraseMatchRuleGroup. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IHoldData); + constructor(properties?: google.cloud.contactcenterinsights.v1.IPhraseMatchRuleGroup); + + /** PhraseMatchRuleGroup type. */ + public type: (google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType|keyof typeof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType); + + /** PhraseMatchRuleGroup phraseMatchRules. */ + public phraseMatchRules: google.cloud.contactcenterinsights.v1.IPhraseMatchRule[]; /** - * Creates a new HoldData instance using the specified properties. + * Creates a new PhraseMatchRuleGroup instance using the specified properties. * @param [properties] Properties to set - * @returns HoldData instance + * @returns PhraseMatchRuleGroup instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IHoldData): google.cloud.contactcenterinsights.v1.HoldData; + public static create(properties?: google.cloud.contactcenterinsights.v1.IPhraseMatchRuleGroup): google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup; /** - * Encodes the specified HoldData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.HoldData.verify|verify} messages. - * @param message HoldData message or plain object to encode + * Encodes the specified PhraseMatchRuleGroup message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.verify|verify} messages. + * @param message PhraseMatchRuleGroup message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IHoldData, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IPhraseMatchRuleGroup, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified HoldData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.HoldData.verify|verify} messages. - * @param message HoldData message or plain object to encode + * Encodes the specified PhraseMatchRuleGroup message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.verify|verify} messages. + * @param message PhraseMatchRuleGroup message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IHoldData, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IPhraseMatchRuleGroup, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a HoldData message from the specified reader or buffer. + * Decodes a PhraseMatchRuleGroup message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns HoldData + * @returns PhraseMatchRuleGroup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.HoldData; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup; /** - * Decodes a HoldData message from the specified reader or buffer, length delimited. + * Decodes a PhraseMatchRuleGroup message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns HoldData + * @returns PhraseMatchRuleGroup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.HoldData; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup; /** - * Verifies a HoldData message. + * Verifies a PhraseMatchRuleGroup message. * @param message Plain 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 HoldData message from a plain object. Also converts values to their respective internal types. + * Creates a PhraseMatchRuleGroup message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns HoldData + * @returns PhraseMatchRuleGroup */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.HoldData; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup; /** - * Creates a plain object from a HoldData message. Also converts values to other types if specified. - * @param message HoldData + * Creates a plain object from a PhraseMatchRuleGroup message. Also converts values to other types if specified. + * @param message PhraseMatchRuleGroup * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.HoldData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this HoldData to JSON. + * Converts this PhraseMatchRuleGroup to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for HoldData + * Gets the default type url for PhraseMatchRuleGroup * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an EntityMentionData. */ - interface IEntityMentionData { + namespace PhraseMatchRuleGroup { + + /** PhraseMatchRuleGroupType enum. */ + enum PhraseMatchRuleGroupType { + PHRASE_MATCH_RULE_GROUP_TYPE_UNSPECIFIED = 0, + ALL_OF = 1, + ANY_OF = 2 + } + } + + /** Properties of a PhraseMatchRule. */ + interface IPhraseMatchRule { - /** EntityMentionData entityUniqueId */ - entityUniqueId?: (string|null); + /** PhraseMatchRule query */ + query?: (string|null); - /** EntityMentionData type */ - type?: (google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType|keyof typeof google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType|null); + /** PhraseMatchRule negated */ + negated?: (boolean|null); - /** EntityMentionData sentiment */ - sentiment?: (google.cloud.contactcenterinsights.v1.ISentimentData|null); + /** PhraseMatchRule config */ + config?: (google.cloud.contactcenterinsights.v1.IPhraseMatchRuleConfig|null); } - /** Represents an EntityMentionData. */ - class EntityMentionData implements IEntityMentionData { + /** Represents a PhraseMatchRule. */ + class PhraseMatchRule implements IPhraseMatchRule { /** - * Constructs a new EntityMentionData. + * Constructs a new PhraseMatchRule. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IEntityMentionData); + constructor(properties?: google.cloud.contactcenterinsights.v1.IPhraseMatchRule); - /** EntityMentionData entityUniqueId. */ - public entityUniqueId: string; + /** PhraseMatchRule query. */ + public query: string; - /** EntityMentionData type. */ - public type: (google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType|keyof typeof google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType); + /** PhraseMatchRule negated. */ + public negated: boolean; - /** EntityMentionData sentiment. */ - public sentiment?: (google.cloud.contactcenterinsights.v1.ISentimentData|null); + /** PhraseMatchRule config. */ + public config?: (google.cloud.contactcenterinsights.v1.IPhraseMatchRuleConfig|null); /** - * Creates a new EntityMentionData instance using the specified properties. + * Creates a new PhraseMatchRule instance using the specified properties. * @param [properties] Properties to set - * @returns EntityMentionData instance + * @returns PhraseMatchRule instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IEntityMentionData): google.cloud.contactcenterinsights.v1.EntityMentionData; + public static create(properties?: google.cloud.contactcenterinsights.v1.IPhraseMatchRule): google.cloud.contactcenterinsights.v1.PhraseMatchRule; /** - * Encodes the specified EntityMentionData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.EntityMentionData.verify|verify} messages. - * @param message EntityMentionData message or plain object to encode + * Encodes the specified PhraseMatchRule message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchRule.verify|verify} messages. + * @param message PhraseMatchRule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IEntityMentionData, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IPhraseMatchRule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EntityMentionData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.EntityMentionData.verify|verify} messages. - * @param message EntityMentionData message or plain object to encode + * Encodes the specified PhraseMatchRule message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchRule.verify|verify} messages. + * @param message PhraseMatchRule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IEntityMentionData, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IPhraseMatchRule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EntityMentionData message from the specified reader or buffer. + * Decodes a PhraseMatchRule message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EntityMentionData + * @returns PhraseMatchRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.EntityMentionData; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.PhraseMatchRule; /** - * Decodes an EntityMentionData message from the specified reader or buffer, length delimited. + * Decodes a PhraseMatchRule message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EntityMentionData + * @returns PhraseMatchRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.EntityMentionData; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.PhraseMatchRule; /** - * Verifies an EntityMentionData message. + * Verifies a PhraseMatchRule message. * @param message Plain 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 EntityMentionData message from a plain object. Also converts values to their respective internal types. + * Creates a PhraseMatchRule message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EntityMentionData + * @returns PhraseMatchRule */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.EntityMentionData; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.PhraseMatchRule; /** - * Creates a plain object from an EntityMentionData message. Also converts values to other types if specified. - * @param message EntityMentionData + * Creates a plain object from a PhraseMatchRule message. Also converts values to other types if specified. + * @param message PhraseMatchRule * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.EntityMentionData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.PhraseMatchRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EntityMentionData to JSON. + * Converts this PhraseMatchRule to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EntityMentionData + * Gets the default type url for PhraseMatchRule * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace EntityMentionData { - - /** MentionType enum. */ - enum MentionType { - MENTION_TYPE_UNSPECIFIED = 0, - PROPER = 1, - COMMON = 2 - } - } - - /** Properties of an IntentMatchData. */ - interface IIntentMatchData { + /** Properties of a PhraseMatchRuleConfig. */ + interface IPhraseMatchRuleConfig { - /** IntentMatchData intentUniqueId */ - intentUniqueId?: (string|null); + /** PhraseMatchRuleConfig exactMatchConfig */ + exactMatchConfig?: (google.cloud.contactcenterinsights.v1.IExactMatchConfig|null); } - /** Represents an IntentMatchData. */ - class IntentMatchData implements IIntentMatchData { + /** Represents a PhraseMatchRuleConfig. */ + class PhraseMatchRuleConfig implements IPhraseMatchRuleConfig { /** - * Constructs a new IntentMatchData. + * Constructs a new PhraseMatchRuleConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IIntentMatchData); + constructor(properties?: google.cloud.contactcenterinsights.v1.IPhraseMatchRuleConfig); - /** IntentMatchData intentUniqueId. */ - public intentUniqueId: string; + /** PhraseMatchRuleConfig exactMatchConfig. */ + public exactMatchConfig?: (google.cloud.contactcenterinsights.v1.IExactMatchConfig|null); + + /** PhraseMatchRuleConfig config. */ + public config?: "exactMatchConfig"; /** - * Creates a new IntentMatchData instance using the specified properties. + * Creates a new PhraseMatchRuleConfig instance using the specified properties. * @param [properties] Properties to set - * @returns IntentMatchData instance + * @returns PhraseMatchRuleConfig instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IIntentMatchData): google.cloud.contactcenterinsights.v1.IntentMatchData; + public static create(properties?: google.cloud.contactcenterinsights.v1.IPhraseMatchRuleConfig): google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig; /** - * Encodes the specified IntentMatchData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IntentMatchData.verify|verify} messages. - * @param message IntentMatchData message or plain object to encode + * Encodes the specified PhraseMatchRuleConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig.verify|verify} messages. + * @param message PhraseMatchRuleConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IIntentMatchData, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IPhraseMatchRuleConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified IntentMatchData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IntentMatchData.verify|verify} messages. - * @param message IntentMatchData message or plain object to encode + * Encodes the specified PhraseMatchRuleConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig.verify|verify} messages. + * @param message PhraseMatchRuleConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IIntentMatchData, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IPhraseMatchRuleConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an IntentMatchData message from the specified reader or buffer. + * Decodes a PhraseMatchRuleConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns IntentMatchData + * @returns PhraseMatchRuleConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.IntentMatchData; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig; /** - * Decodes an IntentMatchData message from the specified reader or buffer, length delimited. + * Decodes a PhraseMatchRuleConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns IntentMatchData + * @returns PhraseMatchRuleConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.IntentMatchData; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig; /** - * Verifies an IntentMatchData message. + * Verifies a PhraseMatchRuleConfig message. * @param message Plain 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 IntentMatchData message from a plain object. Also converts values to their respective internal types. + * Creates a PhraseMatchRuleConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns IntentMatchData + * @returns PhraseMatchRuleConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.IntentMatchData; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig; /** - * Creates a plain object from an IntentMatchData message. Also converts values to other types if specified. - * @param message IntentMatchData + * Creates a plain object from a PhraseMatchRuleConfig message. Also converts values to other types if specified. + * @param message PhraseMatchRuleConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.IntentMatchData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this IntentMatchData to JSON. + * Converts this PhraseMatchRuleConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for IntentMatchData + * Gets the default type url for PhraseMatchRuleConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SentimentData. */ - interface ISentimentData { - - /** SentimentData magnitude */ - magnitude?: (number|null); + /** Properties of an ExactMatchConfig. */ + interface IExactMatchConfig { - /** SentimentData score */ - score?: (number|null); + /** ExactMatchConfig caseSensitive */ + caseSensitive?: (boolean|null); } - /** Represents a SentimentData. */ - class SentimentData implements ISentimentData { + /** Represents an ExactMatchConfig. */ + class ExactMatchConfig implements IExactMatchConfig { /** - * Constructs a new SentimentData. + * Constructs a new ExactMatchConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.ISentimentData); - - /** SentimentData magnitude. */ - public magnitude: number; + constructor(properties?: google.cloud.contactcenterinsights.v1.IExactMatchConfig); - /** SentimentData score. */ - public score: number; + /** ExactMatchConfig caseSensitive. */ + public caseSensitive: boolean; /** - * Creates a new SentimentData instance using the specified properties. + * Creates a new ExactMatchConfig instance using the specified properties. * @param [properties] Properties to set - * @returns SentimentData instance + * @returns ExactMatchConfig instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.ISentimentData): google.cloud.contactcenterinsights.v1.SentimentData; + public static create(properties?: google.cloud.contactcenterinsights.v1.IExactMatchConfig): google.cloud.contactcenterinsights.v1.ExactMatchConfig; /** - * Encodes the specified SentimentData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SentimentData.verify|verify} messages. - * @param message SentimentData message or plain object to encode + * Encodes the specified ExactMatchConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExactMatchConfig.verify|verify} messages. + * @param message ExactMatchConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.ISentimentData, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IExactMatchConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SentimentData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SentimentData.verify|verify} messages. - * @param message SentimentData message or plain object to encode + * Encodes the specified ExactMatchConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExactMatchConfig.verify|verify} messages. + * @param message ExactMatchConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ISentimentData, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IExactMatchConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SentimentData message from the specified reader or buffer. + * Decodes an ExactMatchConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SentimentData + * @returns ExactMatchConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.SentimentData; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ExactMatchConfig; /** - * Decodes a SentimentData message from the specified reader or buffer, length delimited. + * Decodes an ExactMatchConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SentimentData + * @returns ExactMatchConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.SentimentData; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ExactMatchConfig; /** - * Verifies a SentimentData message. + * Verifies an ExactMatchConfig message. * @param message Plain 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 SentimentData message from a plain object. Also converts values to their respective internal types. + * Creates an ExactMatchConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SentimentData + * @returns ExactMatchConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.SentimentData; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ExactMatchConfig; /** - * Creates a plain object from a SentimentData message. Also converts values to other types if specified. - * @param message SentimentData + * Creates a plain object from an ExactMatchConfig message. Also converts values to other types if specified. + * @param message ExactMatchConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.SentimentData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.ExactMatchConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SentimentData to JSON. + * Converts this ExactMatchConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SentimentData + * Gets the default type url for ExactMatchConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an IssueMatchData. */ - interface IIssueMatchData { + /** Properties of a Settings. */ + interface ISettings { + + /** Settings name */ + name?: (string|null); + + /** Settings createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Settings updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Settings languageCode */ + languageCode?: (string|null); + + /** Settings conversationTtl */ + conversationTtl?: (google.protobuf.IDuration|null); + + /** Settings pubsubNotificationSettings */ + pubsubNotificationSettings?: ({ [k: string]: string }|null); - /** IssueMatchData issueAssignment */ - issueAssignment?: (google.cloud.contactcenterinsights.v1.IIssueAssignment|null); + /** Settings analysisConfig */ + analysisConfig?: (google.cloud.contactcenterinsights.v1.Settings.IAnalysisConfig|null); + + /** Settings redactionConfig */ + redactionConfig?: (google.cloud.contactcenterinsights.v1.IRedactionConfig|null); + + /** Settings speechConfig */ + speechConfig?: (google.cloud.contactcenterinsights.v1.ISpeechConfig|null); } - /** Represents an IssueMatchData. */ - class IssueMatchData implements IIssueMatchData { + /** Represents a Settings. */ + class Settings implements ISettings { /** - * Constructs a new IssueMatchData. + * Constructs a new Settings. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IIssueMatchData); + constructor(properties?: google.cloud.contactcenterinsights.v1.ISettings); - /** IssueMatchData issueAssignment. */ - public issueAssignment?: (google.cloud.contactcenterinsights.v1.IIssueAssignment|null); + /** Settings name. */ + public name: string; + + /** Settings createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Settings updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Settings languageCode. */ + public languageCode: string; + + /** Settings conversationTtl. */ + public conversationTtl?: (google.protobuf.IDuration|null); + + /** Settings pubsubNotificationSettings. */ + public pubsubNotificationSettings: { [k: string]: string }; + + /** Settings analysisConfig. */ + public analysisConfig?: (google.cloud.contactcenterinsights.v1.Settings.IAnalysisConfig|null); + + /** Settings redactionConfig. */ + public redactionConfig?: (google.cloud.contactcenterinsights.v1.IRedactionConfig|null); + + /** Settings speechConfig. */ + public speechConfig?: (google.cloud.contactcenterinsights.v1.ISpeechConfig|null); /** - * Creates a new IssueMatchData instance using the specified properties. + * Creates a new Settings instance using the specified properties. * @param [properties] Properties to set - * @returns IssueMatchData instance + * @returns Settings instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IIssueMatchData): google.cloud.contactcenterinsights.v1.IssueMatchData; + public static create(properties?: google.cloud.contactcenterinsights.v1.ISettings): google.cloud.contactcenterinsights.v1.Settings; /** - * Encodes the specified IssueMatchData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueMatchData.verify|verify} messages. - * @param message IssueMatchData message or plain object to encode + * Encodes the specified Settings message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Settings.verify|verify} messages. + * @param message Settings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IIssueMatchData, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.ISettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified IssueMatchData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueMatchData.verify|verify} messages. - * @param message IssueMatchData message or plain object to encode + * Encodes the specified Settings message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Settings.verify|verify} messages. + * @param message Settings message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IIssueMatchData, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ISettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an IssueMatchData message from the specified reader or buffer. + * Decodes a Settings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns IssueMatchData + * @returns Settings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.IssueMatchData; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Settings; /** - * Decodes an IssueMatchData message from the specified reader or buffer, length delimited. + * Decodes a Settings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns IssueMatchData + * @returns Settings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.IssueMatchData; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Settings; /** - * Verifies an IssueMatchData message. + * Verifies a Settings message. * @param message Plain 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 IssueMatchData message from a plain object. Also converts values to their respective internal types. + * Creates a Settings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns IssueMatchData + * @returns Settings */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.IssueMatchData; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Settings; /** - * Creates a plain object from an IssueMatchData message. Also converts values to other types if specified. - * @param message IssueMatchData + * Creates a plain object from a Settings message. Also converts values to other types if specified. + * @param message Settings * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.IssueMatchData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.Settings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this IssueMatchData to JSON. + * Converts this Settings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for IssueMatchData + * Gets the default type url for Settings * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an IssueModel. */ - interface IIssueModel { + namespace Settings { - /** IssueModel name */ - name?: (string|null); + /** Properties of an AnalysisConfig. */ + interface IAnalysisConfig { - /** IssueModel displayName */ - displayName?: (string|null); + /** AnalysisConfig runtimeIntegrationAnalysisPercentage */ + runtimeIntegrationAnalysisPercentage?: (number|null); - /** IssueModel createTime */ + /** AnalysisConfig uploadConversationAnalysisPercentage */ + uploadConversationAnalysisPercentage?: (number|null); + + /** AnalysisConfig annotatorSelector */ + annotatorSelector?: (google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null); + } + + /** Represents an AnalysisConfig. */ + class AnalysisConfig implements IAnalysisConfig { + + /** + * Constructs a new AnalysisConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.Settings.IAnalysisConfig); + + /** AnalysisConfig runtimeIntegrationAnalysisPercentage. */ + public runtimeIntegrationAnalysisPercentage: number; + + /** AnalysisConfig uploadConversationAnalysisPercentage. */ + public uploadConversationAnalysisPercentage: number; + + /** AnalysisConfig annotatorSelector. */ + public annotatorSelector?: (google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null); + + /** + * Creates a new AnalysisConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AnalysisConfig instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.Settings.IAnalysisConfig): google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig; + + /** + * Encodes the specified AnalysisConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.verify|verify} messages. + * @param message AnalysisConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.Settings.IAnalysisConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnalysisConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.verify|verify} messages. + * @param message AnalysisConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.Settings.IAnalysisConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnalysisConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnalysisConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig; + + /** + * Decodes an AnalysisConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnalysisConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig; + + /** + * Verifies an AnalysisConfig message. + * @param message Plain 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 AnalysisConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnalysisConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig; + + /** + * Creates a plain object from an AnalysisConfig message. Also converts values to other types if specified. + * @param message AnalysisConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnalysisConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnalysisConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an AnalysisRule. */ + interface IAnalysisRule { + + /** AnalysisRule name */ + name?: (string|null); + + /** AnalysisRule createTime */ createTime?: (google.protobuf.ITimestamp|null); - /** IssueModel updateTime */ + /** AnalysisRule updateTime */ updateTime?: (google.protobuf.ITimestamp|null); - /** IssueModel issueCount */ - issueCount?: (number|Long|string|null); - - /** IssueModel state */ - state?: (google.cloud.contactcenterinsights.v1.IssueModel.State|keyof typeof google.cloud.contactcenterinsights.v1.IssueModel.State|null); + /** AnalysisRule displayName */ + displayName?: (string|null); - /** IssueModel inputDataConfig */ - inputDataConfig?: (google.cloud.contactcenterinsights.v1.IssueModel.IInputDataConfig|null); + /** AnalysisRule conversationFilter */ + conversationFilter?: (string|null); - /** IssueModel trainingStats */ - trainingStats?: (google.cloud.contactcenterinsights.v1.IIssueModelLabelStats|null); + /** AnalysisRule annotatorSelector */ + annotatorSelector?: (google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null); - /** IssueModel modelType */ - modelType?: (google.cloud.contactcenterinsights.v1.IssueModel.ModelType|keyof typeof google.cloud.contactcenterinsights.v1.IssueModel.ModelType|null); + /** AnalysisRule analysisPercentage */ + analysisPercentage?: (number|null); - /** IssueModel languageCode */ - languageCode?: (string|null); + /** AnalysisRule active */ + active?: (boolean|null); } - /** Represents an IssueModel. */ - class IssueModel implements IIssueModel { + /** Represents an AnalysisRule. */ + class AnalysisRule implements IAnalysisRule { /** - * Constructs a new IssueModel. + * Constructs a new AnalysisRule. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IIssueModel); + constructor(properties?: google.cloud.contactcenterinsights.v1.IAnalysisRule); - /** IssueModel name. */ + /** AnalysisRule name. */ public name: string; - /** IssueModel displayName. */ - public displayName: string; - - /** IssueModel createTime. */ + /** AnalysisRule createTime. */ public createTime?: (google.protobuf.ITimestamp|null); - /** IssueModel updateTime. */ + /** AnalysisRule updateTime. */ public updateTime?: (google.protobuf.ITimestamp|null); - /** IssueModel issueCount. */ - public issueCount: (number|Long|string); - - /** IssueModel state. */ - public state: (google.cloud.contactcenterinsights.v1.IssueModel.State|keyof typeof google.cloud.contactcenterinsights.v1.IssueModel.State); + /** AnalysisRule displayName. */ + public displayName?: (string|null); - /** IssueModel inputDataConfig. */ - public inputDataConfig?: (google.cloud.contactcenterinsights.v1.IssueModel.IInputDataConfig|null); + /** AnalysisRule conversationFilter. */ + public conversationFilter: string; - /** IssueModel trainingStats. */ - public trainingStats?: (google.cloud.contactcenterinsights.v1.IIssueModelLabelStats|null); + /** AnalysisRule annotatorSelector. */ + public annotatorSelector?: (google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null); - /** IssueModel modelType. */ - public modelType: (google.cloud.contactcenterinsights.v1.IssueModel.ModelType|keyof typeof google.cloud.contactcenterinsights.v1.IssueModel.ModelType); + /** AnalysisRule analysisPercentage. */ + public analysisPercentage: number; - /** IssueModel languageCode. */ - public languageCode: string; + /** AnalysisRule active. */ + public active: boolean; + + /** AnalysisRule _displayName. */ + public _displayName?: "displayName"; /** - * Creates a new IssueModel instance using the specified properties. + * Creates a new AnalysisRule instance using the specified properties. * @param [properties] Properties to set - * @returns IssueModel instance + * @returns AnalysisRule instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IIssueModel): google.cloud.contactcenterinsights.v1.IssueModel; + public static create(properties?: google.cloud.contactcenterinsights.v1.IAnalysisRule): google.cloud.contactcenterinsights.v1.AnalysisRule; /** - * Encodes the specified IssueModel message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModel.verify|verify} messages. - * @param message IssueModel message or plain object to encode + * Encodes the specified AnalysisRule message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnalysisRule.verify|verify} messages. + * @param message AnalysisRule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IIssueModel, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IAnalysisRule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified IssueModel message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModel.verify|verify} messages. - * @param message IssueModel message or plain object to encode + * Encodes the specified AnalysisRule message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnalysisRule.verify|verify} messages. + * @param message AnalysisRule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IIssueModel, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IAnalysisRule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an IssueModel message from the specified reader or buffer. + * Decodes an AnalysisRule message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns IssueModel + * @returns AnalysisRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.IssueModel; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.AnalysisRule; /** - * Decodes an IssueModel message from the specified reader or buffer, length delimited. + * Decodes an AnalysisRule message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns IssueModel + * @returns AnalysisRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.IssueModel; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.AnalysisRule; /** - * Verifies an IssueModel message. + * Verifies an AnalysisRule message. * @param message Plain 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 IssueModel message from a plain object. Also converts values to their respective internal types. + * Creates an AnalysisRule message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns IssueModel + * @returns AnalysisRule */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.IssueModel; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.AnalysisRule; /** - * Creates a plain object from an IssueModel message. Also converts values to other types if specified. - * @param message IssueModel + * Creates a plain object from an AnalysisRule message. Also converts values to other types if specified. + * @param message AnalysisRule * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.IssueModel, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.AnalysisRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this IssueModel to JSON. + * Converts this AnalysisRule to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for IssueModel + * Gets the default type url for AnalysisRule * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace IssueModel { + /** Properties of an EncryptionSpec. */ + interface IEncryptionSpec { - /** Properties of an InputDataConfig. */ - interface IInputDataConfig { + /** EncryptionSpec name */ + name?: (string|null); - /** InputDataConfig medium */ - medium?: (google.cloud.contactcenterinsights.v1.Conversation.Medium|keyof typeof google.cloud.contactcenterinsights.v1.Conversation.Medium|null); + /** EncryptionSpec kmsKey */ + kmsKey?: (string|null); + } - /** InputDataConfig trainingConversationsCount */ - trainingConversationsCount?: (number|Long|string|null); + /** Represents an EncryptionSpec. */ + class EncryptionSpec implements IEncryptionSpec { - /** InputDataConfig filter */ - filter?: (string|null); - } + /** + * Constructs a new EncryptionSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IEncryptionSpec); - /** Represents an InputDataConfig. */ - class InputDataConfig implements IInputDataConfig { + /** EncryptionSpec name. */ + public name: string; - /** - * Constructs a new InputDataConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IssueModel.IInputDataConfig); + /** EncryptionSpec kmsKey. */ + public kmsKey: string; - /** InputDataConfig medium. */ - public medium: (google.cloud.contactcenterinsights.v1.Conversation.Medium|keyof typeof google.cloud.contactcenterinsights.v1.Conversation.Medium); + /** + * Creates a new EncryptionSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns EncryptionSpec instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IEncryptionSpec): google.cloud.contactcenterinsights.v1.EncryptionSpec; - /** InputDataConfig trainingConversationsCount. */ - public trainingConversationsCount: (number|Long|string); + /** + * Encodes the specified EncryptionSpec message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.EncryptionSpec.verify|verify} messages. + * @param message EncryptionSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IEncryptionSpec, writer?: $protobuf.Writer): $protobuf.Writer; - /** InputDataConfig filter. */ - public filter: string; + /** + * Encodes the specified EncryptionSpec message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.EncryptionSpec.verify|verify} messages. + * @param message EncryptionSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IEncryptionSpec, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new InputDataConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns InputDataConfig instance - */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IssueModel.IInputDataConfig): google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig; + /** + * Decodes an EncryptionSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EncryptionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.EncryptionSpec; - /** - * Encodes the specified InputDataConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig.verify|verify} messages. - * @param message InputDataConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.contactcenterinsights.v1.IssueModel.IInputDataConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes an EncryptionSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EncryptionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.EncryptionSpec; - /** - * Encodes the specified InputDataConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig.verify|verify} messages. - * @param message InputDataConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IssueModel.IInputDataConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies an EncryptionSpec message. + * @param message 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 an InputDataConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InputDataConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig; + /** + * Creates an EncryptionSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EncryptionSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.EncryptionSpec; - /** - * Decodes an InputDataConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InputDataConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig; + /** + * Creates a plain object from an EncryptionSpec message. Also converts values to other types if specified. + * @param message EncryptionSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.EncryptionSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Verifies an InputDataConfig message. - * @param message 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 EncryptionSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates an InputDataConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InputDataConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig; + /** + * Gets the default type url for EncryptionSpec + * @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 InputDataConfig message. Also converts values to other types if specified. - * @param message InputDataConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Properties of a RedactionConfig. */ + interface IRedactionConfig { - /** - * Converts this InputDataConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** RedactionConfig deidentifyTemplate */ + deidentifyTemplate?: (string|null); - /** - * Gets the default type url for InputDataConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** RedactionConfig inspectTemplate */ + inspectTemplate?: (string|null); + } - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - UNDEPLOYED = 1, - DEPLOYING = 2, - DEPLOYED = 3, - UNDEPLOYING = 4, - DELETING = 5 - } + /** Represents a RedactionConfig. */ + class RedactionConfig implements IRedactionConfig { - /** ModelType enum. */ - enum ModelType { - MODEL_TYPE_UNSPECIFIED = 0, - TYPE_V1 = 1, - TYPE_V2 = 2 - } - } + /** + * Constructs a new RedactionConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IRedactionConfig); - /** Properties of an Issue. */ - interface IIssue { + /** RedactionConfig deidentifyTemplate. */ + public deidentifyTemplate: string; - /** Issue name */ - name?: (string|null); + /** RedactionConfig inspectTemplate. */ + public inspectTemplate: string; + + /** + * Creates a new RedactionConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns RedactionConfig instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IRedactionConfig): google.cloud.contactcenterinsights.v1.RedactionConfig; + + /** + * Encodes the specified RedactionConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.RedactionConfig.verify|verify} messages. + * @param message RedactionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IRedactionConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** Issue displayName */ - displayName?: (string|null); + /** + * Encodes the specified RedactionConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.RedactionConfig.verify|verify} messages. + * @param message RedactionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IRedactionConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** Issue createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** + * Decodes a RedactionConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RedactionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.RedactionConfig; - /** Issue updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** + * Decodes a RedactionConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RedactionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.RedactionConfig; - /** Issue sampleUtterances */ - sampleUtterances?: (string[]|null); + /** + * Verifies a RedactionConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Issue displayDescription */ - displayDescription?: (string|null); - } + /** + * Creates a RedactionConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RedactionConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.RedactionConfig; - /** Represents an Issue. */ - class Issue implements IIssue { + /** + * Creates a plain object from a RedactionConfig message. Also converts values to other types if specified. + * @param message RedactionConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.RedactionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Constructs a new Issue. - * @param [properties] Properties to set + * Converts this RedactionConfig to JSON. + * @returns JSON object */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IIssue); + public toJSON(): { [k: string]: any }; - /** Issue name. */ - public name: string; + /** + * Gets the default type url for RedactionConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Issue displayName. */ - public displayName: string; + /** Properties of a SpeechConfig. */ + interface ISpeechConfig { - /** Issue createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** SpeechConfig speechRecognizer */ + speechRecognizer?: (string|null); + } - /** Issue updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** Represents a SpeechConfig. */ + class SpeechConfig implements ISpeechConfig { - /** Issue sampleUtterances. */ - public sampleUtterances: string[]; + /** + * Constructs a new SpeechConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.ISpeechConfig); - /** Issue displayDescription. */ - public displayDescription: string; + /** SpeechConfig speechRecognizer. */ + public speechRecognizer: string; /** - * Creates a new Issue instance using the specified properties. + * Creates a new SpeechConfig instance using the specified properties. * @param [properties] Properties to set - * @returns Issue instance + * @returns SpeechConfig instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IIssue): google.cloud.contactcenterinsights.v1.Issue; + public static create(properties?: google.cloud.contactcenterinsights.v1.ISpeechConfig): google.cloud.contactcenterinsights.v1.SpeechConfig; /** - * Encodes the specified Issue message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Issue.verify|verify} messages. - * @param message Issue message or plain object to encode + * Encodes the specified SpeechConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SpeechConfig.verify|verify} messages. + * @param message SpeechConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IIssue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.ISpeechConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Issue message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Issue.verify|verify} messages. - * @param message Issue message or plain object to encode + * Encodes the specified SpeechConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SpeechConfig.verify|verify} messages. + * @param message SpeechConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IIssue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ISpeechConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Issue message from the specified reader or buffer. + * Decodes a SpeechConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Issue + * @returns SpeechConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Issue; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.SpeechConfig; /** - * Decodes an Issue message from the specified reader or buffer, length delimited. + * Decodes a SpeechConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Issue + * @returns SpeechConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Issue; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.SpeechConfig; /** - * Verifies an Issue message. + * Verifies a SpeechConfig message. * @param message Plain 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 Issue message from a plain object. Also converts values to their respective internal types. + * Creates a SpeechConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Issue + * @returns SpeechConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Issue; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.SpeechConfig; /** - * Creates a plain object from an Issue message. Also converts values to other types if specified. - * @param message Issue + * Creates a plain object from a SpeechConfig message. Also converts values to other types if specified. + * @param message SpeechConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.Issue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.SpeechConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Issue to JSON. + * Converts this SpeechConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Issue + * Gets the default type url for SpeechConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an IssueModelLabelStats. */ - interface IIssueModelLabelStats { + /** Properties of a RuntimeAnnotation. */ + interface IRuntimeAnnotation { - /** IssueModelLabelStats analyzedConversationsCount */ - analyzedConversationsCount?: (number|Long|string|null); + /** RuntimeAnnotation articleSuggestion */ + articleSuggestion?: (google.cloud.contactcenterinsights.v1.IArticleSuggestionData|null); - /** IssueModelLabelStats unclassifiedConversationsCount */ - unclassifiedConversationsCount?: (number|Long|string|null); + /** RuntimeAnnotation faqAnswer */ + faqAnswer?: (google.cloud.contactcenterinsights.v1.IFaqAnswerData|null); - /** IssueModelLabelStats issueStats */ - issueStats?: ({ [k: string]: google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IIssueStats }|null); + /** RuntimeAnnotation smartReply */ + smartReply?: (google.cloud.contactcenterinsights.v1.ISmartReplyData|null); + + /** RuntimeAnnotation smartComposeSuggestion */ + smartComposeSuggestion?: (google.cloud.contactcenterinsights.v1.ISmartComposeSuggestionData|null); + + /** RuntimeAnnotation dialogflowInteraction */ + dialogflowInteraction?: (google.cloud.contactcenterinsights.v1.IDialogflowInteractionData|null); + + /** RuntimeAnnotation conversationSummarizationSuggestion */ + conversationSummarizationSuggestion?: (google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData|null); + + /** RuntimeAnnotation annotationId */ + annotationId?: (string|null); + + /** RuntimeAnnotation createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** RuntimeAnnotation startBoundary */ + startBoundary?: (google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null); + + /** RuntimeAnnotation endBoundary */ + endBoundary?: (google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null); + + /** RuntimeAnnotation answerFeedback */ + answerFeedback?: (google.cloud.contactcenterinsights.v1.IAnswerFeedback|null); + + /** RuntimeAnnotation userInput */ + userInput?: (google.cloud.contactcenterinsights.v1.RuntimeAnnotation.IUserInput|null); } - /** Represents an IssueModelLabelStats. */ - class IssueModelLabelStats implements IIssueModelLabelStats { + /** Represents a RuntimeAnnotation. */ + class RuntimeAnnotation implements IRuntimeAnnotation { /** - * Constructs a new IssueModelLabelStats. + * Constructs a new RuntimeAnnotation. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IIssueModelLabelStats); + constructor(properties?: google.cloud.contactcenterinsights.v1.IRuntimeAnnotation); - /** IssueModelLabelStats analyzedConversationsCount. */ - public analyzedConversationsCount: (number|Long|string); + /** RuntimeAnnotation articleSuggestion. */ + public articleSuggestion?: (google.cloud.contactcenterinsights.v1.IArticleSuggestionData|null); - /** IssueModelLabelStats unclassifiedConversationsCount. */ - public unclassifiedConversationsCount: (number|Long|string); + /** RuntimeAnnotation faqAnswer. */ + public faqAnswer?: (google.cloud.contactcenterinsights.v1.IFaqAnswerData|null); - /** IssueModelLabelStats issueStats. */ - public issueStats: { [k: string]: google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IIssueStats }; + /** RuntimeAnnotation smartReply. */ + public smartReply?: (google.cloud.contactcenterinsights.v1.ISmartReplyData|null); + + /** RuntimeAnnotation smartComposeSuggestion. */ + public smartComposeSuggestion?: (google.cloud.contactcenterinsights.v1.ISmartComposeSuggestionData|null); + + /** RuntimeAnnotation dialogflowInteraction. */ + public dialogflowInteraction?: (google.cloud.contactcenterinsights.v1.IDialogflowInteractionData|null); + + /** RuntimeAnnotation conversationSummarizationSuggestion. */ + public conversationSummarizationSuggestion?: (google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData|null); + + /** RuntimeAnnotation annotationId. */ + public annotationId: string; + + /** RuntimeAnnotation createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** RuntimeAnnotation startBoundary. */ + public startBoundary?: (google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null); + + /** RuntimeAnnotation endBoundary. */ + public endBoundary?: (google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null); + + /** RuntimeAnnotation answerFeedback. */ + public answerFeedback?: (google.cloud.contactcenterinsights.v1.IAnswerFeedback|null); + + /** RuntimeAnnotation userInput. */ + public userInput?: (google.cloud.contactcenterinsights.v1.RuntimeAnnotation.IUserInput|null); + + /** RuntimeAnnotation data. */ + public data?: ("articleSuggestion"|"faqAnswer"|"smartReply"|"smartComposeSuggestion"|"dialogflowInteraction"|"conversationSummarizationSuggestion"); /** - * Creates a new IssueModelLabelStats instance using the specified properties. + * Creates a new RuntimeAnnotation instance using the specified properties. * @param [properties] Properties to set - * @returns IssueModelLabelStats instance + * @returns RuntimeAnnotation instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IIssueModelLabelStats): google.cloud.contactcenterinsights.v1.IssueModelLabelStats; + public static create(properties?: google.cloud.contactcenterinsights.v1.IRuntimeAnnotation): google.cloud.contactcenterinsights.v1.RuntimeAnnotation; /** - * Encodes the specified IssueModelLabelStats message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModelLabelStats.verify|verify} messages. - * @param message IssueModelLabelStats message or plain object to encode + * Encodes the specified RuntimeAnnotation message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.RuntimeAnnotation.verify|verify} messages. + * @param message RuntimeAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IIssueModelLabelStats, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IRuntimeAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified IssueModelLabelStats message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModelLabelStats.verify|verify} messages. - * @param message IssueModelLabelStats message or plain object to encode + * Encodes the specified RuntimeAnnotation message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.RuntimeAnnotation.verify|verify} messages. + * @param message RuntimeAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IIssueModelLabelStats, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IRuntimeAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an IssueModelLabelStats message from the specified reader or buffer. + * Decodes a RuntimeAnnotation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns IssueModelLabelStats + * @returns RuntimeAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.IssueModelLabelStats; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.RuntimeAnnotation; /** - * Decodes an IssueModelLabelStats message from the specified reader or buffer, length delimited. + * Decodes a RuntimeAnnotation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns IssueModelLabelStats + * @returns RuntimeAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.IssueModelLabelStats; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.RuntimeAnnotation; /** - * Verifies an IssueModelLabelStats message. + * Verifies a RuntimeAnnotation message. * @param message Plain 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 IssueModelLabelStats message from a plain object. Also converts values to their respective internal types. + * Creates a RuntimeAnnotation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns IssueModelLabelStats + * @returns RuntimeAnnotation */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.IssueModelLabelStats; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.RuntimeAnnotation; /** - * Creates a plain object from an IssueModelLabelStats message. Also converts values to other types if specified. - * @param message IssueModelLabelStats + * Creates a plain object from a RuntimeAnnotation message. Also converts values to other types if specified. + * @param message RuntimeAnnotation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.IssueModelLabelStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.RuntimeAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this IssueModelLabelStats to JSON. + * Converts this RuntimeAnnotation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for IssueModelLabelStats + * Gets the default type url for RuntimeAnnotation * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace IssueModelLabelStats { + namespace RuntimeAnnotation { - /** Properties of an IssueStats. */ - interface IIssueStats { + /** Properties of a UserInput. */ + interface IUserInput { - /** IssueStats issue */ - issue?: (string|null); + /** UserInput query */ + query?: (string|null); - /** IssueStats labeledConversationsCount */ - labeledConversationsCount?: (number|Long|string|null); + /** UserInput generatorName */ + generatorName?: (string|null); - /** IssueStats displayName */ - displayName?: (string|null); + /** UserInput querySource */ + querySource?: (google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.QuerySource|keyof typeof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.QuerySource|null); } - /** Represents an IssueStats. */ - class IssueStats implements IIssueStats { + /** Represents a UserInput. */ + class UserInput implements IUserInput { /** - * Constructs a new IssueStats. + * Constructs a new UserInput. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IIssueStats); + constructor(properties?: google.cloud.contactcenterinsights.v1.RuntimeAnnotation.IUserInput); - /** IssueStats issue. */ - public issue: string; + /** UserInput query. */ + public query: string; - /** IssueStats labeledConversationsCount. */ - public labeledConversationsCount: (number|Long|string); + /** UserInput generatorName. */ + public generatorName: string; - /** IssueStats displayName. */ - public displayName: string; + /** UserInput querySource. */ + public querySource: (google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.QuerySource|keyof typeof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.QuerySource); /** - * Creates a new IssueStats instance using the specified properties. + * Creates a new UserInput instance using the specified properties. * @param [properties] Properties to set - * @returns IssueStats instance + * @returns UserInput instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IIssueStats): google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats; + public static create(properties?: google.cloud.contactcenterinsights.v1.RuntimeAnnotation.IUserInput): google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput; /** - * Encodes the specified IssueStats message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats.verify|verify} messages. - * @param message IssueStats message or plain object to encode + * Encodes the specified UserInput message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.verify|verify} messages. + * @param message UserInput message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IIssueStats, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.RuntimeAnnotation.IUserInput, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified IssueStats message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats.verify|verify} messages. - * @param message IssueStats message or plain object to encode + * Encodes the specified UserInput message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.verify|verify} messages. + * @param message UserInput message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IIssueStats, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an IssueStats message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IssueStats - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats; - - /** - * Decodes an IssueStats message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IssueStats - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats; - - /** - * Verifies an IssueStats message. - * @param message Plain 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 IssueStats message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IssueStats - */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats; - - /** - * Creates a plain object from an IssueStats message. Also converts values to other types if specified. - * @param message IssueStats - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this IssueStats to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.RuntimeAnnotation.IUserInput, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Gets the default type url for IssueStats - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a PhraseMatcher. */ - interface IPhraseMatcher { - - /** PhraseMatcher name */ - name?: (string|null); - - /** PhraseMatcher revisionId */ - revisionId?: (string|null); - - /** PhraseMatcher versionTag */ - versionTag?: (string|null); - - /** PhraseMatcher revisionCreateTime */ - revisionCreateTime?: (google.protobuf.ITimestamp|null); - - /** PhraseMatcher displayName */ - displayName?: (string|null); - - /** PhraseMatcher type */ - type?: (google.cloud.contactcenterinsights.v1.PhraseMatcher.PhraseMatcherType|keyof typeof google.cloud.contactcenterinsights.v1.PhraseMatcher.PhraseMatcherType|null); - - /** PhraseMatcher active */ - active?: (boolean|null); - - /** PhraseMatcher phraseMatchRuleGroups */ - phraseMatchRuleGroups?: (google.cloud.contactcenterinsights.v1.IPhraseMatchRuleGroup[]|null); - - /** PhraseMatcher activationUpdateTime */ - activationUpdateTime?: (google.protobuf.ITimestamp|null); - - /** PhraseMatcher roleMatch */ - roleMatch?: (google.cloud.contactcenterinsights.v1.ConversationParticipant.Role|keyof typeof google.cloud.contactcenterinsights.v1.ConversationParticipant.Role|null); - - /** PhraseMatcher updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a PhraseMatcher. */ - class PhraseMatcher implements IPhraseMatcher { - - /** - * Constructs a new PhraseMatcher. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IPhraseMatcher); - - /** PhraseMatcher name. */ - public name: string; - - /** PhraseMatcher revisionId. */ - public revisionId: string; - - /** PhraseMatcher versionTag. */ - public versionTag: string; - - /** PhraseMatcher revisionCreateTime. */ - public revisionCreateTime?: (google.protobuf.ITimestamp|null); - - /** PhraseMatcher displayName. */ - public displayName: string; - - /** PhraseMatcher type. */ - public type: (google.cloud.contactcenterinsights.v1.PhraseMatcher.PhraseMatcherType|keyof typeof google.cloud.contactcenterinsights.v1.PhraseMatcher.PhraseMatcherType); - - /** PhraseMatcher active. */ - public active: boolean; - - /** PhraseMatcher phraseMatchRuleGroups. */ - public phraseMatchRuleGroups: google.cloud.contactcenterinsights.v1.IPhraseMatchRuleGroup[]; - - /** PhraseMatcher activationUpdateTime. */ - public activationUpdateTime?: (google.protobuf.ITimestamp|null); - - /** PhraseMatcher roleMatch. */ - public roleMatch: (google.cloud.contactcenterinsights.v1.ConversationParticipant.Role|keyof typeof google.cloud.contactcenterinsights.v1.ConversationParticipant.Role); - - /** PhraseMatcher updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new PhraseMatcher instance using the specified properties. - * @param [properties] Properties to set - * @returns PhraseMatcher instance - */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IPhraseMatcher): google.cloud.contactcenterinsights.v1.PhraseMatcher; - - /** - * Encodes the specified PhraseMatcher message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatcher.verify|verify} messages. - * @param message PhraseMatcher message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.contactcenterinsights.v1.IPhraseMatcher, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PhraseMatcher message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatcher.verify|verify} messages. - * @param message PhraseMatcher message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IPhraseMatcher, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PhraseMatcher message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PhraseMatcher - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.PhraseMatcher; + * Decodes a UserInput message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput; - /** - * Decodes a PhraseMatcher message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PhraseMatcher - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.PhraseMatcher; + /** + * Decodes a UserInput message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput; - /** - * Verifies a PhraseMatcher message. - * @param message 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 UserInput message. + * @param message Plain 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 PhraseMatcher message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PhraseMatcher - */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.PhraseMatcher; + /** + * Creates a UserInput message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserInput + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput; - /** - * Creates a plain object from a PhraseMatcher message. Also converts values to other types if specified. - * @param message PhraseMatcher - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.contactcenterinsights.v1.PhraseMatcher, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a UserInput message. Also converts values to other types if specified. + * @param message UserInput + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this PhraseMatcher to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this UserInput to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for PhraseMatcher - * @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 UserInput + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - namespace PhraseMatcher { + namespace UserInput { - /** PhraseMatcherType enum. */ - enum PhraseMatcherType { - PHRASE_MATCHER_TYPE_UNSPECIFIED = 0, - ALL_OF = 1, - ANY_OF = 2 + /** QuerySource enum. */ + enum QuerySource { + QUERY_SOURCE_UNSPECIFIED = 0, + AGENT_QUERY = 1, + SUGGESTED_QUERY = 2 + } } } - /** Properties of a PhraseMatchRuleGroup. */ - interface IPhraseMatchRuleGroup { + /** Properties of an AnswerFeedback. */ + interface IAnswerFeedback { - /** PhraseMatchRuleGroup type */ - type?: (google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType|keyof typeof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType|null); + /** AnswerFeedback correctnessLevel */ + correctnessLevel?: (google.cloud.contactcenterinsights.v1.AnswerFeedback.CorrectnessLevel|keyof typeof google.cloud.contactcenterinsights.v1.AnswerFeedback.CorrectnessLevel|null); - /** PhraseMatchRuleGroup phraseMatchRules */ - phraseMatchRules?: (google.cloud.contactcenterinsights.v1.IPhraseMatchRule[]|null); + /** AnswerFeedback clicked */ + clicked?: (boolean|null); + + /** AnswerFeedback displayed */ + displayed?: (boolean|null); } - /** Represents a PhraseMatchRuleGroup. */ - class PhraseMatchRuleGroup implements IPhraseMatchRuleGroup { + /** Represents an AnswerFeedback. */ + class AnswerFeedback implements IAnswerFeedback { /** - * Constructs a new PhraseMatchRuleGroup. + * Constructs a new AnswerFeedback. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IPhraseMatchRuleGroup); + constructor(properties?: google.cloud.contactcenterinsights.v1.IAnswerFeedback); - /** PhraseMatchRuleGroup type. */ - public type: (google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType|keyof typeof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType); + /** AnswerFeedback correctnessLevel. */ + public correctnessLevel: (google.cloud.contactcenterinsights.v1.AnswerFeedback.CorrectnessLevel|keyof typeof google.cloud.contactcenterinsights.v1.AnswerFeedback.CorrectnessLevel); - /** PhraseMatchRuleGroup phraseMatchRules. */ - public phraseMatchRules: google.cloud.contactcenterinsights.v1.IPhraseMatchRule[]; + /** AnswerFeedback clicked. */ + public clicked: boolean; + + /** AnswerFeedback displayed. */ + public displayed: boolean; /** - * Creates a new PhraseMatchRuleGroup instance using the specified properties. + * Creates a new AnswerFeedback instance using the specified properties. * @param [properties] Properties to set - * @returns PhraseMatchRuleGroup instance + * @returns AnswerFeedback instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IPhraseMatchRuleGroup): google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup; + public static create(properties?: google.cloud.contactcenterinsights.v1.IAnswerFeedback): google.cloud.contactcenterinsights.v1.AnswerFeedback; /** - * Encodes the specified PhraseMatchRuleGroup message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.verify|verify} messages. - * @param message PhraseMatchRuleGroup message or plain object to encode + * Encodes the specified AnswerFeedback message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.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.contactcenterinsights.v1.IPhraseMatchRuleGroup, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IAnswerFeedback, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PhraseMatchRuleGroup message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.verify|verify} messages. - * @param message PhraseMatchRuleGroup message or plain object to encode + * Encodes the specified AnswerFeedback message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.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.contactcenterinsights.v1.IPhraseMatchRuleGroup, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IAnswerFeedback, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PhraseMatchRuleGroup message from the specified reader or buffer. + * 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 PhraseMatchRuleGroup + * @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.contactcenterinsights.v1.PhraseMatchRuleGroup; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.AnswerFeedback; /** - * Decodes a PhraseMatchRuleGroup message from the specified reader or buffer, length delimited. + * Decodes an AnswerFeedback message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PhraseMatchRuleGroup + * @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.contactcenterinsights.v1.PhraseMatchRuleGroup; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.AnswerFeedback; /** - * Verifies a PhraseMatchRuleGroup message. + * 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 a PhraseMatchRuleGroup message from a plain object. Also converts values to their respective internal types. + * Creates an AnswerFeedback message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PhraseMatchRuleGroup + * @returns AnswerFeedback */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.AnswerFeedback; /** - * Creates a plain object from a PhraseMatchRuleGroup message. Also converts values to other types if specified. - * @param message PhraseMatchRuleGroup + * 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.contactcenterinsights.v1.PhraseMatchRuleGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.AnswerFeedback, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PhraseMatchRuleGroup to JSON. + * Converts this AnswerFeedback to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PhraseMatchRuleGroup + * 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 PhraseMatchRuleGroup { + namespace AnswerFeedback { - /** PhraseMatchRuleGroupType enum. */ - enum PhraseMatchRuleGroupType { - PHRASE_MATCH_RULE_GROUP_TYPE_UNSPECIFIED = 0, - ALL_OF = 1, - ANY_OF = 2 + /** CorrectnessLevel enum. */ + enum CorrectnessLevel { + CORRECTNESS_LEVEL_UNSPECIFIED = 0, + NOT_CORRECT = 1, + PARTIALLY_CORRECT = 2, + FULLY_CORRECT = 3 } } - /** Properties of a PhraseMatchRule. */ - interface IPhraseMatchRule { + /** Properties of an ArticleSuggestionData. */ + interface IArticleSuggestionData { - /** PhraseMatchRule query */ - query?: (string|null); + /** ArticleSuggestionData title */ + title?: (string|null); - /** PhraseMatchRule negated */ - negated?: (boolean|null); + /** ArticleSuggestionData uri */ + uri?: (string|null); - /** PhraseMatchRule config */ - config?: (google.cloud.contactcenterinsights.v1.IPhraseMatchRuleConfig|null); + /** ArticleSuggestionData confidenceScore */ + confidenceScore?: (number|null); + + /** ArticleSuggestionData metadata */ + metadata?: ({ [k: string]: string }|null); + + /** ArticleSuggestionData queryRecord */ + queryRecord?: (string|null); + + /** ArticleSuggestionData source */ + source?: (string|null); } - /** Represents a PhraseMatchRule. */ - class PhraseMatchRule implements IPhraseMatchRule { + /** Represents an ArticleSuggestionData. */ + class ArticleSuggestionData implements IArticleSuggestionData { /** - * Constructs a new PhraseMatchRule. + * Constructs a new ArticleSuggestionData. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IPhraseMatchRule); + constructor(properties?: google.cloud.contactcenterinsights.v1.IArticleSuggestionData); - /** PhraseMatchRule query. */ - public query: string; + /** ArticleSuggestionData title. */ + public title: string; - /** PhraseMatchRule negated. */ - public negated: boolean; + /** ArticleSuggestionData uri. */ + public uri: string; - /** PhraseMatchRule config. */ - public config?: (google.cloud.contactcenterinsights.v1.IPhraseMatchRuleConfig|null); + /** ArticleSuggestionData confidenceScore. */ + public confidenceScore: number; + + /** ArticleSuggestionData metadata. */ + public metadata: { [k: string]: string }; + + /** ArticleSuggestionData queryRecord. */ + public queryRecord: string; + + /** ArticleSuggestionData source. */ + public source: string; /** - * Creates a new PhraseMatchRule instance using the specified properties. + * Creates a new ArticleSuggestionData instance using the specified properties. * @param [properties] Properties to set - * @returns PhraseMatchRule instance + * @returns ArticleSuggestionData instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IPhraseMatchRule): google.cloud.contactcenterinsights.v1.PhraseMatchRule; + public static create(properties?: google.cloud.contactcenterinsights.v1.IArticleSuggestionData): google.cloud.contactcenterinsights.v1.ArticleSuggestionData; - /** - * Encodes the specified PhraseMatchRule message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchRule.verify|verify} messages. - * @param message PhraseMatchRule message or plain object to encode + /** + * Encodes the specified ArticleSuggestionData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ArticleSuggestionData.verify|verify} messages. + * @param message ArticleSuggestionData message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IPhraseMatchRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IArticleSuggestionData, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PhraseMatchRule message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchRule.verify|verify} messages. - * @param message PhraseMatchRule message or plain object to encode + * Encodes the specified ArticleSuggestionData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ArticleSuggestionData.verify|verify} messages. + * @param message ArticleSuggestionData message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IPhraseMatchRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IArticleSuggestionData, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PhraseMatchRule message from the specified reader or buffer. + * Decodes an ArticleSuggestionData message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PhraseMatchRule + * @returns ArticleSuggestionData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.PhraseMatchRule; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ArticleSuggestionData; /** - * Decodes a PhraseMatchRule message from the specified reader or buffer, length delimited. + * Decodes an ArticleSuggestionData message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PhraseMatchRule + * @returns ArticleSuggestionData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.PhraseMatchRule; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ArticleSuggestionData; /** - * Verifies a PhraseMatchRule message. + * Verifies an ArticleSuggestionData message. * @param message Plain 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 PhraseMatchRule message from a plain object. Also converts values to their respective internal types. + * Creates an ArticleSuggestionData message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PhraseMatchRule + * @returns ArticleSuggestionData */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.PhraseMatchRule; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ArticleSuggestionData; /** - * Creates a plain object from a PhraseMatchRule message. Also converts values to other types if specified. - * @param message PhraseMatchRule + * Creates a plain object from an ArticleSuggestionData message. Also converts values to other types if specified. + * @param message ArticleSuggestionData * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.PhraseMatchRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.ArticleSuggestionData, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PhraseMatchRule to JSON. + * Converts this ArticleSuggestionData to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PhraseMatchRule + * Gets the default type url for ArticleSuggestionData * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a PhraseMatchRuleConfig. */ - interface IPhraseMatchRuleConfig { + /** Properties of a FaqAnswerData. */ + interface IFaqAnswerData { - /** PhraseMatchRuleConfig exactMatchConfig */ - exactMatchConfig?: (google.cloud.contactcenterinsights.v1.IExactMatchConfig|null); + /** FaqAnswerData answer */ + answer?: (string|null); + + /** FaqAnswerData confidenceScore */ + confidenceScore?: (number|null); + + /** FaqAnswerData question */ + question?: (string|null); + + /** FaqAnswerData metadata */ + metadata?: ({ [k: string]: string }|null); + + /** FaqAnswerData queryRecord */ + queryRecord?: (string|null); + + /** FaqAnswerData source */ + source?: (string|null); } - /** Represents a PhraseMatchRuleConfig. */ - class PhraseMatchRuleConfig implements IPhraseMatchRuleConfig { + /** Represents a FaqAnswerData. */ + class FaqAnswerData implements IFaqAnswerData { /** - * Constructs a new PhraseMatchRuleConfig. + * Constructs a new FaqAnswerData. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IPhraseMatchRuleConfig); + constructor(properties?: google.cloud.contactcenterinsights.v1.IFaqAnswerData); - /** PhraseMatchRuleConfig exactMatchConfig. */ - public exactMatchConfig?: (google.cloud.contactcenterinsights.v1.IExactMatchConfig|null); + /** FaqAnswerData answer. */ + public answer: string; - /** PhraseMatchRuleConfig config. */ - public config?: "exactMatchConfig"; + /** FaqAnswerData confidenceScore. */ + public confidenceScore: number; + + /** FaqAnswerData question. */ + public question: string; + + /** FaqAnswerData metadata. */ + public metadata: { [k: string]: string }; + + /** FaqAnswerData queryRecord. */ + public queryRecord: string; + + /** FaqAnswerData source. */ + public source: string; /** - * Creates a new PhraseMatchRuleConfig instance using the specified properties. + * Creates a new FaqAnswerData instance using the specified properties. * @param [properties] Properties to set - * @returns PhraseMatchRuleConfig instance + * @returns FaqAnswerData instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IPhraseMatchRuleConfig): google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig; + public static create(properties?: google.cloud.contactcenterinsights.v1.IFaqAnswerData): google.cloud.contactcenterinsights.v1.FaqAnswerData; /** - * Encodes the specified PhraseMatchRuleConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig.verify|verify} messages. - * @param message PhraseMatchRuleConfig message or plain object to encode + * Encodes the specified FaqAnswerData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.FaqAnswerData.verify|verify} messages. + * @param message FaqAnswerData message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IPhraseMatchRuleConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IFaqAnswerData, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PhraseMatchRuleConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig.verify|verify} messages. - * @param message PhraseMatchRuleConfig message or plain object to encode + * Encodes the specified FaqAnswerData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.FaqAnswerData.verify|verify} messages. + * @param message FaqAnswerData message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IPhraseMatchRuleConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IFaqAnswerData, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PhraseMatchRuleConfig message from the specified reader or buffer. + * Decodes a FaqAnswerData message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PhraseMatchRuleConfig + * @returns FaqAnswerData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.FaqAnswerData; /** - * Decodes a PhraseMatchRuleConfig message from the specified reader or buffer, length delimited. + * Decodes a FaqAnswerData message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PhraseMatchRuleConfig + * @returns FaqAnswerData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.FaqAnswerData; /** - * Verifies a PhraseMatchRuleConfig message. + * Verifies a FaqAnswerData message. * @param message Plain 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 PhraseMatchRuleConfig message from a plain object. Also converts values to their respective internal types. + * Creates a FaqAnswerData message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PhraseMatchRuleConfig + * @returns FaqAnswerData */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.FaqAnswerData; /** - * Creates a plain object from a PhraseMatchRuleConfig message. Also converts values to other types if specified. - * @param message PhraseMatchRuleConfig + * Creates a plain object from a FaqAnswerData message. Also converts values to other types if specified. + * @param message FaqAnswerData * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.FaqAnswerData, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PhraseMatchRuleConfig to JSON. + * Converts this FaqAnswerData to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PhraseMatchRuleConfig + * Gets the default type url for FaqAnswerData * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ExactMatchConfig. */ - interface IExactMatchConfig { + /** Properties of a SmartReplyData. */ + interface ISmartReplyData { - /** ExactMatchConfig caseSensitive */ - caseSensitive?: (boolean|null); + /** SmartReplyData reply */ + reply?: (string|null); + + /** SmartReplyData confidenceScore */ + confidenceScore?: (number|null); + + /** SmartReplyData metadata */ + metadata?: ({ [k: string]: string }|null); + + /** SmartReplyData queryRecord */ + queryRecord?: (string|null); } - /** Represents an ExactMatchConfig. */ - class ExactMatchConfig implements IExactMatchConfig { + /** Represents a SmartReplyData. */ + class SmartReplyData implements ISmartReplyData { /** - * Constructs a new ExactMatchConfig. + * Constructs a new SmartReplyData. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IExactMatchConfig); + constructor(properties?: google.cloud.contactcenterinsights.v1.ISmartReplyData); - /** ExactMatchConfig caseSensitive. */ - public caseSensitive: boolean; + /** SmartReplyData reply. */ + public reply: string; + + /** SmartReplyData confidenceScore. */ + public confidenceScore: number; + + /** SmartReplyData metadata. */ + public metadata: { [k: string]: string }; + + /** SmartReplyData queryRecord. */ + public queryRecord: string; /** - * Creates a new ExactMatchConfig instance using the specified properties. + * Creates a new SmartReplyData instance using the specified properties. * @param [properties] Properties to set - * @returns ExactMatchConfig instance + * @returns SmartReplyData instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IExactMatchConfig): google.cloud.contactcenterinsights.v1.ExactMatchConfig; + public static create(properties?: google.cloud.contactcenterinsights.v1.ISmartReplyData): google.cloud.contactcenterinsights.v1.SmartReplyData; /** - * Encodes the specified ExactMatchConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExactMatchConfig.verify|verify} messages. - * @param message ExactMatchConfig message or plain object to encode + * Encodes the specified SmartReplyData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SmartReplyData.verify|verify} messages. + * @param message SmartReplyData message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IExactMatchConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.ISmartReplyData, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExactMatchConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExactMatchConfig.verify|verify} messages. - * @param message ExactMatchConfig message or plain object to encode + * Encodes the specified SmartReplyData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SmartReplyData.verify|verify} messages. + * @param message SmartReplyData message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IExactMatchConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ISmartReplyData, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExactMatchConfig message from the specified reader or buffer. + * Decodes a SmartReplyData message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExactMatchConfig + * @returns SmartReplyData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ExactMatchConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.SmartReplyData; /** - * Decodes an ExactMatchConfig message from the specified reader or buffer, length delimited. + * Decodes a SmartReplyData message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExactMatchConfig + * @returns SmartReplyData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ExactMatchConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.SmartReplyData; /** - * Verifies an ExactMatchConfig message. + * Verifies a SmartReplyData message. * @param message Plain 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 ExactMatchConfig message from a plain object. Also converts values to their respective internal types. + * Creates a SmartReplyData message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExactMatchConfig + * @returns SmartReplyData */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ExactMatchConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.SmartReplyData; /** - * Creates a plain object from an ExactMatchConfig message. Also converts values to other types if specified. - * @param message ExactMatchConfig + * Creates a plain object from a SmartReplyData message. Also converts values to other types if specified. + * @param message SmartReplyData * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.ExactMatchConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.SmartReplyData, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExactMatchConfig to JSON. + * Converts this SmartReplyData to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ExactMatchConfig + * Gets the default type url for SmartReplyData * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Settings. */ - interface ISettings { - - /** Settings name */ - name?: (string|null); - - /** Settings createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Settings updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** Settings languageCode */ - languageCode?: (string|null); - - /** Settings conversationTtl */ - conversationTtl?: (google.protobuf.IDuration|null); - - /** Settings pubsubNotificationSettings */ - pubsubNotificationSettings?: ({ [k: string]: string }|null); + /** Properties of a SmartComposeSuggestionData. */ + interface ISmartComposeSuggestionData { - /** Settings analysisConfig */ - analysisConfig?: (google.cloud.contactcenterinsights.v1.Settings.IAnalysisConfig|null); + /** SmartComposeSuggestionData suggestion */ + suggestion?: (string|null); - /** Settings redactionConfig */ - redactionConfig?: (google.cloud.contactcenterinsights.v1.IRedactionConfig|null); + /** SmartComposeSuggestionData confidenceScore */ + confidenceScore?: (number|null); - /** Settings speechConfig */ - speechConfig?: (google.cloud.contactcenterinsights.v1.ISpeechConfig|null); + /** SmartComposeSuggestionData metadata */ + metadata?: ({ [k: string]: string }|null); + + /** SmartComposeSuggestionData queryRecord */ + queryRecord?: (string|null); } - /** Represents a Settings. */ - class Settings implements ISettings { + /** Represents a SmartComposeSuggestionData. */ + class SmartComposeSuggestionData implements ISmartComposeSuggestionData { /** - * Constructs a new Settings. + * Constructs a new SmartComposeSuggestionData. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.ISettings); - - /** Settings name. */ - public name: string; - - /** Settings createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Settings updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** Settings languageCode. */ - public languageCode: string; - - /** Settings conversationTtl. */ - public conversationTtl?: (google.protobuf.IDuration|null); + constructor(properties?: google.cloud.contactcenterinsights.v1.ISmartComposeSuggestionData); - /** Settings pubsubNotificationSettings. */ - public pubsubNotificationSettings: { [k: string]: string }; + /** SmartComposeSuggestionData suggestion. */ + public suggestion: string; - /** Settings analysisConfig. */ - public analysisConfig?: (google.cloud.contactcenterinsights.v1.Settings.IAnalysisConfig|null); + /** SmartComposeSuggestionData confidenceScore. */ + public confidenceScore: number; - /** Settings redactionConfig. */ - public redactionConfig?: (google.cloud.contactcenterinsights.v1.IRedactionConfig|null); + /** SmartComposeSuggestionData metadata. */ + public metadata: { [k: string]: string }; - /** Settings speechConfig. */ - public speechConfig?: (google.cloud.contactcenterinsights.v1.ISpeechConfig|null); + /** SmartComposeSuggestionData queryRecord. */ + public queryRecord: string; /** - * Creates a new Settings instance using the specified properties. + * Creates a new SmartComposeSuggestionData instance using the specified properties. * @param [properties] Properties to set - * @returns Settings instance + * @returns SmartComposeSuggestionData instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.ISettings): google.cloud.contactcenterinsights.v1.Settings; + public static create(properties?: google.cloud.contactcenterinsights.v1.ISmartComposeSuggestionData): google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData; /** - * Encodes the specified Settings message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Settings.verify|verify} messages. - * @param message Settings message or plain object to encode + * Encodes the specified SmartComposeSuggestionData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData.verify|verify} messages. + * @param message SmartComposeSuggestionData message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.ISettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.ISmartComposeSuggestionData, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Settings message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Settings.verify|verify} messages. - * @param message Settings message or plain object to encode + * Encodes the specified SmartComposeSuggestionData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData.verify|verify} messages. + * @param message SmartComposeSuggestionData message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ISettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ISmartComposeSuggestionData, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Settings message from the specified reader or buffer. + * Decodes a SmartComposeSuggestionData message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Settings + * @returns SmartComposeSuggestionData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Settings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData; /** - * Decodes a Settings message from the specified reader or buffer, length delimited. + * Decodes a SmartComposeSuggestionData message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Settings + * @returns SmartComposeSuggestionData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Settings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData; /** - * Verifies a Settings message. + * Verifies a SmartComposeSuggestionData message. * @param message Plain 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 Settings message from a plain object. Also converts values to their respective internal types. + * Creates a SmartComposeSuggestionData message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Settings + * @returns SmartComposeSuggestionData */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Settings; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData; /** - * Creates a plain object from a Settings message. Also converts values to other types if specified. - * @param message Settings + * Creates a plain object from a SmartComposeSuggestionData message. Also converts values to other types if specified. + * @param message SmartComposeSuggestionData * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.Settings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Settings to JSON. + * Converts this SmartComposeSuggestionData to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Settings + * Gets the default type url for SmartComposeSuggestionData * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Settings { - - /** Properties of an AnalysisConfig. */ - interface IAnalysisConfig { - - /** AnalysisConfig runtimeIntegrationAnalysisPercentage */ - runtimeIntegrationAnalysisPercentage?: (number|null); - - /** AnalysisConfig uploadConversationAnalysisPercentage */ - uploadConversationAnalysisPercentage?: (number|null); - - /** AnalysisConfig annotatorSelector */ - annotatorSelector?: (google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null); - } - - /** Represents an AnalysisConfig. */ - class AnalysisConfig implements IAnalysisConfig { - - /** - * Constructs a new AnalysisConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.contactcenterinsights.v1.Settings.IAnalysisConfig); - - /** AnalysisConfig runtimeIntegrationAnalysisPercentage. */ - public runtimeIntegrationAnalysisPercentage: number; - - /** AnalysisConfig uploadConversationAnalysisPercentage. */ - public uploadConversationAnalysisPercentage: number; - - /** AnalysisConfig annotatorSelector. */ - public annotatorSelector?: (google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null); - - /** - * Creates a new AnalysisConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AnalysisConfig instance - */ - public static create(properties?: google.cloud.contactcenterinsights.v1.Settings.IAnalysisConfig): google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig; - - /** - * Encodes the specified AnalysisConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.verify|verify} messages. - * @param message AnalysisConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.contactcenterinsights.v1.Settings.IAnalysisConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AnalysisConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.verify|verify} messages. - * @param message AnalysisConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.Settings.IAnalysisConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AnalysisConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AnalysisConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig; - - /** - * Decodes an AnalysisConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AnalysisConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig; - - /** - * Verifies an AnalysisConfig message. - * @param message Plain 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 AnalysisConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AnalysisConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig; - - /** - * Creates a plain object from an AnalysisConfig message. Also converts values to other types if specified. - * @param message AnalysisConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AnalysisConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AnalysisConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an EncryptionSpec. */ - interface IEncryptionSpec { + /** Properties of a DialogflowInteractionData. */ + interface IDialogflowInteractionData { - /** EncryptionSpec name */ - name?: (string|null); + /** DialogflowInteractionData dialogflowIntentId */ + dialogflowIntentId?: (string|null); - /** EncryptionSpec kmsKey */ - kmsKey?: (string|null); + /** DialogflowInteractionData confidence */ + confidence?: (number|null); } - /** Represents an EncryptionSpec. */ - class EncryptionSpec implements IEncryptionSpec { + /** Represents a DialogflowInteractionData. */ + class DialogflowInteractionData implements IDialogflowInteractionData { /** - * Constructs a new EncryptionSpec. + * Constructs a new DialogflowInteractionData. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IEncryptionSpec); + constructor(properties?: google.cloud.contactcenterinsights.v1.IDialogflowInteractionData); - /** EncryptionSpec name. */ - public name: string; + /** DialogflowInteractionData dialogflowIntentId. */ + public dialogflowIntentId: string; - /** EncryptionSpec kmsKey. */ - public kmsKey: string; + /** DialogflowInteractionData confidence. */ + public confidence: number; /** - * Creates a new EncryptionSpec instance using the specified properties. + * Creates a new DialogflowInteractionData instance using the specified properties. * @param [properties] Properties to set - * @returns EncryptionSpec instance + * @returns DialogflowInteractionData instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IEncryptionSpec): google.cloud.contactcenterinsights.v1.EncryptionSpec; + public static create(properties?: google.cloud.contactcenterinsights.v1.IDialogflowInteractionData): google.cloud.contactcenterinsights.v1.DialogflowInteractionData; /** - * Encodes the specified EncryptionSpec message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.EncryptionSpec.verify|verify} messages. - * @param message EncryptionSpec message or plain object to encode + * Encodes the specified DialogflowInteractionData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DialogflowInteractionData.verify|verify} messages. + * @param message DialogflowInteractionData message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IEncryptionSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IDialogflowInteractionData, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EncryptionSpec message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.EncryptionSpec.verify|verify} messages. - * @param message EncryptionSpec message or plain object to encode + * Encodes the specified DialogflowInteractionData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DialogflowInteractionData.verify|verify} messages. + * @param message DialogflowInteractionData message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IEncryptionSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IDialogflowInteractionData, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EncryptionSpec message from the specified reader or buffer. + * Decodes a DialogflowInteractionData message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EncryptionSpec + * @returns DialogflowInteractionData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.EncryptionSpec; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.DialogflowInteractionData; /** - * Decodes an EncryptionSpec message from the specified reader or buffer, length delimited. + * Decodes a DialogflowInteractionData message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EncryptionSpec + * @returns DialogflowInteractionData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.EncryptionSpec; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.DialogflowInteractionData; /** - * Verifies an EncryptionSpec message. + * Verifies a DialogflowInteractionData message. * @param message Plain 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 EncryptionSpec message from a plain object. Also converts values to their respective internal types. + * Creates a DialogflowInteractionData message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EncryptionSpec + * @returns DialogflowInteractionData */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.EncryptionSpec; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.DialogflowInteractionData; /** - * Creates a plain object from an EncryptionSpec message. Also converts values to other types if specified. - * @param message EncryptionSpec + * Creates a plain object from a DialogflowInteractionData message. Also converts values to other types if specified. + * @param message DialogflowInteractionData * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.EncryptionSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.DialogflowInteractionData, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EncryptionSpec to JSON. + * Converts this DialogflowInteractionData to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EncryptionSpec + * Gets the default type url for DialogflowInteractionData * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a RedactionConfig. */ - interface IRedactionConfig { + /** Properties of a ConversationSummarizationSuggestionData. */ + interface IConversationSummarizationSuggestionData { - /** RedactionConfig deidentifyTemplate */ - deidentifyTemplate?: (string|null); + /** ConversationSummarizationSuggestionData text */ + text?: (string|null); - /** RedactionConfig inspectTemplate */ - inspectTemplate?: (string|null); + /** ConversationSummarizationSuggestionData textSections */ + textSections?: ({ [k: string]: string }|null); + + /** ConversationSummarizationSuggestionData confidence */ + confidence?: (number|null); + + /** ConversationSummarizationSuggestionData metadata */ + metadata?: ({ [k: string]: string }|null); + + /** ConversationSummarizationSuggestionData answerRecord */ + answerRecord?: (string|null); + + /** ConversationSummarizationSuggestionData conversationModel */ + conversationModel?: (string|null); } - /** Represents a RedactionConfig. */ - class RedactionConfig implements IRedactionConfig { + /** Represents a ConversationSummarizationSuggestionData. */ + class ConversationSummarizationSuggestionData implements IConversationSummarizationSuggestionData { /** - * Constructs a new RedactionConfig. + * Constructs a new ConversationSummarizationSuggestionData. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IRedactionConfig); + constructor(properties?: google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData); - /** RedactionConfig deidentifyTemplate. */ - public deidentifyTemplate: string; + /** ConversationSummarizationSuggestionData text. */ + public text: string; - /** RedactionConfig inspectTemplate. */ - public inspectTemplate: string; + /** ConversationSummarizationSuggestionData textSections. */ + public textSections: { [k: string]: string }; + + /** ConversationSummarizationSuggestionData confidence. */ + public confidence: number; + + /** ConversationSummarizationSuggestionData metadata. */ + public metadata: { [k: string]: string }; + + /** ConversationSummarizationSuggestionData answerRecord. */ + public answerRecord: string; + + /** ConversationSummarizationSuggestionData conversationModel. */ + public conversationModel: string; /** - * Creates a new RedactionConfig instance using the specified properties. + * Creates a new ConversationSummarizationSuggestionData instance using the specified properties. * @param [properties] Properties to set - * @returns RedactionConfig instance + * @returns ConversationSummarizationSuggestionData instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IRedactionConfig): google.cloud.contactcenterinsights.v1.RedactionConfig; + public static create(properties?: google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData): google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData; /** - * Encodes the specified RedactionConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.RedactionConfig.verify|verify} messages. - * @param message RedactionConfig message or plain object to encode + * Encodes the specified ConversationSummarizationSuggestionData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.verify|verify} messages. + * @param message ConversationSummarizationSuggestionData message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IRedactionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RedactionConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.RedactionConfig.verify|verify} messages. - * @param message RedactionConfig message or plain object to encode + * Encodes the specified ConversationSummarizationSuggestionData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.verify|verify} messages. + * @param message ConversationSummarizationSuggestionData message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IRedactionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RedactionConfig message from the specified reader or buffer. + * Decodes a ConversationSummarizationSuggestionData message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RedactionConfig + * @returns ConversationSummarizationSuggestionData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.RedactionConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData; /** - * Decodes a RedactionConfig message from the specified reader or buffer, length delimited. + * Decodes a ConversationSummarizationSuggestionData message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RedactionConfig + * @returns ConversationSummarizationSuggestionData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.RedactionConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData; /** - * Verifies a RedactionConfig message. + * Verifies a ConversationSummarizationSuggestionData message. * @param message Plain 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 RedactionConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ConversationSummarizationSuggestionData message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RedactionConfig + * @returns ConversationSummarizationSuggestionData */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.RedactionConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData; /** - * Creates a plain object from a RedactionConfig message. Also converts values to other types if specified. - * @param message RedactionConfig + * Creates a plain object from a ConversationSummarizationSuggestionData message. Also converts values to other types if specified. + * @param message ConversationSummarizationSuggestionData * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.RedactionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RedactionConfig to JSON. + * Converts this ConversationSummarizationSuggestionData to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RedactionConfig + * Gets the default type url for ConversationSummarizationSuggestionData * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SpeechConfig. */ - interface ISpeechConfig { + /** Properties of a ConversationParticipant. */ + interface IConversationParticipant { - /** SpeechConfig speechRecognizer */ - speechRecognizer?: (string|null); + /** ConversationParticipant dialogflowParticipantName */ + dialogflowParticipantName?: (string|null); + + /** ConversationParticipant userId */ + userId?: (string|null); + + /** ConversationParticipant dialogflowParticipant */ + dialogflowParticipant?: (string|null); + + /** ConversationParticipant obfuscatedExternalUserId */ + obfuscatedExternalUserId?: (string|null); + + /** ConversationParticipant role */ + role?: (google.cloud.contactcenterinsights.v1.ConversationParticipant.Role|keyof typeof google.cloud.contactcenterinsights.v1.ConversationParticipant.Role|null); } - /** Represents a SpeechConfig. */ - class SpeechConfig implements ISpeechConfig { + /** Represents a ConversationParticipant. */ + class ConversationParticipant implements IConversationParticipant { /** - * Constructs a new SpeechConfig. + * Constructs a new ConversationParticipant. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.ISpeechConfig); + constructor(properties?: google.cloud.contactcenterinsights.v1.IConversationParticipant); - /** SpeechConfig speechRecognizer. */ - public speechRecognizer: string; + /** ConversationParticipant dialogflowParticipantName. */ + public dialogflowParticipantName?: (string|null); + + /** ConversationParticipant userId. */ + public userId?: (string|null); + + /** ConversationParticipant dialogflowParticipant. */ + public dialogflowParticipant: string; + + /** ConversationParticipant obfuscatedExternalUserId. */ + public obfuscatedExternalUserId: string; + + /** ConversationParticipant role. */ + public role: (google.cloud.contactcenterinsights.v1.ConversationParticipant.Role|keyof typeof google.cloud.contactcenterinsights.v1.ConversationParticipant.Role); + + /** ConversationParticipant participant. */ + public participant?: ("dialogflowParticipantName"|"userId"); /** - * Creates a new SpeechConfig instance using the specified properties. + * Creates a new ConversationParticipant instance using the specified properties. * @param [properties] Properties to set - * @returns SpeechConfig instance + * @returns ConversationParticipant instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.ISpeechConfig): google.cloud.contactcenterinsights.v1.SpeechConfig; + public static create(properties?: google.cloud.contactcenterinsights.v1.IConversationParticipant): google.cloud.contactcenterinsights.v1.ConversationParticipant; /** - * Encodes the specified SpeechConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SpeechConfig.verify|verify} messages. - * @param message SpeechConfig message or plain object to encode + * Encodes the specified ConversationParticipant message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationParticipant.verify|verify} messages. + * @param message ConversationParticipant message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.ISpeechConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IConversationParticipant, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SpeechConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SpeechConfig.verify|verify} messages. - * @param message SpeechConfig message or plain object to encode + * Encodes the specified ConversationParticipant message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationParticipant.verify|verify} messages. + * @param message ConversationParticipant message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ISpeechConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IConversationParticipant, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SpeechConfig message from the specified reader or buffer. + * Decodes a ConversationParticipant message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SpeechConfig + * @returns ConversationParticipant * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.SpeechConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ConversationParticipant; /** - * Decodes a SpeechConfig message from the specified reader or buffer, length delimited. + * Decodes a ConversationParticipant message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SpeechConfig + * @returns ConversationParticipant * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.SpeechConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ConversationParticipant; /** - * Verifies a SpeechConfig message. + * Verifies a ConversationParticipant message. * @param message Plain 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 SpeechConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ConversationParticipant message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SpeechConfig + * @returns ConversationParticipant */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.SpeechConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ConversationParticipant; /** - * Creates a plain object from a SpeechConfig message. Also converts values to other types if specified. - * @param message SpeechConfig + * Creates a plain object from a ConversationParticipant message. Also converts values to other types if specified. + * @param message ConversationParticipant * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.SpeechConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.ConversationParticipant, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SpeechConfig to JSON. + * Converts this ConversationParticipant to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SpeechConfig + * Gets the default type url for ConversationParticipant * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a RuntimeAnnotation. */ - interface IRuntimeAnnotation { - - /** RuntimeAnnotation articleSuggestion */ - articleSuggestion?: (google.cloud.contactcenterinsights.v1.IArticleSuggestionData|null); - - /** RuntimeAnnotation faqAnswer */ - faqAnswer?: (google.cloud.contactcenterinsights.v1.IFaqAnswerData|null); - - /** RuntimeAnnotation smartReply */ - smartReply?: (google.cloud.contactcenterinsights.v1.ISmartReplyData|null); - - /** RuntimeAnnotation smartComposeSuggestion */ - smartComposeSuggestion?: (google.cloud.contactcenterinsights.v1.ISmartComposeSuggestionData|null); - - /** RuntimeAnnotation dialogflowInteraction */ - dialogflowInteraction?: (google.cloud.contactcenterinsights.v1.IDialogflowInteractionData|null); + namespace ConversationParticipant { - /** RuntimeAnnotation conversationSummarizationSuggestion */ - conversationSummarizationSuggestion?: (google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData|null); + /** Role enum. */ + enum Role { + ROLE_UNSPECIFIED = 0, + HUMAN_AGENT = 1, + AUTOMATED_AGENT = 2, + END_USER = 3, + ANY_AGENT = 4 + } + } - /** RuntimeAnnotation annotationId */ - annotationId?: (string|null); + /** Properties of a View. */ + interface IView { - /** RuntimeAnnotation createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** View name */ + name?: (string|null); - /** RuntimeAnnotation startBoundary */ - startBoundary?: (google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null); + /** View displayName */ + displayName?: (string|null); - /** RuntimeAnnotation endBoundary */ - endBoundary?: (google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null); + /** View createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** RuntimeAnnotation answerFeedback */ - answerFeedback?: (google.cloud.contactcenterinsights.v1.IAnswerFeedback|null); + /** View updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); - /** RuntimeAnnotation userInput */ - userInput?: (google.cloud.contactcenterinsights.v1.RuntimeAnnotation.IUserInput|null); + /** View value */ + value?: (string|null); } - /** Represents a RuntimeAnnotation. */ - class RuntimeAnnotation implements IRuntimeAnnotation { + /** Represents a View. */ + class View implements IView { /** - * Constructs a new RuntimeAnnotation. + * Constructs a new View. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IRuntimeAnnotation); - - /** RuntimeAnnotation articleSuggestion. */ - public articleSuggestion?: (google.cloud.contactcenterinsights.v1.IArticleSuggestionData|null); - - /** RuntimeAnnotation faqAnswer. */ - public faqAnswer?: (google.cloud.contactcenterinsights.v1.IFaqAnswerData|null); - - /** RuntimeAnnotation smartReply. */ - public smartReply?: (google.cloud.contactcenterinsights.v1.ISmartReplyData|null); - - /** RuntimeAnnotation smartComposeSuggestion. */ - public smartComposeSuggestion?: (google.cloud.contactcenterinsights.v1.ISmartComposeSuggestionData|null); - - /** RuntimeAnnotation dialogflowInteraction. */ - public dialogflowInteraction?: (google.cloud.contactcenterinsights.v1.IDialogflowInteractionData|null); + constructor(properties?: google.cloud.contactcenterinsights.v1.IView); - /** RuntimeAnnotation conversationSummarizationSuggestion. */ - public conversationSummarizationSuggestion?: (google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData|null); + /** View name. */ + public name: string; - /** RuntimeAnnotation annotationId. */ - public annotationId: string; + /** View displayName. */ + public displayName: string; - /** RuntimeAnnotation createTime. */ + /** View createTime. */ public createTime?: (google.protobuf.ITimestamp|null); - /** RuntimeAnnotation startBoundary. */ - public startBoundary?: (google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null); - - /** RuntimeAnnotation endBoundary. */ - public endBoundary?: (google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null); - - /** RuntimeAnnotation answerFeedback. */ - public answerFeedback?: (google.cloud.contactcenterinsights.v1.IAnswerFeedback|null); - - /** RuntimeAnnotation userInput. */ - public userInput?: (google.cloud.contactcenterinsights.v1.RuntimeAnnotation.IUserInput|null); + /** View updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** RuntimeAnnotation data. */ - public data?: ("articleSuggestion"|"faqAnswer"|"smartReply"|"smartComposeSuggestion"|"dialogflowInteraction"|"conversationSummarizationSuggestion"); + /** View value. */ + public value: string; /** - * Creates a new RuntimeAnnotation instance using the specified properties. + * Creates a new View instance using the specified properties. * @param [properties] Properties to set - * @returns RuntimeAnnotation instance + * @returns View instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IRuntimeAnnotation): google.cloud.contactcenterinsights.v1.RuntimeAnnotation; + public static create(properties?: google.cloud.contactcenterinsights.v1.IView): google.cloud.contactcenterinsights.v1.View; /** - * Encodes the specified RuntimeAnnotation message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.RuntimeAnnotation.verify|verify} messages. - * @param message RuntimeAnnotation message or plain object to encode + * Encodes the specified View message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.View.verify|verify} messages. + * @param message View message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IRuntimeAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IView, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RuntimeAnnotation message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.RuntimeAnnotation.verify|verify} messages. - * @param message RuntimeAnnotation message or plain object to encode + * Encodes the specified View message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.View.verify|verify} messages. + * @param message View message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IRuntimeAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IView, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RuntimeAnnotation message from the specified reader or buffer. + * Decodes a View message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RuntimeAnnotation + * @returns View * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.RuntimeAnnotation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.View; /** - * Decodes a RuntimeAnnotation message from the specified reader or buffer, length delimited. + * Decodes a View message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RuntimeAnnotation + * @returns View * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.RuntimeAnnotation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.View; /** - * Verifies a RuntimeAnnotation message. + * Verifies a View message. * @param message Plain 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 RuntimeAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates a View message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RuntimeAnnotation + * @returns View */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.RuntimeAnnotation; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.View; /** - * Creates a plain object from a RuntimeAnnotation message. Also converts values to other types if specified. - * @param message RuntimeAnnotation + * Creates a plain object from a View message. Also converts values to other types if specified. + * @param message View * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.RuntimeAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.View, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RuntimeAnnotation to JSON. + * Converts this View to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RuntimeAnnotation + * Gets the default type url for View * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace RuntimeAnnotation { - - /** Properties of a UserInput. */ - interface IUserInput { - - /** UserInput query */ - query?: (string|null); - - /** UserInput generatorName */ - generatorName?: (string|null); - - /** UserInput querySource */ - querySource?: (google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.QuerySource|keyof typeof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.QuerySource|null); - } - - /** Represents a UserInput. */ - class UserInput implements IUserInput { - - /** - * Constructs a new UserInput. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.contactcenterinsights.v1.RuntimeAnnotation.IUserInput); - - /** UserInput query. */ - public query: string; - - /** UserInput generatorName. */ - public generatorName: string; - - /** UserInput querySource. */ - public querySource: (google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.QuerySource|keyof typeof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.QuerySource); - - /** - * Creates a new UserInput instance using the specified properties. - * @param [properties] Properties to set - * @returns UserInput instance - */ - public static create(properties?: google.cloud.contactcenterinsights.v1.RuntimeAnnotation.IUserInput): google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput; - - /** - * Encodes the specified UserInput message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.verify|verify} messages. - * @param message UserInput message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.contactcenterinsights.v1.RuntimeAnnotation.IUserInput, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UserInput message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.verify|verify} messages. - * @param message UserInput message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.RuntimeAnnotation.IUserInput, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of an AnnotatorSelector. */ + interface IAnnotatorSelector { - /** - * Decodes a UserInput message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UserInput - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput; + /** AnnotatorSelector runInterruptionAnnotator */ + runInterruptionAnnotator?: (boolean|null); - /** - * Decodes a UserInput message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UserInput - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput; + /** AnnotatorSelector runSilenceAnnotator */ + runSilenceAnnotator?: (boolean|null); - /** - * Verifies a UserInput message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** AnnotatorSelector runPhraseMatcherAnnotator */ + runPhraseMatcherAnnotator?: (boolean|null); - /** - * Creates a UserInput message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UserInput - */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput; + /** AnnotatorSelector phraseMatchers */ + phraseMatchers?: (string[]|null); - /** - * Creates a plain object from a UserInput message. Also converts values to other types if specified. - * @param message UserInput - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** AnnotatorSelector runSentimentAnnotator */ + runSentimentAnnotator?: (boolean|null); - /** - * Converts this UserInput to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** AnnotatorSelector runEntityAnnotator */ + runEntityAnnotator?: (boolean|null); - /** - * Gets the default type url for UserInput - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** AnnotatorSelector runIntentAnnotator */ + runIntentAnnotator?: (boolean|null); - namespace UserInput { + /** AnnotatorSelector runIssueModelAnnotator */ + runIssueModelAnnotator?: (boolean|null); - /** QuerySource enum. */ - enum QuerySource { - QUERY_SOURCE_UNSPECIFIED = 0, - AGENT_QUERY = 1, - SUGGESTED_QUERY = 2 - } - } - } + /** AnnotatorSelector issueModels */ + issueModels?: (string[]|null); - /** Properties of an AnswerFeedback. */ - interface IAnswerFeedback { + /** AnnotatorSelector runSummarizationAnnotator */ + runSummarizationAnnotator?: (boolean|null); - /** AnswerFeedback correctnessLevel */ - correctnessLevel?: (google.cloud.contactcenterinsights.v1.AnswerFeedback.CorrectnessLevel|keyof typeof google.cloud.contactcenterinsights.v1.AnswerFeedback.CorrectnessLevel|null); + /** AnnotatorSelector summarizationConfig */ + summarizationConfig?: (google.cloud.contactcenterinsights.v1.AnnotatorSelector.ISummarizationConfig|null); - /** AnswerFeedback clicked */ - clicked?: (boolean|null); + /** AnnotatorSelector runQaAnnotator */ + runQaAnnotator?: (boolean|null); - /** AnswerFeedback displayed */ - displayed?: (boolean|null); + /** AnnotatorSelector qaConfig */ + qaConfig?: (google.cloud.contactcenterinsights.v1.AnnotatorSelector.IQaConfig|null); } - /** Represents an AnswerFeedback. */ - class AnswerFeedback implements IAnswerFeedback { + /** Represents an AnnotatorSelector. */ + class AnnotatorSelector implements IAnnotatorSelector { /** - * Constructs a new AnswerFeedback. + * Constructs a new AnnotatorSelector. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IAnswerFeedback); + constructor(properties?: google.cloud.contactcenterinsights.v1.IAnnotatorSelector); - /** AnswerFeedback correctnessLevel. */ - public correctnessLevel: (google.cloud.contactcenterinsights.v1.AnswerFeedback.CorrectnessLevel|keyof typeof google.cloud.contactcenterinsights.v1.AnswerFeedback.CorrectnessLevel); + /** AnnotatorSelector runInterruptionAnnotator. */ + public runInterruptionAnnotator: boolean; - /** AnswerFeedback clicked. */ - public clicked: boolean; + /** AnnotatorSelector runSilenceAnnotator. */ + public runSilenceAnnotator: boolean; - /** AnswerFeedback displayed. */ - public displayed: boolean; + /** AnnotatorSelector runPhraseMatcherAnnotator. */ + public runPhraseMatcherAnnotator: boolean; + + /** AnnotatorSelector phraseMatchers. */ + public phraseMatchers: string[]; + + /** AnnotatorSelector runSentimentAnnotator. */ + public runSentimentAnnotator: boolean; + + /** AnnotatorSelector runEntityAnnotator. */ + public runEntityAnnotator: boolean; + + /** AnnotatorSelector runIntentAnnotator. */ + public runIntentAnnotator: boolean; + + /** AnnotatorSelector runIssueModelAnnotator. */ + public runIssueModelAnnotator: boolean; + + /** AnnotatorSelector issueModels. */ + public issueModels: string[]; + + /** AnnotatorSelector runSummarizationAnnotator. */ + public runSummarizationAnnotator: boolean; + + /** AnnotatorSelector summarizationConfig. */ + public summarizationConfig?: (google.cloud.contactcenterinsights.v1.AnnotatorSelector.ISummarizationConfig|null); + + /** AnnotatorSelector runQaAnnotator. */ + public runQaAnnotator: boolean; + + /** AnnotatorSelector qaConfig. */ + public qaConfig?: (google.cloud.contactcenterinsights.v1.AnnotatorSelector.IQaConfig|null); /** - * Creates a new AnswerFeedback instance using the specified properties. + * Creates a new AnnotatorSelector instance using the specified properties. * @param [properties] Properties to set - * @returns AnswerFeedback instance + * @returns AnnotatorSelector instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IAnswerFeedback): google.cloud.contactcenterinsights.v1.AnswerFeedback; + public static create(properties?: google.cloud.contactcenterinsights.v1.IAnnotatorSelector): google.cloud.contactcenterinsights.v1.AnnotatorSelector; /** - * Encodes the specified AnswerFeedback message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnswerFeedback.verify|verify} messages. - * @param message AnswerFeedback message or plain object to encode + * Encodes the specified AnnotatorSelector message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotatorSelector.verify|verify} messages. + * @param message AnnotatorSelector message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IAnswerFeedback, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IAnnotatorSelector, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AnswerFeedback message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnswerFeedback.verify|verify} messages. - * @param message AnswerFeedback message or plain object to encode + * Encodes the specified AnnotatorSelector message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotatorSelector.verify|verify} messages. + * @param message AnnotatorSelector message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IAnswerFeedback, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IAnnotatorSelector, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AnswerFeedback message from the specified reader or buffer. + * Decodes an AnnotatorSelector message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AnswerFeedback + * @returns AnnotatorSelector * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.AnswerFeedback; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.AnnotatorSelector; /** - * Decodes an AnswerFeedback message from the specified reader or buffer, length delimited. + * Decodes an AnnotatorSelector message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AnswerFeedback + * @returns AnnotatorSelector * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.AnswerFeedback; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.AnnotatorSelector; /** - * Verifies an AnswerFeedback message. + * Verifies an AnnotatorSelector message. * @param message Plain 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. + * Creates an AnnotatorSelector message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AnswerFeedback + * @returns AnnotatorSelector */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.AnswerFeedback; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.AnnotatorSelector; /** - * Creates a plain object from an AnswerFeedback message. Also converts values to other types if specified. - * @param message AnswerFeedback + * Creates a plain object from an AnnotatorSelector message. Also converts values to other types if specified. + * @param message AnnotatorSelector * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.AnswerFeedback, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.AnnotatorSelector, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AnswerFeedback to JSON. + * Converts this AnnotatorSelector to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AnswerFeedback + * Gets the default type url for AnnotatorSelector * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace AnswerFeedback { + namespace AnnotatorSelector { - /** CorrectnessLevel enum. */ - enum CorrectnessLevel { - CORRECTNESS_LEVEL_UNSPECIFIED = 0, - NOT_CORRECT = 1, - PARTIALLY_CORRECT = 2, - FULLY_CORRECT = 3 - } - } + /** Properties of a SummarizationConfig. */ + interface ISummarizationConfig { - /** Properties of an ArticleSuggestionData. */ - interface IArticleSuggestionData { + /** SummarizationConfig conversationProfile */ + conversationProfile?: (string|null); - /** ArticleSuggestionData title */ - title?: (string|null); + /** SummarizationConfig summarizationModel */ + summarizationModel?: (google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.SummarizationModel|keyof typeof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.SummarizationModel|null); + } - /** ArticleSuggestionData uri */ - uri?: (string|null); + /** Represents a SummarizationConfig. */ + class SummarizationConfig implements ISummarizationConfig { - /** ArticleSuggestionData confidenceScore */ - confidenceScore?: (number|null); + /** + * Constructs a new SummarizationConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.AnnotatorSelector.ISummarizationConfig); - /** ArticleSuggestionData metadata */ - metadata?: ({ [k: string]: string }|null); + /** SummarizationConfig conversationProfile. */ + public conversationProfile?: (string|null); - /** ArticleSuggestionData queryRecord */ - queryRecord?: (string|null); + /** SummarizationConfig summarizationModel. */ + public summarizationModel?: (google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.SummarizationModel|keyof typeof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.SummarizationModel|null); - /** ArticleSuggestionData source */ - source?: (string|null); - } + /** SummarizationConfig modelSource. */ + public modelSource?: ("conversationProfile"|"summarizationModel"); - /** Represents an ArticleSuggestionData. */ - class ArticleSuggestionData implements IArticleSuggestionData { + /** + * Creates a new SummarizationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SummarizationConfig instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.AnnotatorSelector.ISummarizationConfig): google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig; - /** - * Constructs a new ArticleSuggestionData. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IArticleSuggestionData); + /** + * Encodes the specified SummarizationConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.verify|verify} messages. + * @param message SummarizationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.AnnotatorSelector.ISummarizationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** ArticleSuggestionData title. */ - public title: string; + /** + * Encodes the specified SummarizationConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.verify|verify} messages. + * @param message SummarizationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.AnnotatorSelector.ISummarizationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** ArticleSuggestionData uri. */ - public uri: string; + /** + * Decodes a SummarizationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SummarizationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig; - /** ArticleSuggestionData confidenceScore. */ - public confidenceScore: number; + /** + * Decodes a SummarizationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SummarizationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig; - /** ArticleSuggestionData metadata. */ - public metadata: { [k: string]: string }; + /** + * Verifies a SummarizationConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** ArticleSuggestionData queryRecord. */ - public queryRecord: string; + /** + * Creates a SummarizationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SummarizationConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig; - /** ArticleSuggestionData source. */ - public source: string; + /** + * Creates a plain object from a SummarizationConfig message. Also converts values to other types if specified. + * @param message SummarizationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a new ArticleSuggestionData instance using the specified properties. - * @param [properties] Properties to set - * @returns ArticleSuggestionData instance - */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IArticleSuggestionData): google.cloud.contactcenterinsights.v1.ArticleSuggestionData; + /** + * Converts this SummarizationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Encodes the specified ArticleSuggestionData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ArticleSuggestionData.verify|verify} messages. - * @param message ArticleSuggestionData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.contactcenterinsights.v1.IArticleSuggestionData, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Gets the default type url for SummarizationConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Encodes the specified ArticleSuggestionData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ArticleSuggestionData.verify|verify} messages. - * @param message ArticleSuggestionData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IArticleSuggestionData, writer?: $protobuf.Writer): $protobuf.Writer; + namespace SummarizationConfig { + + /** SummarizationModel enum. */ + enum SummarizationModel { + SUMMARIZATION_MODEL_UNSPECIFIED = 0, + BASELINE_MODEL = 1, + BASELINE_MODEL_V2_0 = 2 + } + } - /** - * Decodes an ArticleSuggestionData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ArticleSuggestionData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ArticleSuggestionData; + /** Properties of a QaConfig. */ + interface IQaConfig { - /** - * Decodes an ArticleSuggestionData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ArticleSuggestionData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ArticleSuggestionData; + /** QaConfig scorecardList */ + scorecardList?: (google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.IScorecardList|null); + } - /** - * Verifies an ArticleSuggestionData message. - * @param message 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 QaConfig. */ + class QaConfig implements IQaConfig { - /** - * Creates an ArticleSuggestionData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ArticleSuggestionData - */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ArticleSuggestionData; + /** + * Constructs a new QaConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.AnnotatorSelector.IQaConfig); - /** - * Creates a plain object from an ArticleSuggestionData message. Also converts values to other types if specified. - * @param message ArticleSuggestionData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.contactcenterinsights.v1.ArticleSuggestionData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** QaConfig scorecardList. */ + public scorecardList?: (google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.IScorecardList|null); - /** - * Converts this ArticleSuggestionData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** QaConfig scorecardSource. */ + public scorecardSource?: "scorecardList"; - /** - * Gets the default type url for ArticleSuggestionData - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a new QaConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns QaConfig instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.AnnotatorSelector.IQaConfig): google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig; - /** Properties of a FaqAnswerData. */ - interface IFaqAnswerData { + /** + * Encodes the specified QaConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.verify|verify} messages. + * @param message QaConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.AnnotatorSelector.IQaConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** FaqAnswerData answer */ - answer?: (string|null); + /** + * Encodes the specified QaConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.verify|verify} messages. + * @param message QaConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.AnnotatorSelector.IQaConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** FaqAnswerData confidenceScore */ - confidenceScore?: (number|null); + /** + * Decodes a QaConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QaConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig; - /** FaqAnswerData question */ - question?: (string|null); + /** + * Decodes a QaConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QaConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig; - /** FaqAnswerData metadata */ - metadata?: ({ [k: string]: string }|null); + /** + * Verifies a QaConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** FaqAnswerData queryRecord */ - queryRecord?: (string|null); + /** + * Creates a QaConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QaConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig; - /** FaqAnswerData source */ - source?: (string|null); - } + /** + * Creates a plain object from a QaConfig message. Also converts values to other types if specified. + * @param message QaConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Represents a FaqAnswerData. */ - class FaqAnswerData implements IFaqAnswerData { + /** + * Converts this QaConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Constructs a new FaqAnswerData. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IFaqAnswerData); + /** + * Gets the default type url for QaConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** FaqAnswerData answer. */ - public answer: string; + namespace QaConfig { - /** FaqAnswerData confidenceScore. */ - public confidenceScore: number; + /** Properties of a ScorecardList. */ + interface IScorecardList { - /** FaqAnswerData question. */ - public question: string; + /** ScorecardList qaScorecardRevisions */ + qaScorecardRevisions?: (string[]|null); + } - /** FaqAnswerData metadata. */ - public metadata: { [k: string]: string }; + /** Represents a ScorecardList. */ + class ScorecardList implements IScorecardList { - /** FaqAnswerData queryRecord. */ - public queryRecord: string; + /** + * Constructs a new ScorecardList. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.IScorecardList); - /** FaqAnswerData source. */ - public source: string; + /** ScorecardList qaScorecardRevisions. */ + public qaScorecardRevisions: string[]; - /** - * Creates a new FaqAnswerData instance using the specified properties. - * @param [properties] Properties to set - * @returns FaqAnswerData instance - */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IFaqAnswerData): google.cloud.contactcenterinsights.v1.FaqAnswerData; + /** + * Creates a new ScorecardList instance using the specified properties. + * @param [properties] Properties to set + * @returns ScorecardList instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.IScorecardList): google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.ScorecardList; - /** - * Encodes the specified FaqAnswerData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.FaqAnswerData.verify|verify} messages. - * @param message FaqAnswerData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.contactcenterinsights.v1.IFaqAnswerData, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ScorecardList message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.ScorecardList.verify|verify} messages. + * @param message ScorecardList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.IScorecardList, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified FaqAnswerData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.FaqAnswerData.verify|verify} messages. - * @param message FaqAnswerData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IFaqAnswerData, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ScorecardList message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.ScorecardList.verify|verify} messages. + * @param message ScorecardList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.IScorecardList, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a FaqAnswerData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FaqAnswerData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.FaqAnswerData; + /** + * Decodes a ScorecardList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ScorecardList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.ScorecardList; - /** - * Decodes a FaqAnswerData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FaqAnswerData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.FaqAnswerData; + /** + * Decodes a ScorecardList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ScorecardList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.ScorecardList; - /** - * Verifies a FaqAnswerData message. - * @param message 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 ScorecardList message. + * @param message Plain 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 FaqAnswerData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FaqAnswerData - */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.FaqAnswerData; + /** + * Creates a ScorecardList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ScorecardList + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.ScorecardList; - /** - * Creates a plain object from a FaqAnswerData message. Also converts values to other types if specified. - * @param message FaqAnswerData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.contactcenterinsights.v1.FaqAnswerData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a ScorecardList message. Also converts values to other types if specified. + * @param message ScorecardList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.ScorecardList, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this FaqAnswerData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this ScorecardList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for FaqAnswerData - * @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 ScorecardList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } } - /** Properties of a SmartReplyData. */ - interface ISmartReplyData { + /** Properties of a QaQuestion. */ + interface IQaQuestion { + + /** QaQuestion name */ + name?: (string|null); + + /** QaQuestion abbreviation */ + abbreviation?: (string|null); + + /** QaQuestion createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** QaQuestion updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** QaQuestion questionBody */ + questionBody?: (string|null); - /** SmartReplyData reply */ - reply?: (string|null); + /** QaQuestion answerInstructions */ + answerInstructions?: (string|null); - /** SmartReplyData confidenceScore */ - confidenceScore?: (number|null); + /** QaQuestion answerChoices */ + answerChoices?: (google.cloud.contactcenterinsights.v1.QaQuestion.IAnswerChoice[]|null); - /** SmartReplyData metadata */ - metadata?: ({ [k: string]: string }|null); + /** QaQuestion tags */ + tags?: (string[]|null); - /** SmartReplyData queryRecord */ - queryRecord?: (string|null); + /** QaQuestion order */ + order?: (number|null); + + /** QaQuestion metrics */ + metrics?: (google.cloud.contactcenterinsights.v1.QaQuestion.IMetrics|null); + + /** QaQuestion tuningMetadata */ + tuningMetadata?: (google.cloud.contactcenterinsights.v1.QaQuestion.ITuningMetadata|null); } - /** Represents a SmartReplyData. */ - class SmartReplyData implements ISmartReplyData { + /** Represents a QaQuestion. */ + class QaQuestion implements IQaQuestion { /** - * Constructs a new SmartReplyData. + * Constructs a new QaQuestion. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.ISmartReplyData); + constructor(properties?: google.cloud.contactcenterinsights.v1.IQaQuestion); - /** SmartReplyData reply. */ - public reply: string; + /** QaQuestion name. */ + public name: string; - /** SmartReplyData confidenceScore. */ - public confidenceScore: number; + /** QaQuestion abbreviation. */ + public abbreviation: string; - /** SmartReplyData metadata. */ - public metadata: { [k: string]: string }; + /** QaQuestion createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** SmartReplyData queryRecord. */ - public queryRecord: string; + /** QaQuestion updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** QaQuestion questionBody. */ + public questionBody: string; + + /** QaQuestion answerInstructions. */ + public answerInstructions: string; + + /** QaQuestion answerChoices. */ + public answerChoices: google.cloud.contactcenterinsights.v1.QaQuestion.IAnswerChoice[]; + + /** QaQuestion tags. */ + public tags: string[]; + + /** QaQuestion order. */ + public order: number; + + /** QaQuestion metrics. */ + public metrics?: (google.cloud.contactcenterinsights.v1.QaQuestion.IMetrics|null); + + /** QaQuestion tuningMetadata. */ + public tuningMetadata?: (google.cloud.contactcenterinsights.v1.QaQuestion.ITuningMetadata|null); /** - * Creates a new SmartReplyData instance using the specified properties. + * Creates a new QaQuestion instance using the specified properties. * @param [properties] Properties to set - * @returns SmartReplyData instance + * @returns QaQuestion instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.ISmartReplyData): google.cloud.contactcenterinsights.v1.SmartReplyData; + public static create(properties?: google.cloud.contactcenterinsights.v1.IQaQuestion): google.cloud.contactcenterinsights.v1.QaQuestion; /** - * Encodes the specified SmartReplyData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SmartReplyData.verify|verify} messages. - * @param message SmartReplyData message or plain object to encode + * Encodes the specified QaQuestion message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaQuestion.verify|verify} messages. + * @param message QaQuestion message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.ISmartReplyData, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IQaQuestion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SmartReplyData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SmartReplyData.verify|verify} messages. - * @param message SmartReplyData message or plain object to encode + * Encodes the specified QaQuestion message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaQuestion.verify|verify} messages. + * @param message QaQuestion message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ISmartReplyData, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IQaQuestion, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SmartReplyData message from the specified reader or buffer. + * Decodes a QaQuestion message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SmartReplyData + * @returns QaQuestion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.SmartReplyData; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.QaQuestion; /** - * Decodes a SmartReplyData message from the specified reader or buffer, length delimited. + * Decodes a QaQuestion message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SmartReplyData + * @returns QaQuestion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.SmartReplyData; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.QaQuestion; /** - * Verifies a SmartReplyData message. + * Verifies a QaQuestion message. * @param message Plain 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 SmartReplyData message from a plain object. Also converts values to their respective internal types. + * Creates a QaQuestion message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SmartReplyData + * @returns QaQuestion */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.SmartReplyData; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.QaQuestion; /** - * Creates a plain object from a SmartReplyData message. Also converts values to other types if specified. - * @param message SmartReplyData + * Creates a plain object from a QaQuestion message. Also converts values to other types if specified. + * @param message QaQuestion * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.SmartReplyData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.QaQuestion, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SmartReplyData to JSON. + * Converts this QaQuestion to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SmartReplyData + * Gets the default type url for QaQuestion * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SmartComposeSuggestionData. */ - interface ISmartComposeSuggestionData { + namespace QaQuestion { - /** SmartComposeSuggestionData suggestion */ - suggestion?: (string|null); + /** Properties of an AnswerChoice. */ + interface IAnswerChoice { - /** SmartComposeSuggestionData confidenceScore */ - confidenceScore?: (number|null); + /** AnswerChoice strValue */ + strValue?: (string|null); - /** SmartComposeSuggestionData metadata */ - metadata?: ({ [k: string]: string }|null); + /** AnswerChoice numValue */ + numValue?: (number|null); - /** SmartComposeSuggestionData queryRecord */ - queryRecord?: (string|null); - } + /** AnswerChoice boolValue */ + boolValue?: (boolean|null); - /** Represents a SmartComposeSuggestionData. */ - class SmartComposeSuggestionData implements ISmartComposeSuggestionData { + /** AnswerChoice naValue */ + naValue?: (boolean|null); - /** - * Constructs a new SmartComposeSuggestionData. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.contactcenterinsights.v1.ISmartComposeSuggestionData); + /** AnswerChoice key */ + key?: (string|null); - /** SmartComposeSuggestionData suggestion. */ - public suggestion: string; + /** AnswerChoice score */ + score?: (number|null); + } - /** SmartComposeSuggestionData confidenceScore. */ - public confidenceScore: number; + /** Represents an AnswerChoice. */ + class AnswerChoice implements IAnswerChoice { - /** SmartComposeSuggestionData metadata. */ - public metadata: { [k: string]: string }; + /** + * Constructs a new AnswerChoice. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.QaQuestion.IAnswerChoice); - /** SmartComposeSuggestionData queryRecord. */ - public queryRecord: string; + /** AnswerChoice strValue. */ + public strValue?: (string|null); - /** - * Creates a new SmartComposeSuggestionData instance using the specified properties. - * @param [properties] Properties to set - * @returns SmartComposeSuggestionData instance - */ - public static create(properties?: google.cloud.contactcenterinsights.v1.ISmartComposeSuggestionData): google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData; + /** AnswerChoice numValue. */ + public numValue?: (number|null); - /** - * Encodes the specified SmartComposeSuggestionData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData.verify|verify} messages. - * @param message SmartComposeSuggestionData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.contactcenterinsights.v1.ISmartComposeSuggestionData, writer?: $protobuf.Writer): $protobuf.Writer; + /** AnswerChoice boolValue. */ + public boolValue?: (boolean|null); - /** - * Encodes the specified SmartComposeSuggestionData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData.verify|verify} messages. - * @param message SmartComposeSuggestionData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ISmartComposeSuggestionData, writer?: $protobuf.Writer): $protobuf.Writer; + /** AnswerChoice naValue. */ + public naValue?: (boolean|null); - /** - * Decodes a SmartComposeSuggestionData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SmartComposeSuggestionData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData; + /** AnswerChoice key. */ + public key: string; - /** - * Decodes a SmartComposeSuggestionData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SmartComposeSuggestionData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData; + /** AnswerChoice score. */ + public score?: (number|null); - /** - * Verifies a SmartComposeSuggestionData message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** AnswerChoice value. */ + public value?: ("strValue"|"numValue"|"boolValue"|"naValue"); - /** - * Creates a SmartComposeSuggestionData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SmartComposeSuggestionData - */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData; + /** AnswerChoice _score. */ + public _score?: "score"; - /** - * Creates a plain object from a SmartComposeSuggestionData message. Also converts values to other types if specified. - * @param message SmartComposeSuggestionData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a new AnswerChoice instance using the specified properties. + * @param [properties] Properties to set + * @returns AnswerChoice instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.QaQuestion.IAnswerChoice): google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice; + + /** + * Encodes the specified AnswerChoice message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice.verify|verify} messages. + * @param message AnswerChoice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.QaQuestion.IAnswerChoice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnswerChoice message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice.verify|verify} messages. + * @param message AnswerChoice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.QaQuestion.IAnswerChoice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnswerChoice message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnswerChoice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice; + + /** + * Decodes an AnswerChoice message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnswerChoice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice; + + /** + * Verifies an AnswerChoice message. + * @param message Plain 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 AnswerChoice message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnswerChoice + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice; + + /** + * Creates a plain object from an AnswerChoice message. Also converts values to other types if specified. + * @param message AnswerChoice + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnswerChoice to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnswerChoice + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Metrics. */ + interface IMetrics { + + /** Metrics accuracy */ + accuracy?: (number|null); + } + + /** Represents a Metrics. */ + class Metrics implements IMetrics { + + /** + * Constructs a new Metrics. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.QaQuestion.IMetrics); + + /** Metrics accuracy. */ + public accuracy: number; + + /** + * Creates a new Metrics instance using the specified properties. + * @param [properties] Properties to set + * @returns Metrics instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.QaQuestion.IMetrics): google.cloud.contactcenterinsights.v1.QaQuestion.Metrics; + + /** + * Encodes the specified Metrics message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaQuestion.Metrics.verify|verify} messages. + * @param message Metrics message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.QaQuestion.IMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Metrics message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaQuestion.Metrics.verify|verify} messages. + * @param message Metrics message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.QaQuestion.IMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Metrics message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Metrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.QaQuestion.Metrics; + + /** + * Decodes a Metrics message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Metrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.QaQuestion.Metrics; + + /** + * Verifies a Metrics message. + * @param message Plain 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 Metrics message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Metrics + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.QaQuestion.Metrics; + + /** + * Creates a plain object from a Metrics message. Also converts values to other types if specified. + * @param message Metrics + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.QaQuestion.Metrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Metrics to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Metrics + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Converts this SmartComposeSuggestionData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Properties of a TuningMetadata. */ + interface ITuningMetadata { - /** - * Gets the default type url for SmartComposeSuggestionData - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** TuningMetadata totalValidLabelCount */ + totalValidLabelCount?: (number|Long|string|null); - /** Properties of a DialogflowInteractionData. */ - interface IDialogflowInteractionData { + /** TuningMetadata datasetValidationWarnings */ + datasetValidationWarnings?: (google.cloud.contactcenterinsights.v1.DatasetValidationWarning[]|null); - /** DialogflowInteractionData dialogflowIntentId */ - dialogflowIntentId?: (string|null); + /** TuningMetadata tuningError */ + tuningError?: (string|null); + } - /** DialogflowInteractionData confidence */ - confidence?: (number|null); - } + /** Represents a TuningMetadata. */ + class TuningMetadata implements ITuningMetadata { - /** Represents a DialogflowInteractionData. */ - class DialogflowInteractionData implements IDialogflowInteractionData { + /** + * Constructs a new TuningMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.QaQuestion.ITuningMetadata); - /** - * Constructs a new DialogflowInteractionData. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IDialogflowInteractionData); + /** TuningMetadata totalValidLabelCount. */ + public totalValidLabelCount: (number|Long|string); - /** DialogflowInteractionData dialogflowIntentId. */ - public dialogflowIntentId: string; + /** TuningMetadata datasetValidationWarnings. */ + public datasetValidationWarnings: google.cloud.contactcenterinsights.v1.DatasetValidationWarning[]; - /** DialogflowInteractionData confidence. */ - public confidence: number; + /** TuningMetadata tuningError. */ + public tuningError: string; - /** - * Creates a new DialogflowInteractionData instance using the specified properties. - * @param [properties] Properties to set - * @returns DialogflowInteractionData instance - */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IDialogflowInteractionData): google.cloud.contactcenterinsights.v1.DialogflowInteractionData; + /** + * Creates a new TuningMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns TuningMetadata instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.QaQuestion.ITuningMetadata): google.cloud.contactcenterinsights.v1.QaQuestion.TuningMetadata; - /** - * Encodes the specified DialogflowInteractionData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DialogflowInteractionData.verify|verify} messages. - * @param message DialogflowInteractionData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.contactcenterinsights.v1.IDialogflowInteractionData, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified TuningMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaQuestion.TuningMetadata.verify|verify} messages. + * @param message TuningMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.QaQuestion.ITuningMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified DialogflowInteractionData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DialogflowInteractionData.verify|verify} messages. - * @param message DialogflowInteractionData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IDialogflowInteractionData, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified TuningMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaQuestion.TuningMetadata.verify|verify} messages. + * @param message TuningMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.QaQuestion.ITuningMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a DialogflowInteractionData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DialogflowInteractionData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.DialogflowInteractionData; + /** + * Decodes a TuningMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TuningMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.QaQuestion.TuningMetadata; - /** - * Decodes a DialogflowInteractionData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DialogflowInteractionData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.DialogflowInteractionData; + /** + * Decodes a TuningMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TuningMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.QaQuestion.TuningMetadata; - /** - * Verifies a DialogflowInteractionData message. - * @param message 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 TuningMetadata message. + * @param message Plain 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 DialogflowInteractionData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DialogflowInteractionData - */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.DialogflowInteractionData; + /** + * Creates a TuningMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TuningMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.QaQuestion.TuningMetadata; - /** - * Creates a plain object from a DialogflowInteractionData message. Also converts values to other types if specified. - * @param message DialogflowInteractionData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.contactcenterinsights.v1.DialogflowInteractionData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a TuningMetadata message. Also converts values to other types if specified. + * @param message TuningMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.QaQuestion.TuningMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this DialogflowInteractionData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this TuningMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for DialogflowInteractionData - * @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 TuningMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } - /** Properties of a ConversationSummarizationSuggestionData. */ - interface IConversationSummarizationSuggestionData { - - /** ConversationSummarizationSuggestionData text */ - text?: (string|null); + /** Properties of a QaScorecard. */ + interface IQaScorecard { - /** ConversationSummarizationSuggestionData textSections */ - textSections?: ({ [k: string]: string }|null); + /** QaScorecard name */ + name?: (string|null); - /** ConversationSummarizationSuggestionData confidence */ - confidence?: (number|null); + /** QaScorecard displayName */ + displayName?: (string|null); - /** ConversationSummarizationSuggestionData metadata */ - metadata?: ({ [k: string]: string }|null); + /** QaScorecard description */ + description?: (string|null); - /** ConversationSummarizationSuggestionData answerRecord */ - answerRecord?: (string|null); + /** QaScorecard createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** ConversationSummarizationSuggestionData conversationModel */ - conversationModel?: (string|null); + /** QaScorecard updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); } - /** Represents a ConversationSummarizationSuggestionData. */ - class ConversationSummarizationSuggestionData implements IConversationSummarizationSuggestionData { + /** Represents a QaScorecard. */ + class QaScorecard implements IQaScorecard { /** - * Constructs a new ConversationSummarizationSuggestionData. + * Constructs a new QaScorecard. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData); - - /** ConversationSummarizationSuggestionData text. */ - public text: string; + constructor(properties?: google.cloud.contactcenterinsights.v1.IQaScorecard); - /** ConversationSummarizationSuggestionData textSections. */ - public textSections: { [k: string]: string }; + /** QaScorecard name. */ + public name: string; - /** ConversationSummarizationSuggestionData confidence. */ - public confidence: number; + /** QaScorecard displayName. */ + public displayName: string; - /** ConversationSummarizationSuggestionData metadata. */ - public metadata: { [k: string]: string }; + /** QaScorecard description. */ + public description: string; - /** ConversationSummarizationSuggestionData answerRecord. */ - public answerRecord: string; + /** QaScorecard createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** ConversationSummarizationSuggestionData conversationModel. */ - public conversationModel: string; + /** QaScorecard updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new ConversationSummarizationSuggestionData instance using the specified properties. + * Creates a new QaScorecard instance using the specified properties. * @param [properties] Properties to set - * @returns ConversationSummarizationSuggestionData instance + * @returns QaScorecard instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData): google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData; + public static create(properties?: google.cloud.contactcenterinsights.v1.IQaScorecard): google.cloud.contactcenterinsights.v1.QaScorecard; /** - * Encodes the specified ConversationSummarizationSuggestionData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.verify|verify} messages. - * @param message ConversationSummarizationSuggestionData message or plain object to encode + * Encodes the specified QaScorecard message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaScorecard.verify|verify} messages. + * @param message QaScorecard message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IQaScorecard, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ConversationSummarizationSuggestionData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.verify|verify} messages. - * @param message ConversationSummarizationSuggestionData message or plain object to encode + * Encodes the specified QaScorecard message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaScorecard.verify|verify} messages. + * @param message QaScorecard message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IQaScorecard, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ConversationSummarizationSuggestionData message from the specified reader or buffer. + * Decodes a QaScorecard message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ConversationSummarizationSuggestionData + * @returns QaScorecard * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.QaScorecard; /** - * Decodes a ConversationSummarizationSuggestionData message from the specified reader or buffer, length delimited. + * Decodes a QaScorecard message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ConversationSummarizationSuggestionData + * @returns QaScorecard * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.QaScorecard; /** - * Verifies a ConversationSummarizationSuggestionData message. + * Verifies a QaScorecard message. * @param message Plain 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 ConversationSummarizationSuggestionData message from a plain object. Also converts values to their respective internal types. + * Creates a QaScorecard message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ConversationSummarizationSuggestionData + * @returns QaScorecard */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.QaScorecard; /** - * Creates a plain object from a ConversationSummarizationSuggestionData message. Also converts values to other types if specified. - * @param message ConversationSummarizationSuggestionData + * Creates a plain object from a QaScorecard message. Also converts values to other types if specified. + * @param message QaScorecard * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.QaScorecard, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ConversationSummarizationSuggestionData to JSON. + * Converts this QaScorecard to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ConversationSummarizationSuggestionData + * Gets the default type url for QaScorecard * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ConversationParticipant. */ - interface IConversationParticipant { + /** Properties of a QaScorecardRevision. */ + interface IQaScorecardRevision { - /** ConversationParticipant dialogflowParticipantName */ - dialogflowParticipantName?: (string|null); + /** QaScorecardRevision name */ + name?: (string|null); - /** ConversationParticipant userId */ - userId?: (string|null); + /** QaScorecardRevision snapshot */ + snapshot?: (google.cloud.contactcenterinsights.v1.IQaScorecard|null); - /** ConversationParticipant dialogflowParticipant */ - dialogflowParticipant?: (string|null); + /** QaScorecardRevision createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** ConversationParticipant obfuscatedExternalUserId */ - obfuscatedExternalUserId?: (string|null); + /** QaScorecardRevision alternateIds */ + alternateIds?: (string[]|null); - /** ConversationParticipant role */ - role?: (google.cloud.contactcenterinsights.v1.ConversationParticipant.Role|keyof typeof google.cloud.contactcenterinsights.v1.ConversationParticipant.Role|null); + /** QaScorecardRevision state */ + state?: (google.cloud.contactcenterinsights.v1.QaScorecardRevision.State|keyof typeof google.cloud.contactcenterinsights.v1.QaScorecardRevision.State|null); } - /** Represents a ConversationParticipant. */ - class ConversationParticipant implements IConversationParticipant { + /** Represents a QaScorecardRevision. */ + class QaScorecardRevision implements IQaScorecardRevision { /** - * Constructs a new ConversationParticipant. + * Constructs a new QaScorecardRevision. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IConversationParticipant); + constructor(properties?: google.cloud.contactcenterinsights.v1.IQaScorecardRevision); - /** ConversationParticipant dialogflowParticipantName. */ - public dialogflowParticipantName?: (string|null); - - /** ConversationParticipant userId. */ - public userId?: (string|null); + /** QaScorecardRevision name. */ + public name: string; - /** ConversationParticipant dialogflowParticipant. */ - public dialogflowParticipant: string; + /** QaScorecardRevision snapshot. */ + public snapshot?: (google.cloud.contactcenterinsights.v1.IQaScorecard|null); - /** ConversationParticipant obfuscatedExternalUserId. */ - public obfuscatedExternalUserId: string; + /** QaScorecardRevision createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** ConversationParticipant role. */ - public role: (google.cloud.contactcenterinsights.v1.ConversationParticipant.Role|keyof typeof google.cloud.contactcenterinsights.v1.ConversationParticipant.Role); + /** QaScorecardRevision alternateIds. */ + public alternateIds: string[]; - /** ConversationParticipant participant. */ - public participant?: ("dialogflowParticipantName"|"userId"); + /** QaScorecardRevision state. */ + public state: (google.cloud.contactcenterinsights.v1.QaScorecardRevision.State|keyof typeof google.cloud.contactcenterinsights.v1.QaScorecardRevision.State); /** - * Creates a new ConversationParticipant instance using the specified properties. + * Creates a new QaScorecardRevision instance using the specified properties. * @param [properties] Properties to set - * @returns ConversationParticipant instance + * @returns QaScorecardRevision instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IConversationParticipant): google.cloud.contactcenterinsights.v1.ConversationParticipant; + public static create(properties?: google.cloud.contactcenterinsights.v1.IQaScorecardRevision): google.cloud.contactcenterinsights.v1.QaScorecardRevision; /** - * Encodes the specified ConversationParticipant message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationParticipant.verify|verify} messages. - * @param message ConversationParticipant message or plain object to encode + * Encodes the specified QaScorecardRevision message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaScorecardRevision.verify|verify} messages. + * @param message QaScorecardRevision message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IConversationParticipant, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IQaScorecardRevision, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ConversationParticipant message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationParticipant.verify|verify} messages. - * @param message ConversationParticipant message or plain object to encode + * Encodes the specified QaScorecardRevision message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaScorecardRevision.verify|verify} messages. + * @param message QaScorecardRevision message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IConversationParticipant, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IQaScorecardRevision, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ConversationParticipant message from the specified reader or buffer. + * Decodes a QaScorecardRevision message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ConversationParticipant + * @returns QaScorecardRevision * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ConversationParticipant; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.QaScorecardRevision; /** - * Decodes a ConversationParticipant message from the specified reader or buffer, length delimited. + * Decodes a QaScorecardRevision message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ConversationParticipant + * @returns QaScorecardRevision * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ConversationParticipant; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.QaScorecardRevision; /** - * Verifies a ConversationParticipant message. + * Verifies a QaScorecardRevision message. * @param message Plain 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 ConversationParticipant message from a plain object. Also converts values to their respective internal types. + * Creates a QaScorecardRevision message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ConversationParticipant + * @returns QaScorecardRevision */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ConversationParticipant; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.QaScorecardRevision; /** - * Creates a plain object from a ConversationParticipant message. Also converts values to other types if specified. - * @param message ConversationParticipant + * Creates a plain object from a QaScorecardRevision message. Also converts values to other types if specified. + * @param message QaScorecardRevision * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.ConversationParticipant, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.QaScorecardRevision, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ConversationParticipant to JSON. + * Converts this QaScorecardRevision to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ConversationParticipant + * Gets the default type url for QaScorecardRevision * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace ConversationParticipant { + namespace QaScorecardRevision { - /** Role enum. */ - enum Role { - ROLE_UNSPECIFIED = 0, - HUMAN_AGENT = 1, - AUTOMATED_AGENT = 2, - END_USER = 3, - ANY_AGENT = 4 + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + EDITABLE = 12, + TRAINING = 2, + TRAINING_FAILED = 9, + READY = 11, + DELETING = 7, + TRAINING_CANCELLED = 14 } } - /** Properties of a View. */ - interface IView { + /** Properties of a QaAnswer. */ + interface IQaAnswer { - /** View name */ - name?: (string|null); + /** QaAnswer qaQuestion */ + qaQuestion?: (string|null); - /** View displayName */ - displayName?: (string|null); + /** QaAnswer conversation */ + conversation?: (string|null); - /** View createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** QaAnswer questionBody */ + questionBody?: (string|null); - /** View updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** QaAnswer answerValue */ + answerValue?: (google.cloud.contactcenterinsights.v1.QaAnswer.IAnswerValue|null); - /** View value */ - value?: (string|null); + /** QaAnswer tags */ + tags?: (string[]|null); + + /** QaAnswer answerSources */ + answerSources?: (google.cloud.contactcenterinsights.v1.QaAnswer.IAnswerSource[]|null); } - /** Represents a View. */ - class View implements IView { + /** Represents a QaAnswer. */ + class QaAnswer implements IQaAnswer { /** - * Constructs a new View. + * Constructs a new QaAnswer. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IView); + constructor(properties?: google.cloud.contactcenterinsights.v1.IQaAnswer); - /** View name. */ - public name: string; + /** QaAnswer qaQuestion. */ + public qaQuestion: string; - /** View displayName. */ - public displayName: string; + /** QaAnswer conversation. */ + public conversation: string; - /** View createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** QaAnswer questionBody. */ + public questionBody: string; - /** View updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** QaAnswer answerValue. */ + public answerValue?: (google.cloud.contactcenterinsights.v1.QaAnswer.IAnswerValue|null); - /** View value. */ - public value: string; + /** QaAnswer tags. */ + public tags: string[]; + + /** QaAnswer answerSources. */ + public answerSources: google.cloud.contactcenterinsights.v1.QaAnswer.IAnswerSource[]; /** - * Creates a new View instance using the specified properties. + * Creates a new QaAnswer instance using the specified properties. * @param [properties] Properties to set - * @returns View instance + * @returns QaAnswer instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IView): google.cloud.contactcenterinsights.v1.View; + public static create(properties?: google.cloud.contactcenterinsights.v1.IQaAnswer): google.cloud.contactcenterinsights.v1.QaAnswer; /** - * Encodes the specified View message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.View.verify|verify} messages. - * @param message View message or plain object to encode + * Encodes the specified QaAnswer message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaAnswer.verify|verify} messages. + * @param message QaAnswer message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IView, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IQaAnswer, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified View message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.View.verify|verify} messages. - * @param message View message or plain object to encode + * Encodes the specified QaAnswer message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaAnswer.verify|verify} messages. + * @param message QaAnswer message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IView, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IQaAnswer, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a View message from the specified reader or buffer. + * Decodes a QaAnswer message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns View + * @returns QaAnswer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.View; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.QaAnswer; /** - * Decodes a View message from the specified reader or buffer, length delimited. + * Decodes a QaAnswer message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns View + * @returns QaAnswer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.View; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.QaAnswer; /** - * Verifies a View message. + * Verifies a QaAnswer message. * @param message Plain 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 View message from a plain object. Also converts values to their respective internal types. + * Creates a QaAnswer message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns View + * @returns QaAnswer */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.View; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.QaAnswer; /** - * Creates a plain object from a View message. Also converts values to other types if specified. - * @param message View + * Creates a plain object from a QaAnswer message. Also converts values to other types if specified. + * @param message QaAnswer * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.View, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.QaAnswer, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this View to JSON. + * Converts this QaAnswer to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for View + * Gets the default type url for QaAnswer * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AnnotatorSelector. */ - interface IAnnotatorSelector { + namespace QaAnswer { - /** AnnotatorSelector runInterruptionAnnotator */ - runInterruptionAnnotator?: (boolean|null); + /** Properties of an AnswerValue. */ + interface IAnswerValue { - /** AnnotatorSelector runSilenceAnnotator */ - runSilenceAnnotator?: (boolean|null); + /** AnswerValue strValue */ + strValue?: (string|null); - /** AnnotatorSelector runPhraseMatcherAnnotator */ - runPhraseMatcherAnnotator?: (boolean|null); + /** AnswerValue numValue */ + numValue?: (number|null); - /** AnnotatorSelector phraseMatchers */ - phraseMatchers?: (string[]|null); + /** AnswerValue boolValue */ + boolValue?: (boolean|null); - /** AnnotatorSelector runSentimentAnnotator */ - runSentimentAnnotator?: (boolean|null); + /** AnswerValue naValue */ + naValue?: (boolean|null); - /** AnnotatorSelector runEntityAnnotator */ - runEntityAnnotator?: (boolean|null); + /** AnswerValue key */ + key?: (string|null); - /** AnnotatorSelector runIntentAnnotator */ - runIntentAnnotator?: (boolean|null); + /** AnswerValue score */ + score?: (number|null); - /** AnnotatorSelector runIssueModelAnnotator */ - runIssueModelAnnotator?: (boolean|null); + /** AnswerValue potentialScore */ + potentialScore?: (number|null); - /** AnnotatorSelector issueModels */ - issueModels?: (string[]|null); + /** AnswerValue normalizedScore */ + normalizedScore?: (number|null); + } + + /** Represents an AnswerValue. */ + class AnswerValue implements IAnswerValue { + + /** + * Constructs a new AnswerValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.QaAnswer.IAnswerValue); + + /** AnswerValue strValue. */ + public strValue?: (string|null); + + /** AnswerValue numValue. */ + public numValue?: (number|null); + + /** AnswerValue boolValue. */ + public boolValue?: (boolean|null); + + /** AnswerValue naValue. */ + public naValue?: (boolean|null); + + /** AnswerValue key. */ + public key: string; + + /** AnswerValue score. */ + public score?: (number|null); + + /** AnswerValue potentialScore. */ + public potentialScore?: (number|null); + + /** AnswerValue normalizedScore. */ + public normalizedScore?: (number|null); + + /** AnswerValue value. */ + public value?: ("strValue"|"numValue"|"boolValue"|"naValue"); + + /** AnswerValue _score. */ + public _score?: "score"; + + /** AnswerValue _potentialScore. */ + public _potentialScore?: "potentialScore"; + + /** AnswerValue _normalizedScore. */ + public _normalizedScore?: "normalizedScore"; + + /** + * Creates a new AnswerValue instance using the specified properties. + * @param [properties] Properties to set + * @returns AnswerValue instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.QaAnswer.IAnswerValue): google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue; + + /** + * Encodes the specified AnswerValue message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue.verify|verify} messages. + * @param message AnswerValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.QaAnswer.IAnswerValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnswerValue message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue.verify|verify} messages. + * @param message AnswerValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.QaAnswer.IAnswerValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnswerValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnswerValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue; + + /** + * Decodes an AnswerValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnswerValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue; + + /** + * Verifies an AnswerValue message. + * @param message Plain 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 AnswerValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnswerValue + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue; + + /** + * Creates a plain object from an AnswerValue message. Also converts values to other types if specified. + * @param message AnswerValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnswerValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnswerValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AnswerSource. */ + interface IAnswerSource { + + /** AnswerSource sourceType */ + sourceType?: (google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource.SourceType|keyof typeof google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource.SourceType|null); + + /** AnswerSource answerValue */ + answerValue?: (google.cloud.contactcenterinsights.v1.QaAnswer.IAnswerValue|null); + } + + /** Represents an AnswerSource. */ + class AnswerSource implements IAnswerSource { + + /** + * Constructs a new AnswerSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.QaAnswer.IAnswerSource); + + /** AnswerSource sourceType. */ + public sourceType: (google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource.SourceType|keyof typeof google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource.SourceType); + + /** AnswerSource answerValue. */ + public answerValue?: (google.cloud.contactcenterinsights.v1.QaAnswer.IAnswerValue|null); + + /** + * Creates a new AnswerSource instance using the specified properties. + * @param [properties] Properties to set + * @returns AnswerSource instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.QaAnswer.IAnswerSource): google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource; + + /** + * Encodes the specified AnswerSource message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource.verify|verify} messages. + * @param message AnswerSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.QaAnswer.IAnswerSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnswerSource message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource.verify|verify} messages. + * @param message AnswerSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.QaAnswer.IAnswerSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnswerSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnswerSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource; + + /** + * Decodes an AnswerSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnswerSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource; + + /** + * Verifies an AnswerSource message. + * @param message Plain 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 AnswerSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnswerSource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource; + + /** + * Creates a plain object from an AnswerSource message. Also converts values to other types if specified. + * @param message AnswerSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnswerSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnswerSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AnswerSource { + + /** SourceType enum. */ + enum SourceType { + SOURCE_TYPE_UNSPECIFIED = 0, + SYSTEM_GENERATED = 1, + MANUAL_EDIT = 2 + } + } + } + + /** Properties of a QaScorecardResult. */ + interface IQaScorecardResult { + + /** QaScorecardResult name */ + name?: (string|null); + + /** QaScorecardResult qaScorecardRevision */ + qaScorecardRevision?: (string|null); + + /** QaScorecardResult conversation */ + conversation?: (string|null); + + /** QaScorecardResult createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** QaScorecardResult agentId */ + agentId?: (string|null); + + /** QaScorecardResult qaAnswers */ + qaAnswers?: (google.cloud.contactcenterinsights.v1.IQaAnswer[]|null); + + /** QaScorecardResult score */ + score?: (number|null); + + /** QaScorecardResult potentialScore */ + potentialScore?: (number|null); - /** AnnotatorSelector runSummarizationAnnotator */ - runSummarizationAnnotator?: (boolean|null); + /** QaScorecardResult normalizedScore */ + normalizedScore?: (number|null); - /** AnnotatorSelector summarizationConfig */ - summarizationConfig?: (google.cloud.contactcenterinsights.v1.AnnotatorSelector.ISummarizationConfig|null); + /** QaScorecardResult qaTagResults */ + qaTagResults?: (google.cloud.contactcenterinsights.v1.QaScorecardResult.IQaTagResult[]|null); + + /** QaScorecardResult scoreSources */ + scoreSources?: (google.cloud.contactcenterinsights.v1.QaScorecardResult.IScoreSource[]|null); } - /** Represents an AnnotatorSelector. */ - class AnnotatorSelector implements IAnnotatorSelector { + /** Represents a QaScorecardResult. */ + class QaScorecardResult implements IQaScorecardResult { /** - * Constructs a new AnnotatorSelector. + * Constructs a new QaScorecardResult. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IAnnotatorSelector); + constructor(properties?: google.cloud.contactcenterinsights.v1.IQaScorecardResult); - /** AnnotatorSelector runInterruptionAnnotator. */ - public runInterruptionAnnotator: boolean; + /** QaScorecardResult name. */ + public name: string; - /** AnnotatorSelector runSilenceAnnotator. */ - public runSilenceAnnotator: boolean; + /** QaScorecardResult qaScorecardRevision. */ + public qaScorecardRevision: string; - /** AnnotatorSelector runPhraseMatcherAnnotator. */ - public runPhraseMatcherAnnotator: boolean; + /** QaScorecardResult conversation. */ + public conversation: string; - /** AnnotatorSelector phraseMatchers. */ - public phraseMatchers: string[]; + /** QaScorecardResult createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** AnnotatorSelector runSentimentAnnotator. */ - public runSentimentAnnotator: boolean; + /** QaScorecardResult agentId. */ + public agentId: string; - /** AnnotatorSelector runEntityAnnotator. */ - public runEntityAnnotator: boolean; + /** QaScorecardResult qaAnswers. */ + public qaAnswers: google.cloud.contactcenterinsights.v1.IQaAnswer[]; - /** AnnotatorSelector runIntentAnnotator. */ - public runIntentAnnotator: boolean; + /** QaScorecardResult score. */ + public score?: (number|null); - /** AnnotatorSelector runIssueModelAnnotator. */ - public runIssueModelAnnotator: boolean; + /** QaScorecardResult potentialScore. */ + public potentialScore?: (number|null); - /** AnnotatorSelector issueModels. */ - public issueModels: string[]; + /** QaScorecardResult normalizedScore. */ + public normalizedScore?: (number|null); - /** AnnotatorSelector runSummarizationAnnotator. */ - public runSummarizationAnnotator: boolean; + /** QaScorecardResult qaTagResults. */ + public qaTagResults: google.cloud.contactcenterinsights.v1.QaScorecardResult.IQaTagResult[]; - /** AnnotatorSelector summarizationConfig. */ - public summarizationConfig?: (google.cloud.contactcenterinsights.v1.AnnotatorSelector.ISummarizationConfig|null); + /** QaScorecardResult scoreSources. */ + public scoreSources: google.cloud.contactcenterinsights.v1.QaScorecardResult.IScoreSource[]; + + /** QaScorecardResult _score. */ + public _score?: "score"; + + /** QaScorecardResult _potentialScore. */ + public _potentialScore?: "potentialScore"; + + /** QaScorecardResult _normalizedScore. */ + public _normalizedScore?: "normalizedScore"; /** - * Creates a new AnnotatorSelector instance using the specified properties. + * Creates a new QaScorecardResult instance using the specified properties. * @param [properties] Properties to set - * @returns AnnotatorSelector instance + * @returns QaScorecardResult instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IAnnotatorSelector): google.cloud.contactcenterinsights.v1.AnnotatorSelector; + public static create(properties?: google.cloud.contactcenterinsights.v1.IQaScorecardResult): google.cloud.contactcenterinsights.v1.QaScorecardResult; /** - * Encodes the specified AnnotatorSelector message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotatorSelector.verify|verify} messages. - * @param message AnnotatorSelector message or plain object to encode + * Encodes the specified QaScorecardResult message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaScorecardResult.verify|verify} messages. + * @param message QaScorecardResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IAnnotatorSelector, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IQaScorecardResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AnnotatorSelector message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotatorSelector.verify|verify} messages. - * @param message AnnotatorSelector message or plain object to encode + * Encodes the specified QaScorecardResult message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaScorecardResult.verify|verify} messages. + * @param message QaScorecardResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IAnnotatorSelector, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IQaScorecardResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AnnotatorSelector message from the specified reader or buffer. + * Decodes a QaScorecardResult message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AnnotatorSelector + * @returns QaScorecardResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.AnnotatorSelector; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.QaScorecardResult; /** - * Decodes an AnnotatorSelector message from the specified reader or buffer, length delimited. + * Decodes a QaScorecardResult message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AnnotatorSelector + * @returns QaScorecardResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.AnnotatorSelector; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.QaScorecardResult; /** - * Verifies an AnnotatorSelector message. + * Verifies a QaScorecardResult message. * @param message Plain 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 AnnotatorSelector message from a plain object. Also converts values to their respective internal types. + * Creates a QaScorecardResult message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AnnotatorSelector + * @returns QaScorecardResult */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.AnnotatorSelector; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.QaScorecardResult; /** - * Creates a plain object from an AnnotatorSelector message. Also converts values to other types if specified. - * @param message AnnotatorSelector + * Creates a plain object from a QaScorecardResult message. Also converts values to other types if specified. + * @param message QaScorecardResult * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.AnnotatorSelector, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.QaScorecardResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AnnotatorSelector to JSON. + * Converts this QaScorecardResult to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AnnotatorSelector + * Gets the default type url for QaScorecardResult * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace AnnotatorSelector { + namespace QaScorecardResult { - /** Properties of a SummarizationConfig. */ - interface ISummarizationConfig { + /** Properties of a QaTagResult. */ + interface IQaTagResult { - /** SummarizationConfig conversationProfile */ - conversationProfile?: (string|null); + /** QaTagResult tag */ + tag?: (string|null); - /** SummarizationConfig summarizationModel */ - summarizationModel?: (google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.SummarizationModel|keyof typeof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.SummarizationModel|null); + /** QaTagResult score */ + score?: (number|null); + + /** QaTagResult potentialScore */ + potentialScore?: (number|null); + + /** QaTagResult normalizedScore */ + normalizedScore?: (number|null); } - /** Represents a SummarizationConfig. */ - class SummarizationConfig implements ISummarizationConfig { + /** Represents a QaTagResult. */ + class QaTagResult implements IQaTagResult { /** - * Constructs a new SummarizationConfig. + * Constructs a new QaTagResult. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.AnnotatorSelector.ISummarizationConfig); + constructor(properties?: google.cloud.contactcenterinsights.v1.QaScorecardResult.IQaTagResult); - /** SummarizationConfig conversationProfile. */ - public conversationProfile?: (string|null); + /** QaTagResult tag. */ + public tag: string; - /** SummarizationConfig summarizationModel. */ - public summarizationModel?: (google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.SummarizationModel|keyof typeof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.SummarizationModel|null); + /** QaTagResult score. */ + public score?: (number|null); - /** SummarizationConfig modelSource. */ - public modelSource?: ("conversationProfile"|"summarizationModel"); + /** QaTagResult potentialScore. */ + public potentialScore?: (number|null); + + /** QaTagResult normalizedScore. */ + public normalizedScore?: (number|null); + + /** QaTagResult _score. */ + public _score?: "score"; + + /** QaTagResult _potentialScore. */ + public _potentialScore?: "potentialScore"; + + /** QaTagResult _normalizedScore. */ + public _normalizedScore?: "normalizedScore"; /** - * Creates a new SummarizationConfig instance using the specified properties. + * Creates a new QaTagResult instance using the specified properties. * @param [properties] Properties to set - * @returns SummarizationConfig instance + * @returns QaTagResult instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.AnnotatorSelector.ISummarizationConfig): google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig; + public static create(properties?: google.cloud.contactcenterinsights.v1.QaScorecardResult.IQaTagResult): google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult; /** - * Encodes the specified SummarizationConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.verify|verify} messages. - * @param message SummarizationConfig message or plain object to encode + * Encodes the specified QaTagResult message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult.verify|verify} messages. + * @param message QaTagResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.AnnotatorSelector.ISummarizationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.QaScorecardResult.IQaTagResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SummarizationConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.verify|verify} messages. - * @param message SummarizationConfig message or plain object to encode + * Encodes the specified QaTagResult message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult.verify|verify} messages. + * @param message QaTagResult message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.AnnotatorSelector.ISummarizationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.QaScorecardResult.IQaTagResult, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SummarizationConfig message from the specified reader or buffer. + * Decodes a QaTagResult message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SummarizationConfig + * @returns QaTagResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult; /** - * Decodes a SummarizationConfig message from the specified reader or buffer, length delimited. + * Decodes a QaTagResult message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SummarizationConfig + * @returns QaTagResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult; /** - * Verifies a SummarizationConfig message. + * Verifies a QaTagResult message. * @param message Plain 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 SummarizationConfig message from a plain object. Also converts values to their respective internal types. + * Creates a QaTagResult message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SummarizationConfig + * @returns QaTagResult */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult; /** - * Creates a plain object from a SummarizationConfig message. Also converts values to other types if specified. - * @param message SummarizationConfig + * Creates a plain object from a QaTagResult message. Also converts values to other types if specified. + * @param message QaTagResult * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SummarizationConfig to JSON. + * Converts this QaTagResult to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SummarizationConfig + * Gets the default type url for QaTagResult * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace SummarizationConfig { + /** Properties of a ScoreSource. */ + interface IScoreSource { - /** SummarizationModel enum. */ - enum SummarizationModel { - SUMMARIZATION_MODEL_UNSPECIFIED = 0, - BASELINE_MODEL = 1, - BASELINE_MODEL_V2_0 = 2 + /** ScoreSource sourceType */ + sourceType?: (google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource.SourceType|keyof typeof google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource.SourceType|null); + + /** ScoreSource score */ + score?: (number|null); + + /** ScoreSource potentialScore */ + potentialScore?: (number|null); + + /** ScoreSource normalizedScore */ + normalizedScore?: (number|null); + + /** ScoreSource qaTagResults */ + qaTagResults?: (google.cloud.contactcenterinsights.v1.QaScorecardResult.IQaTagResult[]|null); + } + + /** Represents a ScoreSource. */ + class ScoreSource implements IScoreSource { + + /** + * Constructs a new ScoreSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.QaScorecardResult.IScoreSource); + + /** ScoreSource sourceType. */ + public sourceType: (google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource.SourceType|keyof typeof google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource.SourceType); + + /** ScoreSource score. */ + public score?: (number|null); + + /** ScoreSource potentialScore. */ + public potentialScore?: (number|null); + + /** ScoreSource normalizedScore. */ + public normalizedScore?: (number|null); + + /** ScoreSource qaTagResults. */ + public qaTagResults: google.cloud.contactcenterinsights.v1.QaScorecardResult.IQaTagResult[]; + + /** ScoreSource _score. */ + public _score?: "score"; + + /** ScoreSource _potentialScore. */ + public _potentialScore?: "potentialScore"; + + /** ScoreSource _normalizedScore. */ + public _normalizedScore?: "normalizedScore"; + + /** + * Creates a new ScoreSource instance using the specified properties. + * @param [properties] Properties to set + * @returns ScoreSource instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.QaScorecardResult.IScoreSource): google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource; + + /** + * Encodes the specified ScoreSource message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource.verify|verify} messages. + * @param message ScoreSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.QaScorecardResult.IScoreSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ScoreSource message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource.verify|verify} messages. + * @param message ScoreSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.QaScorecardResult.IScoreSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ScoreSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ScoreSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource; + + /** + * Decodes a ScoreSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ScoreSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource; + + /** + * Verifies a ScoreSource message. + * @param message Plain 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 ScoreSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ScoreSource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource; + + /** + * Creates a plain object from a ScoreSource message. Also converts values to other types if specified. + * @param message ScoreSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ScoreSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ScoreSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ScoreSource { + + /** SourceType enum. */ + enum SourceType { + SOURCE_TYPE_UNSPECIFIED = 0, + SYSTEM_GENERATED_ONLY = 1, + INCLUDES_MANUAL_EDITS = 2 } } } @@ -24368,4 +33847,111 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } } + + /** Namespace type. */ + namespace type { + + /** Properties of an Interval. */ + interface IInterval { + + /** Interval startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** Interval endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an Interval. */ + class Interval implements IInterval { + + /** + * Constructs a new Interval. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.IInterval); + + /** Interval startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** Interval endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new Interval instance using the specified properties. + * @param [properties] Properties to set + * @returns Interval instance + */ + public static create(properties?: google.type.IInterval): google.type.Interval; + + /** + * Encodes the specified Interval message. Does not implicitly {@link google.type.Interval.verify|verify} messages. + * @param message Interval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.IInterval, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Interval message, length delimited. Does not implicitly {@link google.type.Interval.verify|verify} messages. + * @param message Interval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.IInterval, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Interval message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Interval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Interval; + + /** + * Decodes an Interval message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Interval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Interval; + + /** + * Verifies an Interval message. + * @param message Plain 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 Interval message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Interval + */ + public static fromObject(object: { [k: string]: any }): google.type.Interval; + + /** + * Creates a plain object from an Interval message. Also converts values to other types if specified. + * @param message Interval + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.Interval, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Interval to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Interval + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } } diff --git a/packages/google-cloud-contactcenterinsights/protos/protos.js b/packages/google-cloud-contactcenterinsights/protos/protos.js index b0ea8521112..a8c4bab71b1 100644 --- a/packages/google-cloud-contactcenterinsights/protos/protos.js +++ b/packages/google-cloud-contactcenterinsights/protos/protos.js @@ -1286,6 +1286,171 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|createAnalysisRule}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef CreateAnalysisRuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.AnalysisRule} [response] AnalysisRule + */ + + /** + * Calls CreateAnalysisRule. + * @function createAnalysisRule + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.ICreateAnalysisRuleRequest} request CreateAnalysisRuleRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateAnalysisRuleCallback} callback Node-style callback called with the error, if any, and AnalysisRule + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.createAnalysisRule = function createAnalysisRule(request, callback) { + return this.rpcCall(createAnalysisRule, $root.google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest, $root.google.cloud.contactcenterinsights.v1.AnalysisRule, request, callback); + }, "name", { value: "CreateAnalysisRule" }); + + /** + * Calls CreateAnalysisRule. + * @function createAnalysisRule + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.ICreateAnalysisRuleRequest} request CreateAnalysisRuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|getAnalysisRule}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef GetAnalysisRuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.AnalysisRule} [response] AnalysisRule + */ + + /** + * Calls GetAnalysisRule. + * @function getAnalysisRule + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IGetAnalysisRuleRequest} request GetAnalysisRuleRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetAnalysisRuleCallback} callback Node-style callback called with the error, if any, and AnalysisRule + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.getAnalysisRule = function getAnalysisRule(request, callback) { + return this.rpcCall(getAnalysisRule, $root.google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest, $root.google.cloud.contactcenterinsights.v1.AnalysisRule, request, callback); + }, "name", { value: "GetAnalysisRule" }); + + /** + * Calls GetAnalysisRule. + * @function getAnalysisRule + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IGetAnalysisRuleRequest} request GetAnalysisRuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|listAnalysisRules}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef ListAnalysisRulesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.ListAnalysisRulesResponse} [response] ListAnalysisRulesResponse + */ + + /** + * Calls ListAnalysisRules. + * @function listAnalysisRules + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IListAnalysisRulesRequest} request ListAnalysisRulesRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListAnalysisRulesCallback} callback Node-style callback called with the error, if any, and ListAnalysisRulesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.listAnalysisRules = function listAnalysisRules(request, callback) { + return this.rpcCall(listAnalysisRules, $root.google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest, $root.google.cloud.contactcenterinsights.v1.ListAnalysisRulesResponse, request, callback); + }, "name", { value: "ListAnalysisRules" }); + + /** + * Calls ListAnalysisRules. + * @function listAnalysisRules + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IListAnalysisRulesRequest} request ListAnalysisRulesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|updateAnalysisRule}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef UpdateAnalysisRuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.AnalysisRule} [response] AnalysisRule + */ + + /** + * Calls UpdateAnalysisRule. + * @function updateAnalysisRule + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IUpdateAnalysisRuleRequest} request UpdateAnalysisRuleRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateAnalysisRuleCallback} callback Node-style callback called with the error, if any, and AnalysisRule + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.updateAnalysisRule = function updateAnalysisRule(request, callback) { + return this.rpcCall(updateAnalysisRule, $root.google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest, $root.google.cloud.contactcenterinsights.v1.AnalysisRule, request, callback); + }, "name", { value: "UpdateAnalysisRule" }); + + /** + * Calls UpdateAnalysisRule. + * @function updateAnalysisRule + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IUpdateAnalysisRuleRequest} request UpdateAnalysisRuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|deleteAnalysisRule}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef DeleteAnalysisRuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteAnalysisRule. + * @function deleteAnalysisRule + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IDeleteAnalysisRuleRequest} request DeleteAnalysisRuleRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteAnalysisRuleCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.deleteAnalysisRule = function deleteAnalysisRule(request, callback) { + return this.rpcCall(deleteAnalysisRule, $root.google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteAnalysisRule" }); + + /** + * Calls DeleteAnalysisRule. + * @function deleteAnalysisRule + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IDeleteAnalysisRuleRequest} request DeleteAnalysisRuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|getEncryptionSpec}. * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights @@ -1517,537 +1682,992 @@ * @variation 2 */ - return ContactCenterInsights; - })(); + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|queryMetrics}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef QueryMetricsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - /** - * ConversationView enum. - * @name google.cloud.contactcenterinsights.v1.ConversationView - * @enum {number} - * @property {number} CONVERSATION_VIEW_UNSPECIFIED=0 CONVERSATION_VIEW_UNSPECIFIED value - * @property {number} FULL=2 FULL value - * @property {number} BASIC=1 BASIC value - */ - v1.ConversationView = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CONVERSATION_VIEW_UNSPECIFIED"] = 0; - values[valuesById[2] = "FULL"] = 2; - values[valuesById[1] = "BASIC"] = 1; - return values; - })(); + /** + * Calls QueryMetrics. + * @function queryMetrics + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IQueryMetricsRequest} request QueryMetricsRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.QueryMetricsCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.queryMetrics = function queryMetrics(request, callback) { + return this.rpcCall(queryMetrics, $root.google.cloud.contactcenterinsights.v1.QueryMetricsRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "QueryMetrics" }); - v1.CalculateStatsRequest = (function() { + /** + * Calls QueryMetrics. + * @function queryMetrics + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IQueryMetricsRequest} request QueryMetricsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ /** - * Properties of a CalculateStatsRequest. - * @memberof google.cloud.contactcenterinsights.v1 - * @interface ICalculateStatsRequest - * @property {string|null} [location] CalculateStatsRequest location - * @property {string|null} [filter] CalculateStatsRequest filter + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|createQaQuestion}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef CreateQaQuestionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.QaQuestion} [response] QaQuestion */ /** - * Constructs a new CalculateStatsRequest. - * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a CalculateStatsRequest. - * @implements ICalculateStatsRequest - * @constructor - * @param {google.cloud.contactcenterinsights.v1.ICalculateStatsRequest=} [properties] Properties to set + * Calls CreateQaQuestion. + * @function createQaQuestion + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.ICreateQaQuestionRequest} request CreateQaQuestionRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateQaQuestionCallback} callback Node-style callback called with the error, if any, and QaQuestion + * @returns {undefined} + * @variation 1 */ - function CalculateStatsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Object.defineProperty(ContactCenterInsights.prototype.createQaQuestion = function createQaQuestion(request, callback) { + return this.rpcCall(createQaQuestion, $root.google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest, $root.google.cloud.contactcenterinsights.v1.QaQuestion, request, callback); + }, "name", { value: "CreateQaQuestion" }); /** - * CalculateStatsRequest location. - * @member {string} location - * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsRequest + * Calls CreateQaQuestion. + * @function createQaQuestion + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights * @instance + * @param {google.cloud.contactcenterinsights.v1.ICreateQaQuestionRequest} request CreateQaQuestionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CalculateStatsRequest.prototype.location = ""; /** - * CalculateStatsRequest filter. - * @member {string} filter - * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsRequest + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|getQaQuestion}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef GetQaQuestionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.QaQuestion} [response] QaQuestion + */ + + /** + * Calls GetQaQuestion. + * @function getQaQuestion + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights * @instance + * @param {google.cloud.contactcenterinsights.v1.IGetQaQuestionRequest} request GetQaQuestionRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetQaQuestionCallback} callback Node-style callback called with the error, if any, and QaQuestion + * @returns {undefined} + * @variation 1 */ - CalculateStatsRequest.prototype.filter = ""; + Object.defineProperty(ContactCenterInsights.prototype.getQaQuestion = function getQaQuestion(request, callback) { + return this.rpcCall(getQaQuestion, $root.google.cloud.contactcenterinsights.v1.GetQaQuestionRequest, $root.google.cloud.contactcenterinsights.v1.QaQuestion, request, callback); + }, "name", { value: "GetQaQuestion" }); /** - * Creates a new CalculateStatsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsRequest - * @static - * @param {google.cloud.contactcenterinsights.v1.ICalculateStatsRequest=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.CalculateStatsRequest} CalculateStatsRequest instance + * Calls GetQaQuestion. + * @function getQaQuestion + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IGetQaQuestionRequest} request GetQaQuestionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CalculateStatsRequest.create = function create(properties) { - return new CalculateStatsRequest(properties); - }; /** - * Encodes the specified CalculateStatsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateStatsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsRequest - * @static - * @param {google.cloud.contactcenterinsights.v1.ICalculateStatsRequest} message CalculateStatsRequest 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.contactcenterinsights.v1.ContactCenterInsights|updateQaQuestion}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef UpdateQaQuestionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.QaQuestion} [response] QaQuestion */ - CalculateStatsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.location); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); - return writer; - }; /** - * Encodes the specified CalculateStatsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateStatsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsRequest - * @static - * @param {google.cloud.contactcenterinsights.v1.ICalculateStatsRequest} message CalculateStatsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls UpdateQaQuestion. + * @function updateQaQuestion + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IUpdateQaQuestionRequest} request UpdateQaQuestionRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateQaQuestionCallback} callback Node-style callback called with the error, if any, and QaQuestion + * @returns {undefined} + * @variation 1 */ - CalculateStatsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(ContactCenterInsights.prototype.updateQaQuestion = function updateQaQuestion(request, callback) { + return this.rpcCall(updateQaQuestion, $root.google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest, $root.google.cloud.contactcenterinsights.v1.QaQuestion, request, callback); + }, "name", { value: "UpdateQaQuestion" }); /** - * Decodes a CalculateStatsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.CalculateStatsRequest} CalculateStatsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdateQaQuestion. + * @function updateQaQuestion + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IUpdateQaQuestionRequest} request UpdateQaQuestionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CalculateStatsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.CalculateStatsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.location = reader.string(); - break; - } - case 2: { - message.filter = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a CalculateStatsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.CalculateStatsRequest} CalculateStatsRequest - * @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.contactcenterinsights.v1.ContactCenterInsights|deleteQaQuestion}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef DeleteQaQuestionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty */ - CalculateStatsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a CalculateStatsRequest message. - * @function verify - * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls DeleteQaQuestion. + * @function deleteQaQuestion + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IDeleteQaQuestionRequest} request DeleteQaQuestionRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteQaQuestionCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 */ - CalculateStatsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - return null; - }; + Object.defineProperty(ContactCenterInsights.prototype.deleteQaQuestion = function deleteQaQuestion(request, callback) { + return this.rpcCall(deleteQaQuestion, $root.google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteQaQuestion" }); /** - * Creates a CalculateStatsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.CalculateStatsRequest} CalculateStatsRequest + * Calls DeleteQaQuestion. + * @function deleteQaQuestion + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IDeleteQaQuestionRequest} request DeleteQaQuestionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CalculateStatsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.CalculateStatsRequest) - return object; - var message = new $root.google.cloud.contactcenterinsights.v1.CalculateStatsRequest(); - if (object.location != null) - message.location = String(object.location); - if (object.filter != null) - message.filter = String(object.filter); - return message; - }; /** - * Creates a plain object from a CalculateStatsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsRequest - * @static - * @param {google.cloud.contactcenterinsights.v1.CalculateStatsRequest} message CalculateStatsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|listQaQuestions}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef ListQaQuestionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.ListQaQuestionsResponse} [response] ListQaQuestionsResponse */ - CalculateStatsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.location = ""; - object.filter = ""; - } - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - return object; - }; /** - * Converts this CalculateStatsRequest to JSON. - * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsRequest + * Calls ListQaQuestions. + * @function listQaQuestions + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights * @instance - * @returns {Object.} JSON object + * @param {google.cloud.contactcenterinsights.v1.IListQaQuestionsRequest} request ListQaQuestionsRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListQaQuestionsCallback} callback Node-style callback called with the error, if any, and ListQaQuestionsResponse + * @returns {undefined} + * @variation 1 */ - CalculateStatsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(ContactCenterInsights.prototype.listQaQuestions = function listQaQuestions(request, callback) { + return this.rpcCall(listQaQuestions, $root.google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest, $root.google.cloud.contactcenterinsights.v1.ListQaQuestionsResponse, request, callback); + }, "name", { value: "ListQaQuestions" }); /** - * Gets the default type url for CalculateStatsRequest - * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Calls ListQaQuestions. + * @function listQaQuestions + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IListQaQuestionsRequest} request ListQaQuestionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CalculateStatsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.CalculateStatsRequest"; - }; - return CalculateStatsRequest; - })(); + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|createQaScorecard}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef CreateQaScorecardCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.QaScorecard} [response] QaScorecard + */ - v1.CalculateStatsResponse = (function() { + /** + * Calls CreateQaScorecard. + * @function createQaScorecard + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.ICreateQaScorecardRequest} request CreateQaScorecardRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateQaScorecardCallback} callback Node-style callback called with the error, if any, and QaScorecard + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.createQaScorecard = function createQaScorecard(request, callback) { + return this.rpcCall(createQaScorecard, $root.google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest, $root.google.cloud.contactcenterinsights.v1.QaScorecard, request, callback); + }, "name", { value: "CreateQaScorecard" }); /** - * Properties of a CalculateStatsResponse. - * @memberof google.cloud.contactcenterinsights.v1 - * @interface ICalculateStatsResponse - * @property {google.protobuf.IDuration|null} [averageDuration] CalculateStatsResponse averageDuration - * @property {number|null} [averageTurnCount] CalculateStatsResponse averageTurnCount - * @property {number|null} [conversationCount] CalculateStatsResponse conversationCount - * @property {Object.|null} [smartHighlighterMatches] CalculateStatsResponse smartHighlighterMatches - * @property {Object.|null} [customHighlighterMatches] CalculateStatsResponse customHighlighterMatches - * @property {Object.|null} [issueMatches] CalculateStatsResponse issueMatches - * @property {Object.|null} [issueMatchesStats] CalculateStatsResponse issueMatchesStats - * @property {google.cloud.contactcenterinsights.v1.CalculateStatsResponse.ITimeSeries|null} [conversationCountTimeSeries] CalculateStatsResponse conversationCountTimeSeries + * Calls CreateQaScorecard. + * @function createQaScorecard + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.ICreateQaScorecardRequest} request CreateQaScorecardRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new CalculateStatsResponse. - * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a CalculateStatsResponse. - * @implements ICalculateStatsResponse - * @constructor - * @param {google.cloud.contactcenterinsights.v1.ICalculateStatsResponse=} [properties] Properties to set + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|getQaScorecard}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef GetQaScorecardCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.QaScorecard} [response] QaScorecard */ - function CalculateStatsResponse(properties) { - this.smartHighlighterMatches = {}; - this.customHighlighterMatches = {}; - this.issueMatches = {}; - this.issueMatchesStats = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } /** - * CalculateStatsResponse averageDuration. - * @member {google.protobuf.IDuration|null|undefined} averageDuration - * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * Calls GetQaScorecard. + * @function getQaScorecard + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights * @instance + * @param {google.cloud.contactcenterinsights.v1.IGetQaScorecardRequest} request GetQaScorecardRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetQaScorecardCallback} callback Node-style callback called with the error, if any, and QaScorecard + * @returns {undefined} + * @variation 1 */ - CalculateStatsResponse.prototype.averageDuration = null; + Object.defineProperty(ContactCenterInsights.prototype.getQaScorecard = function getQaScorecard(request, callback) { + return this.rpcCall(getQaScorecard, $root.google.cloud.contactcenterinsights.v1.GetQaScorecardRequest, $root.google.cloud.contactcenterinsights.v1.QaScorecard, request, callback); + }, "name", { value: "GetQaScorecard" }); /** - * CalculateStatsResponse averageTurnCount. - * @member {number} averageTurnCount - * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * Calls GetQaScorecard. + * @function getQaScorecard + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights * @instance + * @param {google.cloud.contactcenterinsights.v1.IGetQaScorecardRequest} request GetQaScorecardRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CalculateStatsResponse.prototype.averageTurnCount = 0; /** - * CalculateStatsResponse conversationCount. - * @member {number} conversationCount - * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|updateQaScorecard}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef UpdateQaScorecardCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.QaScorecard} [response] QaScorecard + */ + + /** + * Calls UpdateQaScorecard. + * @function updateQaScorecard + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights * @instance + * @param {google.cloud.contactcenterinsights.v1.IUpdateQaScorecardRequest} request UpdateQaScorecardRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateQaScorecardCallback} callback Node-style callback called with the error, if any, and QaScorecard + * @returns {undefined} + * @variation 1 */ - CalculateStatsResponse.prototype.conversationCount = 0; + Object.defineProperty(ContactCenterInsights.prototype.updateQaScorecard = function updateQaScorecard(request, callback) { + return this.rpcCall(updateQaScorecard, $root.google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest, $root.google.cloud.contactcenterinsights.v1.QaScorecard, request, callback); + }, "name", { value: "UpdateQaScorecard" }); /** - * CalculateStatsResponse smartHighlighterMatches. - * @member {Object.} smartHighlighterMatches - * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * Calls UpdateQaScorecard. + * @function updateQaScorecard + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights * @instance + * @param {google.cloud.contactcenterinsights.v1.IUpdateQaScorecardRequest} request UpdateQaScorecardRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CalculateStatsResponse.prototype.smartHighlighterMatches = $util.emptyObject; /** - * CalculateStatsResponse customHighlighterMatches. - * @member {Object.} customHighlighterMatches - * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|deleteQaScorecard}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef DeleteQaScorecardCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteQaScorecard. + * @function deleteQaScorecard + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights * @instance + * @param {google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRequest} request DeleteQaScorecardRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteQaScorecardCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 */ - CalculateStatsResponse.prototype.customHighlighterMatches = $util.emptyObject; + Object.defineProperty(ContactCenterInsights.prototype.deleteQaScorecard = function deleteQaScorecard(request, callback) { + return this.rpcCall(deleteQaScorecard, $root.google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteQaScorecard" }); /** - * CalculateStatsResponse issueMatches. - * @member {Object.} issueMatches - * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * Calls DeleteQaScorecard. + * @function deleteQaScorecard + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights * @instance + * @param {google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRequest} request DeleteQaScorecardRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CalculateStatsResponse.prototype.issueMatches = $util.emptyObject; /** - * CalculateStatsResponse issueMatchesStats. - * @member {Object.} issueMatchesStats - * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|listQaScorecards}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef ListQaScorecardsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.ListQaScorecardsResponse} [response] ListQaScorecardsResponse + */ + + /** + * Calls ListQaScorecards. + * @function listQaScorecards + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights * @instance + * @param {google.cloud.contactcenterinsights.v1.IListQaScorecardsRequest} request ListQaScorecardsRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListQaScorecardsCallback} callback Node-style callback called with the error, if any, and ListQaScorecardsResponse + * @returns {undefined} + * @variation 1 */ - CalculateStatsResponse.prototype.issueMatchesStats = $util.emptyObject; + Object.defineProperty(ContactCenterInsights.prototype.listQaScorecards = function listQaScorecards(request, callback) { + return this.rpcCall(listQaScorecards, $root.google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest, $root.google.cloud.contactcenterinsights.v1.ListQaScorecardsResponse, request, callback); + }, "name", { value: "ListQaScorecards" }); /** - * CalculateStatsResponse conversationCountTimeSeries. - * @member {google.cloud.contactcenterinsights.v1.CalculateStatsResponse.ITimeSeries|null|undefined} conversationCountTimeSeries - * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * Calls ListQaScorecards. + * @function listQaScorecards + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights * @instance + * @param {google.cloud.contactcenterinsights.v1.IListQaScorecardsRequest} request ListQaScorecardsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CalculateStatsResponse.prototype.conversationCountTimeSeries = null; /** - * Creates a new CalculateStatsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse - * @static - * @param {google.cloud.contactcenterinsights.v1.ICalculateStatsResponse=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.CalculateStatsResponse} CalculateStatsResponse instance + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|createQaScorecardRevision}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef CreateQaScorecardRevisionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.QaScorecardRevision} [response] QaScorecardRevision */ - CalculateStatsResponse.create = function create(properties) { - return new CalculateStatsResponse(properties); - }; /** - * Encodes the specified CalculateStatsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateStatsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse - * @static - * @param {google.cloud.contactcenterinsights.v1.ICalculateStatsResponse} message CalculateStatsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls CreateQaScorecardRevision. + * @function createQaScorecardRevision + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.ICreateQaScorecardRevisionRequest} request CreateQaScorecardRevisionRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateQaScorecardRevisionCallback} callback Node-style callback called with the error, if any, and QaScorecardRevision + * @returns {undefined} + * @variation 1 */ - CalculateStatsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.averageDuration != null && Object.hasOwnProperty.call(message, "averageDuration")) - $root.google.protobuf.Duration.encode(message.averageDuration, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.averageTurnCount != null && Object.hasOwnProperty.call(message, "averageTurnCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.averageTurnCount); - if (message.conversationCount != null && Object.hasOwnProperty.call(message, "conversationCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.conversationCount); - if (message.smartHighlighterMatches != null && Object.hasOwnProperty.call(message, "smartHighlighterMatches")) - for (var keys = Object.keys(message.smartHighlighterMatches), i = 0; i < keys.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 0 =*/16).int32(message.smartHighlighterMatches[keys[i]]).ldelim(); - if (message.customHighlighterMatches != null && Object.hasOwnProperty.call(message, "customHighlighterMatches")) - for (var keys = Object.keys(message.customHighlighterMatches), i = 0; i < keys.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 0 =*/16).int32(message.customHighlighterMatches[keys[i]]).ldelim(); - if (message.issueMatches != null && Object.hasOwnProperty.call(message, "issueMatches")) - for (var keys = Object.keys(message.issueMatches), i = 0; i < keys.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 0 =*/16).int32(message.issueMatches[keys[i]]).ldelim(); - if (message.conversationCountTimeSeries != null && Object.hasOwnProperty.call(message, "conversationCountTimeSeries")) - $root.google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.encode(message.conversationCountTimeSeries, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.issueMatchesStats != null && Object.hasOwnProperty.call(message, "issueMatchesStats")) - for (var keys = Object.keys(message.issueMatchesStats), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats.encode(message.issueMatchesStats[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + Object.defineProperty(ContactCenterInsights.prototype.createQaScorecardRevision = function createQaScorecardRevision(request, callback) { + return this.rpcCall(createQaScorecardRevision, $root.google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest, $root.google.cloud.contactcenterinsights.v1.QaScorecardRevision, request, callback); + }, "name", { value: "CreateQaScorecardRevision" }); + + /** + * Calls CreateQaScorecardRevision. + * @function createQaScorecardRevision + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.ICreateQaScorecardRevisionRequest} request CreateQaScorecardRevisionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|getQaScorecardRevision}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef GetQaScorecardRevisionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.QaScorecardRevision} [response] QaScorecardRevision + */ + + /** + * Calls GetQaScorecardRevision. + * @function getQaScorecardRevision + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IGetQaScorecardRevisionRequest} request GetQaScorecardRevisionRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetQaScorecardRevisionCallback} callback Node-style callback called with the error, if any, and QaScorecardRevision + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.getQaScorecardRevision = function getQaScorecardRevision(request, callback) { + return this.rpcCall(getQaScorecardRevision, $root.google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest, $root.google.cloud.contactcenterinsights.v1.QaScorecardRevision, request, callback); + }, "name", { value: "GetQaScorecardRevision" }); + + /** + * Calls GetQaScorecardRevision. + * @function getQaScorecardRevision + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IGetQaScorecardRevisionRequest} request GetQaScorecardRevisionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|tuneQaScorecardRevision}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef TuneQaScorecardRevisionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls TuneQaScorecardRevision. + * @function tuneQaScorecardRevision + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionRequest} request TuneQaScorecardRevisionRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.TuneQaScorecardRevisionCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.tuneQaScorecardRevision = function tuneQaScorecardRevision(request, callback) { + return this.rpcCall(tuneQaScorecardRevision, $root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "TuneQaScorecardRevision" }); + + /** + * Calls TuneQaScorecardRevision. + * @function tuneQaScorecardRevision + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionRequest} request TuneQaScorecardRevisionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|deployQaScorecardRevision}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef DeployQaScorecardRevisionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.QaScorecardRevision} [response] QaScorecardRevision + */ + + /** + * Calls DeployQaScorecardRevision. + * @function deployQaScorecardRevision + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IDeployQaScorecardRevisionRequest} request DeployQaScorecardRevisionRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeployQaScorecardRevisionCallback} callback Node-style callback called with the error, if any, and QaScorecardRevision + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.deployQaScorecardRevision = function deployQaScorecardRevision(request, callback) { + return this.rpcCall(deployQaScorecardRevision, $root.google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest, $root.google.cloud.contactcenterinsights.v1.QaScorecardRevision, request, callback); + }, "name", { value: "DeployQaScorecardRevision" }); + + /** + * Calls DeployQaScorecardRevision. + * @function deployQaScorecardRevision + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IDeployQaScorecardRevisionRequest} request DeployQaScorecardRevisionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|undeployQaScorecardRevision}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef UndeployQaScorecardRevisionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.QaScorecardRevision} [response] QaScorecardRevision + */ + + /** + * Calls UndeployQaScorecardRevision. + * @function undeployQaScorecardRevision + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IUndeployQaScorecardRevisionRequest} request UndeployQaScorecardRevisionRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.UndeployQaScorecardRevisionCallback} callback Node-style callback called with the error, if any, and QaScorecardRevision + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.undeployQaScorecardRevision = function undeployQaScorecardRevision(request, callback) { + return this.rpcCall(undeployQaScorecardRevision, $root.google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest, $root.google.cloud.contactcenterinsights.v1.QaScorecardRevision, request, callback); + }, "name", { value: "UndeployQaScorecardRevision" }); + + /** + * Calls UndeployQaScorecardRevision. + * @function undeployQaScorecardRevision + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IUndeployQaScorecardRevisionRequest} request UndeployQaScorecardRevisionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|deleteQaScorecardRevision}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef DeleteQaScorecardRevisionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteQaScorecardRevision. + * @function deleteQaScorecardRevision + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRevisionRequest} request DeleteQaScorecardRevisionRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteQaScorecardRevisionCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.deleteQaScorecardRevision = function deleteQaScorecardRevision(request, callback) { + return this.rpcCall(deleteQaScorecardRevision, $root.google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteQaScorecardRevision" }); + + /** + * Calls DeleteQaScorecardRevision. + * @function deleteQaScorecardRevision + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRevisionRequest} request DeleteQaScorecardRevisionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|listQaScorecardRevisions}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef ListQaScorecardRevisionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsResponse} [response] ListQaScorecardRevisionsResponse + */ + + /** + * Calls ListQaScorecardRevisions. + * @function listQaScorecardRevisions + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsRequest} request ListQaScorecardRevisionsRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListQaScorecardRevisionsCallback} callback Node-style callback called with the error, if any, and ListQaScorecardRevisionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.listQaScorecardRevisions = function listQaScorecardRevisions(request, callback) { + return this.rpcCall(listQaScorecardRevisions, $root.google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest, $root.google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsResponse, request, callback); + }, "name", { value: "ListQaScorecardRevisions" }); + + /** + * Calls ListQaScorecardRevisions. + * @function listQaScorecardRevisions + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsRequest} request ListQaScorecardRevisionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|createFeedbackLabel}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef CreateFeedbackLabelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.FeedbackLabel} [response] FeedbackLabel + */ + + /** + * Calls CreateFeedbackLabel. + * @function createFeedbackLabel + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.ICreateFeedbackLabelRequest} request CreateFeedbackLabelRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateFeedbackLabelCallback} callback Node-style callback called with the error, if any, and FeedbackLabel + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.createFeedbackLabel = function createFeedbackLabel(request, callback) { + return this.rpcCall(createFeedbackLabel, $root.google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest, $root.google.cloud.contactcenterinsights.v1.FeedbackLabel, request, callback); + }, "name", { value: "CreateFeedbackLabel" }); + + /** + * Calls CreateFeedbackLabel. + * @function createFeedbackLabel + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.ICreateFeedbackLabelRequest} request CreateFeedbackLabelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|listFeedbackLabels}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef ListFeedbackLabelsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.ListFeedbackLabelsResponse} [response] ListFeedbackLabelsResponse + */ + + /** + * Calls ListFeedbackLabels. + * @function listFeedbackLabels + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IListFeedbackLabelsRequest} request ListFeedbackLabelsRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListFeedbackLabelsCallback} callback Node-style callback called with the error, if any, and ListFeedbackLabelsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.listFeedbackLabels = function listFeedbackLabels(request, callback) { + return this.rpcCall(listFeedbackLabels, $root.google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest, $root.google.cloud.contactcenterinsights.v1.ListFeedbackLabelsResponse, request, callback); + }, "name", { value: "ListFeedbackLabels" }); + + /** + * Calls ListFeedbackLabels. + * @function listFeedbackLabels + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IListFeedbackLabelsRequest} request ListFeedbackLabelsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|getFeedbackLabel}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef GetFeedbackLabelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.FeedbackLabel} [response] FeedbackLabel + */ + + /** + * Calls GetFeedbackLabel. + * @function getFeedbackLabel + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IGetFeedbackLabelRequest} request GetFeedbackLabelRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetFeedbackLabelCallback} callback Node-style callback called with the error, if any, and FeedbackLabel + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.getFeedbackLabel = function getFeedbackLabel(request, callback) { + return this.rpcCall(getFeedbackLabel, $root.google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest, $root.google.cloud.contactcenterinsights.v1.FeedbackLabel, request, callback); + }, "name", { value: "GetFeedbackLabel" }); + + /** + * Calls GetFeedbackLabel. + * @function getFeedbackLabel + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IGetFeedbackLabelRequest} request GetFeedbackLabelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|updateFeedbackLabel}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef UpdateFeedbackLabelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.FeedbackLabel} [response] FeedbackLabel + */ + + /** + * Calls UpdateFeedbackLabel. + * @function updateFeedbackLabel + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IUpdateFeedbackLabelRequest} request UpdateFeedbackLabelRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateFeedbackLabelCallback} callback Node-style callback called with the error, if any, and FeedbackLabel + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.updateFeedbackLabel = function updateFeedbackLabel(request, callback) { + return this.rpcCall(updateFeedbackLabel, $root.google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest, $root.google.cloud.contactcenterinsights.v1.FeedbackLabel, request, callback); + }, "name", { value: "UpdateFeedbackLabel" }); + + /** + * Calls UpdateFeedbackLabel. + * @function updateFeedbackLabel + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IUpdateFeedbackLabelRequest} request UpdateFeedbackLabelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|deleteFeedbackLabel}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef DeleteFeedbackLabelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteFeedbackLabel. + * @function deleteFeedbackLabel + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IDeleteFeedbackLabelRequest} request DeleteFeedbackLabelRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteFeedbackLabelCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.deleteFeedbackLabel = function deleteFeedbackLabel(request, callback) { + return this.rpcCall(deleteFeedbackLabel, $root.google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteFeedbackLabel" }); + + /** + * Calls DeleteFeedbackLabel. + * @function deleteFeedbackLabel + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IDeleteFeedbackLabelRequest} request DeleteFeedbackLabelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|listAllFeedbackLabels}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef ListAllFeedbackLabelsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsResponse} [response] ListAllFeedbackLabelsResponse + */ + + /** + * Calls ListAllFeedbackLabels. + * @function listAllFeedbackLabels + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsRequest} request ListAllFeedbackLabelsRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListAllFeedbackLabelsCallback} callback Node-style callback called with the error, if any, and ListAllFeedbackLabelsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.listAllFeedbackLabels = function listAllFeedbackLabels(request, callback) { + return this.rpcCall(listAllFeedbackLabels, $root.google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest, $root.google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsResponse, request, callback); + }, "name", { value: "ListAllFeedbackLabels" }); + + /** + * Calls ListAllFeedbackLabels. + * @function listAllFeedbackLabels + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsRequest} request ListAllFeedbackLabelsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|bulkUploadFeedbackLabels}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef BulkUploadFeedbackLabelsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls BulkUploadFeedbackLabels. + * @function bulkUploadFeedbackLabels + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsRequest} request BulkUploadFeedbackLabelsRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.BulkUploadFeedbackLabelsCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.bulkUploadFeedbackLabels = function bulkUploadFeedbackLabels(request, callback) { + return this.rpcCall(bulkUploadFeedbackLabels, $root.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "BulkUploadFeedbackLabels" }); + + /** + * Calls BulkUploadFeedbackLabels. + * @function bulkUploadFeedbackLabels + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsRequest} request BulkUploadFeedbackLabelsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|bulkDownloadFeedbackLabels}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef BulkDownloadFeedbackLabelsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls BulkDownloadFeedbackLabels. + * @function bulkDownloadFeedbackLabels + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsRequest} request BulkDownloadFeedbackLabelsRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.BulkDownloadFeedbackLabelsCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.bulkDownloadFeedbackLabels = function bulkDownloadFeedbackLabels(request, callback) { + return this.rpcCall(bulkDownloadFeedbackLabels, $root.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "BulkDownloadFeedbackLabels" }); + + /** + * Calls BulkDownloadFeedbackLabels. + * @function bulkDownloadFeedbackLabels + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsRequest} request BulkDownloadFeedbackLabelsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ContactCenterInsights; + })(); + + /** + * ConversationView enum. + * @name google.cloud.contactcenterinsights.v1.ConversationView + * @enum {number} + * @property {number} CONVERSATION_VIEW_UNSPECIFIED=0 CONVERSATION_VIEW_UNSPECIFIED value + * @property {number} FULL=2 FULL value + * @property {number} BASIC=1 BASIC value + */ + v1.ConversationView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CONVERSATION_VIEW_UNSPECIFIED"] = 0; + values[valuesById[2] = "FULL"] = 2; + values[valuesById[1] = "BASIC"] = 1; + return values; + })(); + + v1.CalculateStatsRequest = (function() { + + /** + * Properties of a CalculateStatsRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface ICalculateStatsRequest + * @property {string|null} [location] CalculateStatsRequest location + * @property {string|null} [filter] CalculateStatsRequest filter + */ + + /** + * Constructs a new CalculateStatsRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a CalculateStatsRequest. + * @implements ICalculateStatsRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.ICalculateStatsRequest=} [properties] Properties to set + */ + function CalculateStatsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CalculateStatsRequest location. + * @member {string} location + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsRequest + * @instance + */ + CalculateStatsRequest.prototype.location = ""; + + /** + * CalculateStatsRequest filter. + * @member {string} filter + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsRequest + * @instance + */ + CalculateStatsRequest.prototype.filter = ""; + + /** + * Creates a new CalculateStatsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICalculateStatsRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.CalculateStatsRequest} CalculateStatsRequest instance + */ + CalculateStatsRequest.create = function create(properties) { + return new CalculateStatsRequest(properties); + }; + + /** + * Encodes the specified CalculateStatsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateStatsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICalculateStatsRequest} message CalculateStatsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CalculateStatsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.location); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); return writer; }; /** - * Encodes the specified CalculateStatsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateStatsResponse.verify|verify} messages. + * Encodes the specified CalculateStatsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateStatsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsRequest * @static - * @param {google.cloud.contactcenterinsights.v1.ICalculateStatsResponse} message CalculateStatsResponse message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.ICalculateStatsRequest} message CalculateStatsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CalculateStatsResponse.encodeDelimited = function encodeDelimited(message, writer) { + CalculateStatsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CalculateStatsResponse message from the specified reader or buffer. + * Decodes a CalculateStatsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.CalculateStatsResponse} CalculateStatsResponse + * @returns {google.cloud.contactcenterinsights.v1.CalculateStatsRequest} CalculateStatsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CalculateStatsResponse.decode = function decode(reader, length) { + CalculateStatsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.CalculateStatsResponse(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.CalculateStatsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.averageDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.location = reader.string(); break; } case 2: { - message.averageTurnCount = reader.int32(); - break; - } - case 3: { - message.conversationCount = reader.int32(); - break; - } - case 4: { - if (message.smartHighlighterMatches === $util.emptyObject) - message.smartHighlighterMatches = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = 0; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.int32(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.smartHighlighterMatches[key] = value; - break; - } - case 5: { - if (message.customHighlighterMatches === $util.emptyObject) - message.customHighlighterMatches = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = 0; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.int32(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.customHighlighterMatches[key] = value; - break; - } - case 6: { - if (message.issueMatches === $util.emptyObject) - message.issueMatches = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = 0; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.int32(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.issueMatches[key] = value; - break; - } - case 8: { - if (message.issueMatchesStats === $util.emptyObject) - message.issueMatchesStats = {}; - 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.contactcenterinsights.v1.IssueModelLabelStats.IssueStats.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.issueMatchesStats[key] = value; - break; - } - case 7: { - message.conversationCountTimeSeries = $root.google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.decode(reader, reader.uint32()); + message.filter = reader.string(); break; } default: @@ -2059,7 +2679,410 @@ }; /** - * Decodes a CalculateStatsResponse message from the specified reader or buffer, length delimited. + * Decodes a CalculateStatsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.CalculateStatsRequest} CalculateStatsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CalculateStatsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CalculateStatsRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CalculateStatsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a CalculateStatsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.CalculateStatsRequest} CalculateStatsRequest + */ + CalculateStatsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.CalculateStatsRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.CalculateStatsRequest(); + if (object.location != null) + message.location = String(object.location); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a CalculateStatsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.CalculateStatsRequest} message CalculateStatsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CalculateStatsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.location = ""; + object.filter = ""; + } + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this CalculateStatsRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsRequest + * @instance + * @returns {Object.} JSON object + */ + CalculateStatsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CalculateStatsRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CalculateStatsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.CalculateStatsRequest"; + }; + + return CalculateStatsRequest; + })(); + + v1.CalculateStatsResponse = (function() { + + /** + * Properties of a CalculateStatsResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface ICalculateStatsResponse + * @property {google.protobuf.IDuration|null} [averageDuration] CalculateStatsResponse averageDuration + * @property {number|null} [averageTurnCount] CalculateStatsResponse averageTurnCount + * @property {number|null} [conversationCount] CalculateStatsResponse conversationCount + * @property {Object.|null} [smartHighlighterMatches] CalculateStatsResponse smartHighlighterMatches + * @property {Object.|null} [customHighlighterMatches] CalculateStatsResponse customHighlighterMatches + * @property {Object.|null} [issueMatches] CalculateStatsResponse issueMatches + * @property {Object.|null} [issueMatchesStats] CalculateStatsResponse issueMatchesStats + * @property {google.cloud.contactcenterinsights.v1.CalculateStatsResponse.ITimeSeries|null} [conversationCountTimeSeries] CalculateStatsResponse conversationCountTimeSeries + */ + + /** + * Constructs a new CalculateStatsResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a CalculateStatsResponse. + * @implements ICalculateStatsResponse + * @constructor + * @param {google.cloud.contactcenterinsights.v1.ICalculateStatsResponse=} [properties] Properties to set + */ + function CalculateStatsResponse(properties) { + this.smartHighlighterMatches = {}; + this.customHighlighterMatches = {}; + this.issueMatches = {}; + this.issueMatchesStats = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CalculateStatsResponse averageDuration. + * @member {google.protobuf.IDuration|null|undefined} averageDuration + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * @instance + */ + CalculateStatsResponse.prototype.averageDuration = null; + + /** + * CalculateStatsResponse averageTurnCount. + * @member {number} averageTurnCount + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * @instance + */ + CalculateStatsResponse.prototype.averageTurnCount = 0; + + /** + * CalculateStatsResponse conversationCount. + * @member {number} conversationCount + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * @instance + */ + CalculateStatsResponse.prototype.conversationCount = 0; + + /** + * CalculateStatsResponse smartHighlighterMatches. + * @member {Object.} smartHighlighterMatches + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * @instance + */ + CalculateStatsResponse.prototype.smartHighlighterMatches = $util.emptyObject; + + /** + * CalculateStatsResponse customHighlighterMatches. + * @member {Object.} customHighlighterMatches + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * @instance + */ + CalculateStatsResponse.prototype.customHighlighterMatches = $util.emptyObject; + + /** + * CalculateStatsResponse issueMatches. + * @member {Object.} issueMatches + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * @instance + */ + CalculateStatsResponse.prototype.issueMatches = $util.emptyObject; + + /** + * CalculateStatsResponse issueMatchesStats. + * @member {Object.} issueMatchesStats + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * @instance + */ + CalculateStatsResponse.prototype.issueMatchesStats = $util.emptyObject; + + /** + * CalculateStatsResponse conversationCountTimeSeries. + * @member {google.cloud.contactcenterinsights.v1.CalculateStatsResponse.ITimeSeries|null|undefined} conversationCountTimeSeries + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * @instance + */ + CalculateStatsResponse.prototype.conversationCountTimeSeries = null; + + /** + * Creates a new CalculateStatsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.ICalculateStatsResponse=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.CalculateStatsResponse} CalculateStatsResponse instance + */ + CalculateStatsResponse.create = function create(properties) { + return new CalculateStatsResponse(properties); + }; + + /** + * Encodes the specified CalculateStatsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateStatsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.ICalculateStatsResponse} message CalculateStatsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CalculateStatsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.averageDuration != null && Object.hasOwnProperty.call(message, "averageDuration")) + $root.google.protobuf.Duration.encode(message.averageDuration, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.averageTurnCount != null && Object.hasOwnProperty.call(message, "averageTurnCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.averageTurnCount); + if (message.conversationCount != null && Object.hasOwnProperty.call(message, "conversationCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.conversationCount); + if (message.smartHighlighterMatches != null && Object.hasOwnProperty.call(message, "smartHighlighterMatches")) + for (var keys = Object.keys(message.smartHighlighterMatches), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 0 =*/16).int32(message.smartHighlighterMatches[keys[i]]).ldelim(); + if (message.customHighlighterMatches != null && Object.hasOwnProperty.call(message, "customHighlighterMatches")) + for (var keys = Object.keys(message.customHighlighterMatches), i = 0; i < keys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 0 =*/16).int32(message.customHighlighterMatches[keys[i]]).ldelim(); + if (message.issueMatches != null && Object.hasOwnProperty.call(message, "issueMatches")) + for (var keys = Object.keys(message.issueMatches), i = 0; i < keys.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 0 =*/16).int32(message.issueMatches[keys[i]]).ldelim(); + if (message.conversationCountTimeSeries != null && Object.hasOwnProperty.call(message, "conversationCountTimeSeries")) + $root.google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.encode(message.conversationCountTimeSeries, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.issueMatchesStats != null && Object.hasOwnProperty.call(message, "issueMatchesStats")) + for (var keys = Object.keys(message.issueMatchesStats), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats.encode(message.issueMatchesStats[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified CalculateStatsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateStatsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.ICalculateStatsResponse} message CalculateStatsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CalculateStatsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CalculateStatsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.CalculateStatsResponse} CalculateStatsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CalculateStatsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.CalculateStatsResponse(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.averageDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.averageTurnCount = reader.int32(); + break; + } + case 3: { + message.conversationCount = reader.int32(); + break; + } + case 4: { + if (message.smartHighlighterMatches === $util.emptyObject) + message.smartHighlighterMatches = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = 0; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.int32(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.smartHighlighterMatches[key] = value; + break; + } + case 5: { + if (message.customHighlighterMatches === $util.emptyObject) + message.customHighlighterMatches = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = 0; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.int32(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.customHighlighterMatches[key] = value; + break; + } + case 6: { + if (message.issueMatches === $util.emptyObject) + message.issueMatches = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = 0; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.int32(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.issueMatches[key] = value; + break; + } + case 8: { + if (message.issueMatchesStats === $util.emptyObject) + message.issueMatchesStats = {}; + 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.contactcenterinsights.v1.IssueModelLabelStats.IssueStats.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.issueMatchesStats[key] = value; + break; + } + case 7: { + message.conversationCountTimeSeries = $root.google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CalculateStatsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof google.cloud.contactcenterinsights.v1.CalculateStatsResponse * @static @@ -19419,24 +20442,25 @@ return UpdateSettingsRequest; })(); - v1.GetEncryptionSpecRequest = (function() { + v1.CreateAnalysisRuleRequest = (function() { /** - * Properties of a GetEncryptionSpecRequest. + * Properties of a CreateAnalysisRuleRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IGetEncryptionSpecRequest - * @property {string|null} [name] GetEncryptionSpecRequest name + * @interface ICreateAnalysisRuleRequest + * @property {string|null} [parent] CreateAnalysisRuleRequest parent + * @property {google.cloud.contactcenterinsights.v1.IAnalysisRule|null} [analysisRule] CreateAnalysisRuleRequest analysisRule */ /** - * Constructs a new GetEncryptionSpecRequest. + * Constructs a new CreateAnalysisRuleRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a GetEncryptionSpecRequest. - * @implements IGetEncryptionSpecRequest + * @classdesc Represents a CreateAnalysisRuleRequest. + * @implements ICreateAnalysisRuleRequest * @constructor - * @param {google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.ICreateAnalysisRuleRequest=} [properties] Properties to set */ - function GetEncryptionSpecRequest(properties) { + function CreateAnalysisRuleRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19444,75 +20468,89 @@ } /** - * GetEncryptionSpecRequest name. - * @member {string} name - * @memberof google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest + * CreateAnalysisRuleRequest parent. + * @member {string} parent + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest * @instance */ - GetEncryptionSpecRequest.prototype.name = ""; + CreateAnalysisRuleRequest.prototype.parent = ""; /** - * Creates a new GetEncryptionSpecRequest instance using the specified properties. + * CreateAnalysisRuleRequest analysisRule. + * @member {google.cloud.contactcenterinsights.v1.IAnalysisRule|null|undefined} analysisRule + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest + * @instance + */ + CreateAnalysisRuleRequest.prototype.analysisRule = null; + + /** + * Creates a new CreateAnalysisRuleRequest instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest} GetEncryptionSpecRequest instance + * @param {google.cloud.contactcenterinsights.v1.ICreateAnalysisRuleRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest} CreateAnalysisRuleRequest instance */ - GetEncryptionSpecRequest.create = function create(properties) { - return new GetEncryptionSpecRequest(properties); + CreateAnalysisRuleRequest.create = function create(properties) { + return new CreateAnalysisRuleRequest(properties); }; /** - * Encodes the specified GetEncryptionSpecRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest.verify|verify} messages. + * Encodes the specified CreateAnalysisRuleRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest} message GetEncryptionSpecRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.ICreateAnalysisRuleRequest} message CreateAnalysisRuleRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEncryptionSpecRequest.encode = function encode(message, writer) { + CreateAnalysisRuleRequest.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.analysisRule != null && Object.hasOwnProperty.call(message, "analysisRule")) + $root.google.cloud.contactcenterinsights.v1.AnalysisRule.encode(message.analysisRule, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetEncryptionSpecRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest.verify|verify} messages. + * Encodes the specified CreateAnalysisRuleRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest} message GetEncryptionSpecRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.ICreateAnalysisRuleRequest} message CreateAnalysisRuleRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEncryptionSpecRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateAnalysisRuleRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetEncryptionSpecRequest message from the specified reader or buffer. + * Decodes a CreateAnalysisRuleRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest} GetEncryptionSpecRequest + * @returns {google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest} CreateAnalysisRuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetEncryptionSpecRequest.decode = function decode(reader, length) { + CreateAnalysisRuleRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest(); 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.analysisRule = $root.google.cloud.contactcenterinsights.v1.AnalysisRule.decode(reader, reader.uint32()); break; } default: @@ -19524,122 +20562,136 @@ }; /** - * Decodes a GetEncryptionSpecRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateAnalysisRuleRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest} GetEncryptionSpecRequest + * @returns {google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest} CreateAnalysisRuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetEncryptionSpecRequest.decodeDelimited = function decodeDelimited(reader) { + CreateAnalysisRuleRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetEncryptionSpecRequest message. + * Verifies a CreateAnalysisRuleRequest message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetEncryptionSpecRequest.verify = function verify(message) { + CreateAnalysisRuleRequest.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.analysisRule != null && message.hasOwnProperty("analysisRule")) { + var error = $root.google.cloud.contactcenterinsights.v1.AnalysisRule.verify(message.analysisRule); + if (error) + return "analysisRule." + error; + } return null; }; /** - * Creates a GetEncryptionSpecRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateAnalysisRuleRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest} GetEncryptionSpecRequest + * @returns {google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest} CreateAnalysisRuleRequest */ - GetEncryptionSpecRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest) + CreateAnalysisRuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.analysisRule != null) { + if (typeof object.analysisRule !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest.analysisRule: object expected"); + message.analysisRule = $root.google.cloud.contactcenterinsights.v1.AnalysisRule.fromObject(object.analysisRule); + } return message; }; /** - * Creates a plain object from a GetEncryptionSpecRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateAnalysisRuleRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest * @static - * @param {google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest} message GetEncryptionSpecRequest + * @param {google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest} message CreateAnalysisRuleRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetEncryptionSpecRequest.toObject = function toObject(message, options) { + CreateAnalysisRuleRequest.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.analysisRule = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.analysisRule != null && message.hasOwnProperty("analysisRule")) + object.analysisRule = $root.google.cloud.contactcenterinsights.v1.AnalysisRule.toObject(message.analysisRule, options); return object; }; /** - * Converts this GetEncryptionSpecRequest to JSON. + * Converts this CreateAnalysisRuleRequest to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest * @instance * @returns {Object.} JSON object */ - GetEncryptionSpecRequest.prototype.toJSON = function toJSON() { + CreateAnalysisRuleRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetEncryptionSpecRequest + * Gets the default type url for CreateAnalysisRuleRequest * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetEncryptionSpecRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateAnalysisRuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest"; }; - return GetEncryptionSpecRequest; + return CreateAnalysisRuleRequest; })(); - v1.InitializeEncryptionSpecRequest = (function() { + v1.GetAnalysisRuleRequest = (function() { /** - * Properties of an InitializeEncryptionSpecRequest. + * Properties of a GetAnalysisRuleRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IInitializeEncryptionSpecRequest - * @property {google.cloud.contactcenterinsights.v1.IEncryptionSpec|null} [encryptionSpec] InitializeEncryptionSpecRequest encryptionSpec + * @interface IGetAnalysisRuleRequest + * @property {string|null} [name] GetAnalysisRuleRequest name */ /** - * Constructs a new InitializeEncryptionSpecRequest. + * Constructs a new GetAnalysisRuleRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents an InitializeEncryptionSpecRequest. - * @implements IInitializeEncryptionSpecRequest + * @classdesc Represents a GetAnalysisRuleRequest. + * @implements IGetAnalysisRuleRequest * @constructor - * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IGetAnalysisRuleRequest=} [properties] Properties to set */ - function InitializeEncryptionSpecRequest(properties) { + function GetAnalysisRuleRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19647,75 +20699,75 @@ } /** - * InitializeEncryptionSpecRequest encryptionSpec. - * @member {google.cloud.contactcenterinsights.v1.IEncryptionSpec|null|undefined} encryptionSpec - * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest + * GetAnalysisRuleRequest name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest * @instance */ - InitializeEncryptionSpecRequest.prototype.encryptionSpec = null; + GetAnalysisRuleRequest.prototype.name = ""; /** - * Creates a new InitializeEncryptionSpecRequest instance using the specified properties. + * Creates a new GetAnalysisRuleRequest instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest + * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest} InitializeEncryptionSpecRequest instance + * @param {google.cloud.contactcenterinsights.v1.IGetAnalysisRuleRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest} GetAnalysisRuleRequest instance */ - InitializeEncryptionSpecRequest.create = function create(properties) { - return new InitializeEncryptionSpecRequest(properties); + GetAnalysisRuleRequest.create = function create(properties) { + return new GetAnalysisRuleRequest(properties); }; /** - * Encodes the specified InitializeEncryptionSpecRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest.verify|verify} messages. + * Encodes the specified GetAnalysisRuleRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest + * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest} message InitializeEncryptionSpecRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IGetAnalysisRuleRequest} message GetAnalysisRuleRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InitializeEncryptionSpecRequest.encode = function encode(message, writer) { + GetAnalysisRuleRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.encryptionSpec != null && Object.hasOwnProperty.call(message, "encryptionSpec")) - $root.google.cloud.contactcenterinsights.v1.EncryptionSpec.encode(message.encryptionSpec, 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 InitializeEncryptionSpecRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest.verify|verify} messages. + * Encodes the specified GetAnalysisRuleRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest + * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest} message InitializeEncryptionSpecRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IGetAnalysisRuleRequest} message GetAnalysisRuleRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InitializeEncryptionSpecRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetAnalysisRuleRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an InitializeEncryptionSpecRequest message from the specified reader or buffer. + * Decodes a GetAnalysisRuleRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest + * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest} InitializeEncryptionSpecRequest + * @returns {google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest} GetAnalysisRuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InitializeEncryptionSpecRequest.decode = function decode(reader, length) { + GetAnalysisRuleRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.encryptionSpec = $root.google.cloud.contactcenterinsights.v1.EncryptionSpec.decode(reader, reader.uint32()); + message.name = reader.string(); break; } default: @@ -19727,126 +20779,123 @@ }; /** - * Decodes an InitializeEncryptionSpecRequest message from the specified reader or buffer, length delimited. + * Decodes a GetAnalysisRuleRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest + * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest} InitializeEncryptionSpecRequest + * @returns {google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest} GetAnalysisRuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InitializeEncryptionSpecRequest.decodeDelimited = function decodeDelimited(reader) { + GetAnalysisRuleRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an InitializeEncryptionSpecRequest message. + * Verifies a GetAnalysisRuleRequest message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest + * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - InitializeEncryptionSpecRequest.verify = function verify(message) { + GetAnalysisRuleRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.encryptionSpec != null && message.hasOwnProperty("encryptionSpec")) { - var error = $root.google.cloud.contactcenterinsights.v1.EncryptionSpec.verify(message.encryptionSpec); - if (error) - return "encryptionSpec." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an InitializeEncryptionSpecRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetAnalysisRuleRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest + * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest} InitializeEncryptionSpecRequest + * @returns {google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest} GetAnalysisRuleRequest */ - InitializeEncryptionSpecRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest) + GetAnalysisRuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest(); - if (object.encryptionSpec != null) { - if (typeof object.encryptionSpec !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest.encryptionSpec: object expected"); - message.encryptionSpec = $root.google.cloud.contactcenterinsights.v1.EncryptionSpec.fromObject(object.encryptionSpec); - } + var message = new $root.google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from an InitializeEncryptionSpecRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetAnalysisRuleRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest + * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest * @static - * @param {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest} message InitializeEncryptionSpecRequest + * @param {google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest} message GetAnalysisRuleRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - InitializeEncryptionSpecRequest.toObject = function toObject(message, options) { + GetAnalysisRuleRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.encryptionSpec = null; - if (message.encryptionSpec != null && message.hasOwnProperty("encryptionSpec")) - object.encryptionSpec = $root.google.cloud.contactcenterinsights.v1.EncryptionSpec.toObject(message.encryptionSpec, options); + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this InitializeEncryptionSpecRequest to JSON. + * Converts this GetAnalysisRuleRequest to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest + * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest * @instance * @returns {Object.} JSON object */ - InitializeEncryptionSpecRequest.prototype.toJSON = function toJSON() { + GetAnalysisRuleRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for InitializeEncryptionSpecRequest + * Gets the default type url for GetAnalysisRuleRequest * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest + * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - InitializeEncryptionSpecRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetAnalysisRuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest"; }; - return InitializeEncryptionSpecRequest; + return GetAnalysisRuleRequest; })(); - v1.InitializeEncryptionSpecResponse = (function() { + v1.UpdateAnalysisRuleRequest = (function() { /** - * Properties of an InitializeEncryptionSpecResponse. + * Properties of an UpdateAnalysisRuleRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IInitializeEncryptionSpecResponse + * @interface IUpdateAnalysisRuleRequest + * @property {google.cloud.contactcenterinsights.v1.IAnalysisRule|null} [analysisRule] UpdateAnalysisRuleRequest analysisRule + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAnalysisRuleRequest updateMask */ /** - * Constructs a new InitializeEncryptionSpecResponse. + * Constructs a new UpdateAnalysisRuleRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents an InitializeEncryptionSpecResponse. - * @implements IInitializeEncryptionSpecResponse + * @classdesc Represents an UpdateAnalysisRuleRequest. + * @implements IUpdateAnalysisRuleRequest * @constructor - * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IUpdateAnalysisRuleRequest=} [properties] Properties to set */ - function InitializeEncryptionSpecResponse(properties) { + function UpdateAnalysisRuleRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19854,63 +20903,91 @@ } /** - * Creates a new InitializeEncryptionSpecResponse instance using the specified properties. + * UpdateAnalysisRuleRequest analysisRule. + * @member {google.cloud.contactcenterinsights.v1.IAnalysisRule|null|undefined} analysisRule + * @memberof google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest + * @instance + */ + UpdateAnalysisRuleRequest.prototype.analysisRule = null; + + /** + * UpdateAnalysisRuleRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest + * @instance + */ + UpdateAnalysisRuleRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateAnalysisRuleRequest instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse + * @memberof google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse} InitializeEncryptionSpecResponse instance + * @param {google.cloud.contactcenterinsights.v1.IUpdateAnalysisRuleRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest} UpdateAnalysisRuleRequest instance */ - InitializeEncryptionSpecResponse.create = function create(properties) { - return new InitializeEncryptionSpecResponse(properties); + UpdateAnalysisRuleRequest.create = function create(properties) { + return new UpdateAnalysisRuleRequest(properties); }; /** - * Encodes the specified InitializeEncryptionSpecResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse.verify|verify} messages. + * Encodes the specified UpdateAnalysisRuleRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse + * @memberof google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse} message InitializeEncryptionSpecResponse message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IUpdateAnalysisRuleRequest} message UpdateAnalysisRuleRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InitializeEncryptionSpecResponse.encode = function encode(message, writer) { + UpdateAnalysisRuleRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.analysisRule != null && Object.hasOwnProperty.call(message, "analysisRule")) + $root.google.cloud.contactcenterinsights.v1.AnalysisRule.encode(message.analysisRule, 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 InitializeEncryptionSpecResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse.verify|verify} messages. + * Encodes the specified UpdateAnalysisRuleRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse + * @memberof google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse} message InitializeEncryptionSpecResponse message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IUpdateAnalysisRuleRequest} message UpdateAnalysisRuleRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InitializeEncryptionSpecResponse.encodeDelimited = function encodeDelimited(message, writer) { + UpdateAnalysisRuleRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an InitializeEncryptionSpecResponse message from the specified reader or buffer. + * Decodes an UpdateAnalysisRuleRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse + * @memberof google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse} InitializeEncryptionSpecResponse + * @returns {google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest} UpdateAnalysisRuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InitializeEncryptionSpecResponse.decode = function decode(reader, length) { + UpdateAnalysisRuleRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.analysisRule = $root.google.cloud.contactcenterinsights.v1.AnalysisRule.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -19920,113 +20997,141 @@ }; /** - * Decodes an InitializeEncryptionSpecResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateAnalysisRuleRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse + * @memberof google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse} InitializeEncryptionSpecResponse + * @returns {google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest} UpdateAnalysisRuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InitializeEncryptionSpecResponse.decodeDelimited = function decodeDelimited(reader) { + UpdateAnalysisRuleRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an InitializeEncryptionSpecResponse message. + * Verifies an UpdateAnalysisRuleRequest message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse + * @memberof google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - InitializeEncryptionSpecResponse.verify = function verify(message) { + UpdateAnalysisRuleRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.analysisRule != null && message.hasOwnProperty("analysisRule")) { + var error = $root.google.cloud.contactcenterinsights.v1.AnalysisRule.verify(message.analysisRule); + if (error) + return "analysisRule." + 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 InitializeEncryptionSpecResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateAnalysisRuleRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse + * @memberof google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse} InitializeEncryptionSpecResponse + * @returns {google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest} UpdateAnalysisRuleRequest */ - InitializeEncryptionSpecResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse) + UpdateAnalysisRuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest) return object; - return new $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse(); + var message = new $root.google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest(); + if (object.analysisRule != null) { + if (typeof object.analysisRule !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest.analysisRule: object expected"); + message.analysisRule = $root.google.cloud.contactcenterinsights.v1.AnalysisRule.fromObject(object.analysisRule); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; }; /** - * Creates a plain object from an InitializeEncryptionSpecResponse message. Also converts values to other types if specified. + * Creates a plain object from an UpdateAnalysisRuleRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse + * @memberof google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest * @static - * @param {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse} message InitializeEncryptionSpecResponse + * @param {google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest} message UpdateAnalysisRuleRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - InitializeEncryptionSpecResponse.toObject = function toObject() { - return {}; + UpdateAnalysisRuleRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.analysisRule = null; + object.updateMask = null; + } + if (message.analysisRule != null && message.hasOwnProperty("analysisRule")) + object.analysisRule = $root.google.cloud.contactcenterinsights.v1.AnalysisRule.toObject(message.analysisRule, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; }; /** - * Converts this InitializeEncryptionSpecResponse to JSON. + * Converts this UpdateAnalysisRuleRequest to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse + * @memberof google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest * @instance * @returns {Object.} JSON object */ - InitializeEncryptionSpecResponse.prototype.toJSON = function toJSON() { + UpdateAnalysisRuleRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for InitializeEncryptionSpecResponse + * Gets the default type url for UpdateAnalysisRuleRequest * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse + * @memberof google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - InitializeEncryptionSpecResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateAnalysisRuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest"; }; - return InitializeEncryptionSpecResponse; + return UpdateAnalysisRuleRequest; })(); - v1.InitializeEncryptionSpecMetadata = (function() { + v1.DeleteAnalysisRuleRequest = (function() { /** - * Properties of an InitializeEncryptionSpecMetadata. + * Properties of a DeleteAnalysisRuleRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IInitializeEncryptionSpecMetadata - * @property {google.protobuf.ITimestamp|null} [createTime] InitializeEncryptionSpecMetadata createTime - * @property {google.protobuf.ITimestamp|null} [endTime] InitializeEncryptionSpecMetadata endTime - * @property {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest|null} [request] InitializeEncryptionSpecMetadata request - * @property {Array.|null} [partialErrors] InitializeEncryptionSpecMetadata partialErrors + * @interface IDeleteAnalysisRuleRequest + * @property {string|null} [name] DeleteAnalysisRuleRequest name */ /** - * Constructs a new InitializeEncryptionSpecMetadata. + * Constructs a new DeleteAnalysisRuleRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents an InitializeEncryptionSpecMetadata. - * @implements IInitializeEncryptionSpecMetadata + * @classdesc Represents a DeleteAnalysisRuleRequest. + * @implements IDeleteAnalysisRuleRequest * @constructor - * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IDeleteAnalysisRuleRequest=} [properties] Properties to set */ - function InitializeEncryptionSpecMetadata(properties) { - this.partialErrors = []; + function DeleteAnalysisRuleRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20034,120 +21139,75 @@ } /** - * InitializeEncryptionSpecMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata - * @instance - */ - InitializeEncryptionSpecMetadata.prototype.createTime = null; - - /** - * InitializeEncryptionSpecMetadata endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata - * @instance - */ - InitializeEncryptionSpecMetadata.prototype.endTime = null; - - /** - * InitializeEncryptionSpecMetadata request. - * @member {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest|null|undefined} request - * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata - * @instance - */ - InitializeEncryptionSpecMetadata.prototype.request = null; - - /** - * InitializeEncryptionSpecMetadata partialErrors. - * @member {Array.} partialErrors - * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata + * DeleteAnalysisRuleRequest name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest * @instance */ - InitializeEncryptionSpecMetadata.prototype.partialErrors = $util.emptyArray; + DeleteAnalysisRuleRequest.prototype.name = ""; /** - * Creates a new InitializeEncryptionSpecMetadata instance using the specified properties. + * Creates a new DeleteAnalysisRuleRequest instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata + * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata} InitializeEncryptionSpecMetadata instance + * @param {google.cloud.contactcenterinsights.v1.IDeleteAnalysisRuleRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest} DeleteAnalysisRuleRequest instance */ - InitializeEncryptionSpecMetadata.create = function create(properties) { - return new InitializeEncryptionSpecMetadata(properties); + DeleteAnalysisRuleRequest.create = function create(properties) { + return new DeleteAnalysisRuleRequest(properties); }; /** - * Encodes the specified InitializeEncryptionSpecMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata.verify|verify} messages. + * Encodes the specified DeleteAnalysisRuleRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata + * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata} message InitializeEncryptionSpecMetadata message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IDeleteAnalysisRuleRequest} message DeleteAnalysisRuleRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InitializeEncryptionSpecMetadata.encode = function encode(message, writer) { + DeleteAnalysisRuleRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.request != null && Object.hasOwnProperty.call(message, "request")) - $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest.encode(message.request, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.partialErrors != null && message.partialErrors.length) - for (var i = 0; i < message.partialErrors.length; ++i) - $root.google.rpc.Status.encode(message.partialErrors[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified InitializeEncryptionSpecMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata.verify|verify} messages. + * Encodes the specified DeleteAnalysisRuleRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata + * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata} message InitializeEncryptionSpecMetadata message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IDeleteAnalysisRuleRequest} message DeleteAnalysisRuleRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InitializeEncryptionSpecMetadata.encodeDelimited = function encodeDelimited(message, writer) { + DeleteAnalysisRuleRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an InitializeEncryptionSpecMetadata message from the specified reader or buffer. + * Decodes a DeleteAnalysisRuleRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata + * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata} InitializeEncryptionSpecMetadata + * @returns {google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest} DeleteAnalysisRuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InitializeEncryptionSpecMetadata.decode = function decode(reader, length) { + DeleteAnalysisRuleRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 2: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.request = $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.partialErrors && message.partialErrors.length)) - message.partialErrors = []; - message.partialErrors.push($root.google.rpc.Status.decode(reader, reader.uint32())); + message.name = reader.string(); break; } default: @@ -20159,181 +21219,124 @@ }; /** - * Decodes an InitializeEncryptionSpecMetadata message from the specified reader or buffer, length delimited. + * Decodes a DeleteAnalysisRuleRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata + * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata} InitializeEncryptionSpecMetadata + * @returns {google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest} DeleteAnalysisRuleRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InitializeEncryptionSpecMetadata.decodeDelimited = function decodeDelimited(reader) { + DeleteAnalysisRuleRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an InitializeEncryptionSpecMetadata message. + * Verifies a DeleteAnalysisRuleRequest message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata + * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - InitializeEncryptionSpecMetadata.verify = function verify(message) { + DeleteAnalysisRuleRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.request != null && message.hasOwnProperty("request")) { - var error = $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest.verify(message.request); - if (error) - return "request." + error; - } - if (message.partialErrors != null && message.hasOwnProperty("partialErrors")) { - if (!Array.isArray(message.partialErrors)) - return "partialErrors: array expected"; - for (var i = 0; i < message.partialErrors.length; ++i) { - var error = $root.google.rpc.Status.verify(message.partialErrors[i]); - if (error) - return "partialErrors." + error; - } - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an InitializeEncryptionSpecMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteAnalysisRuleRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata + * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata} InitializeEncryptionSpecMetadata + * @returns {google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest} DeleteAnalysisRuleRequest */ - InitializeEncryptionSpecMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata) + DeleteAnalysisRuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - if (object.request != null) { - if (typeof object.request !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata.request: object expected"); - message.request = $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest.fromObject(object.request); - } - if (object.partialErrors) { - if (!Array.isArray(object.partialErrors)) - throw TypeError(".google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata.partialErrors: array expected"); - message.partialErrors = []; - for (var i = 0; i < object.partialErrors.length; ++i) { - if (typeof object.partialErrors[i] !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata.partialErrors: object expected"); - message.partialErrors[i] = $root.google.rpc.Status.fromObject(object.partialErrors[i]); - } - } + var message = new $root.google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from an InitializeEncryptionSpecMetadata message. Also converts values to other types if specified. + * Creates a plain object from a DeleteAnalysisRuleRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata + * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest * @static - * @param {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata} message InitializeEncryptionSpecMetadata + * @param {google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest} message DeleteAnalysisRuleRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - InitializeEncryptionSpecMetadata.toObject = function toObject(message, options) { + DeleteAnalysisRuleRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.partialErrors = []; - if (options.defaults) { - object.createTime = null; - object.endTime = null; - object.request = null; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.request != null && message.hasOwnProperty("request")) - object.request = $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest.toObject(message.request, options); - if (message.partialErrors && message.partialErrors.length) { - object.partialErrors = []; - for (var j = 0; j < message.partialErrors.length; ++j) - object.partialErrors[j] = $root.google.rpc.Status.toObject(message.partialErrors[j], options); - } + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this InitializeEncryptionSpecMetadata to JSON. + * Converts this DeleteAnalysisRuleRequest to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata + * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest * @instance * @returns {Object.} JSON object */ - InitializeEncryptionSpecMetadata.prototype.toJSON = function toJSON() { + DeleteAnalysisRuleRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for InitializeEncryptionSpecMetadata + * Gets the default type url for DeleteAnalysisRuleRequest * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata + * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - InitializeEncryptionSpecMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteAnalysisRuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest"; }; - return InitializeEncryptionSpecMetadata; + return DeleteAnalysisRuleRequest; })(); - v1.CreateViewRequest = (function() { + v1.ListAnalysisRulesRequest = (function() { /** - * Properties of a CreateViewRequest. + * Properties of a ListAnalysisRulesRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @interface ICreateViewRequest - * @property {string|null} [parent] CreateViewRequest parent - * @property {google.cloud.contactcenterinsights.v1.IView|null} [view] CreateViewRequest view + * @interface IListAnalysisRulesRequest + * @property {string|null} [parent] ListAnalysisRulesRequest parent + * @property {number|null} [pageSize] ListAnalysisRulesRequest pageSize + * @property {string|null} [pageToken] ListAnalysisRulesRequest pageToken */ /** - * Constructs a new CreateViewRequest. + * Constructs a new ListAnalysisRulesRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a CreateViewRequest. - * @implements ICreateViewRequest + * @classdesc Represents a ListAnalysisRulesRequest. + * @implements IListAnalysisRulesRequest * @constructor - * @param {google.cloud.contactcenterinsights.v1.ICreateViewRequest=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IListAnalysisRulesRequest=} [properties] Properties to set */ - function CreateViewRequest(properties) { + function ListAnalysisRulesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20341,80 +21344,90 @@ } /** - * CreateViewRequest parent. + * ListAnalysisRulesRequest parent. * @member {string} parent - * @memberof google.cloud.contactcenterinsights.v1.CreateViewRequest + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest * @instance */ - CreateViewRequest.prototype.parent = ""; + ListAnalysisRulesRequest.prototype.parent = ""; /** - * CreateViewRequest view. - * @member {google.cloud.contactcenterinsights.v1.IView|null|undefined} view - * @memberof google.cloud.contactcenterinsights.v1.CreateViewRequest + * ListAnalysisRulesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest * @instance */ - CreateViewRequest.prototype.view = null; + ListAnalysisRulesRequest.prototype.pageSize = 0; /** - * Creates a new CreateViewRequest instance using the specified properties. + * ListAnalysisRulesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest + * @instance + */ + ListAnalysisRulesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListAnalysisRulesRequest instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.CreateViewRequest + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest * @static - * @param {google.cloud.contactcenterinsights.v1.ICreateViewRequest=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.CreateViewRequest} CreateViewRequest instance + * @param {google.cloud.contactcenterinsights.v1.IListAnalysisRulesRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest} ListAnalysisRulesRequest instance */ - CreateViewRequest.create = function create(properties) { - return new CreateViewRequest(properties); + ListAnalysisRulesRequest.create = function create(properties) { + return new ListAnalysisRulesRequest(properties); }; /** - * Encodes the specified CreateViewRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateViewRequest.verify|verify} messages. + * Encodes the specified ListAnalysisRulesRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.CreateViewRequest + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest * @static - * @param {google.cloud.contactcenterinsights.v1.ICreateViewRequest} message CreateViewRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IListAnalysisRulesRequest} message ListAnalysisRulesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateViewRequest.encode = function encode(message, writer) { + ListAnalysisRulesRequest.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.view != null && Object.hasOwnProperty.call(message, "view")) - $root.google.cloud.contactcenterinsights.v1.View.encode(message.view, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified CreateViewRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateViewRequest.verify|verify} messages. + * Encodes the specified ListAnalysisRulesRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.CreateViewRequest + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest * @static - * @param {google.cloud.contactcenterinsights.v1.ICreateViewRequest} message CreateViewRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IListAnalysisRulesRequest} message ListAnalysisRulesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateViewRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListAnalysisRulesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateViewRequest message from the specified reader or buffer. + * Decodes a ListAnalysisRulesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.CreateViewRequest + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.CreateViewRequest} CreateViewRequest + * @returns {google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest} ListAnalysisRulesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateViewRequest.decode = function decode(reader, length) { + ListAnalysisRulesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.CreateViewRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -20423,11 +21436,15 @@ break; } case 2: { - message.view = $root.google.cloud.contactcenterinsights.v1.View.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); break; } - default: - reader.skipType(tag & 7); + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; } } @@ -20435,136 +21452,141 @@ }; /** - * Decodes a CreateViewRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAnalysisRulesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.CreateViewRequest + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.CreateViewRequest} CreateViewRequest + * @returns {google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest} ListAnalysisRulesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateViewRequest.decodeDelimited = function decodeDelimited(reader) { + ListAnalysisRulesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateViewRequest message. + * Verifies a ListAnalysisRulesRequest message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.CreateViewRequest + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateViewRequest.verify = function verify(message) { + ListAnalysisRulesRequest.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.view != null && message.hasOwnProperty("view")) { - var error = $root.google.cloud.contactcenterinsights.v1.View.verify(message.view); - if (error) - return "view." + error; - } + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a CreateViewRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAnalysisRulesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.CreateViewRequest + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.CreateViewRequest} CreateViewRequest + * @returns {google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest} ListAnalysisRulesRequest */ - CreateViewRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.CreateViewRequest) + ListAnalysisRulesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.CreateViewRequest(); + var message = new $root.google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.view != null) { - if (typeof object.view !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.CreateViewRequest.view: object expected"); - message.view = $root.google.cloud.contactcenterinsights.v1.View.fromObject(object.view); - } + 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 CreateViewRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListAnalysisRulesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.CreateViewRequest + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest * @static - * @param {google.cloud.contactcenterinsights.v1.CreateViewRequest} message CreateViewRequest + * @param {google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest} message ListAnalysisRulesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateViewRequest.toObject = function toObject(message, options) { + ListAnalysisRulesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.view = null; + object.pageSize = 0; + object.pageToken = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.view != null && message.hasOwnProperty("view")) - object.view = $root.google.cloud.contactcenterinsights.v1.View.toObject(message.view, options); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this CreateViewRequest to JSON. + * Converts this ListAnalysisRulesRequest to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.CreateViewRequest + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest * @instance * @returns {Object.} JSON object */ - CreateViewRequest.prototype.toJSON = function toJSON() { + ListAnalysisRulesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateViewRequest + * Gets the default type url for ListAnalysisRulesRequest * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.CreateViewRequest + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListAnalysisRulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.CreateViewRequest"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest"; }; - return CreateViewRequest; + return ListAnalysisRulesRequest; })(); - v1.GetViewRequest = (function() { + v1.ListAnalysisRulesResponse = (function() { /** - * Properties of a GetViewRequest. + * Properties of a ListAnalysisRulesResponse. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IGetViewRequest - * @property {string|null} [name] GetViewRequest name + * @interface IListAnalysisRulesResponse + * @property {Array.|null} [analysisRules] ListAnalysisRulesResponse analysisRules + * @property {string|null} [nextPageToken] ListAnalysisRulesResponse nextPageToken */ /** - * Constructs a new GetViewRequest. + * Constructs a new ListAnalysisRulesResponse. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a GetViewRequest. - * @implements IGetViewRequest + * @classdesc Represents a ListAnalysisRulesResponse. + * @implements IListAnalysisRulesResponse * @constructor - * @param {google.cloud.contactcenterinsights.v1.IGetViewRequest=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IListAnalysisRulesResponse=} [properties] Properties to set */ - function GetViewRequest(properties) { + function ListAnalysisRulesResponse(properties) { + this.analysisRules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20572,75 +21594,92 @@ } /** - * GetViewRequest name. - * @member {string} name - * @memberof google.cloud.contactcenterinsights.v1.GetViewRequest + * ListAnalysisRulesResponse analysisRules. + * @member {Array.} analysisRules + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysisRulesResponse * @instance */ - GetViewRequest.prototype.name = ""; + ListAnalysisRulesResponse.prototype.analysisRules = $util.emptyArray; /** - * Creates a new GetViewRequest instance using the specified properties. + * ListAnalysisRulesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysisRulesResponse + * @instance + */ + ListAnalysisRulesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListAnalysisRulesResponse instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.GetViewRequest + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysisRulesResponse * @static - * @param {google.cloud.contactcenterinsights.v1.IGetViewRequest=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.GetViewRequest} GetViewRequest instance + * @param {google.cloud.contactcenterinsights.v1.IListAnalysisRulesResponse=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ListAnalysisRulesResponse} ListAnalysisRulesResponse instance */ - GetViewRequest.create = function create(properties) { - return new GetViewRequest(properties); + ListAnalysisRulesResponse.create = function create(properties) { + return new ListAnalysisRulesResponse(properties); }; /** - * Encodes the specified GetViewRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetViewRequest.verify|verify} messages. + * Encodes the specified ListAnalysisRulesResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListAnalysisRulesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.GetViewRequest + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysisRulesResponse * @static - * @param {google.cloud.contactcenterinsights.v1.IGetViewRequest} message GetViewRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IListAnalysisRulesResponse} message ListAnalysisRulesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetViewRequest.encode = function encode(message, writer) { + ListAnalysisRulesResponse.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.analysisRules != null && message.analysisRules.length) + for (var i = 0; i < message.analysisRules.length; ++i) + $root.google.cloud.contactcenterinsights.v1.AnalysisRule.encode(message.analysisRules[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 GetViewRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetViewRequest.verify|verify} messages. + * Encodes the specified ListAnalysisRulesResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListAnalysisRulesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.GetViewRequest + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysisRulesResponse * @static - * @param {google.cloud.contactcenterinsights.v1.IGetViewRequest} message GetViewRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IListAnalysisRulesResponse} message ListAnalysisRulesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetViewRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListAnalysisRulesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetViewRequest message from the specified reader or buffer. + * Decodes a ListAnalysisRulesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.GetViewRequest + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysisRulesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.GetViewRequest} GetViewRequest + * @returns {google.cloud.contactcenterinsights.v1.ListAnalysisRulesResponse} ListAnalysisRulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetViewRequest.decode = function decode(reader, length) { + ListAnalysisRulesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.GetViewRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListAnalysisRulesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.analysisRules && message.analysisRules.length)) + message.analysisRules = []; + message.analysisRules.push($root.google.cloud.contactcenterinsights.v1.AnalysisRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); break; } default: @@ -20652,124 +21691,148 @@ }; /** - * Decodes a GetViewRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAnalysisRulesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.GetViewRequest + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysisRulesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.GetViewRequest} GetViewRequest + * @returns {google.cloud.contactcenterinsights.v1.ListAnalysisRulesResponse} ListAnalysisRulesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetViewRequest.decodeDelimited = function decodeDelimited(reader) { + ListAnalysisRulesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetViewRequest message. + * Verifies a ListAnalysisRulesResponse message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.GetViewRequest + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysisRulesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetViewRequest.verify = function verify(message) { + ListAnalysisRulesResponse.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.analysisRules != null && message.hasOwnProperty("analysisRules")) { + if (!Array.isArray(message.analysisRules)) + return "analysisRules: array expected"; + for (var i = 0; i < message.analysisRules.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.AnalysisRule.verify(message.analysisRules[i]); + if (error) + return "analysisRules." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a GetViewRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAnalysisRulesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.GetViewRequest + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysisRulesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.GetViewRequest} GetViewRequest + * @returns {google.cloud.contactcenterinsights.v1.ListAnalysisRulesResponse} ListAnalysisRulesResponse */ - GetViewRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.GetViewRequest) + ListAnalysisRulesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListAnalysisRulesResponse) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.GetViewRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.contactcenterinsights.v1.ListAnalysisRulesResponse(); + if (object.analysisRules) { + if (!Array.isArray(object.analysisRules)) + throw TypeError(".google.cloud.contactcenterinsights.v1.ListAnalysisRulesResponse.analysisRules: array expected"); + message.analysisRules = []; + for (var i = 0; i < object.analysisRules.length; ++i) { + if (typeof object.analysisRules[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ListAnalysisRulesResponse.analysisRules: object expected"); + message.analysisRules[i] = $root.google.cloud.contactcenterinsights.v1.AnalysisRule.fromObject(object.analysisRules[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a GetViewRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListAnalysisRulesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.GetViewRequest + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysisRulesResponse * @static - * @param {google.cloud.contactcenterinsights.v1.GetViewRequest} message GetViewRequest + * @param {google.cloud.contactcenterinsights.v1.ListAnalysisRulesResponse} message ListAnalysisRulesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetViewRequest.toObject = function toObject(message, options) { + ListAnalysisRulesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.analysisRules = []; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.nextPageToken = ""; + if (message.analysisRules && message.analysisRules.length) { + object.analysisRules = []; + for (var j = 0; j < message.analysisRules.length; ++j) + object.analysisRules[j] = $root.google.cloud.contactcenterinsights.v1.AnalysisRule.toObject(message.analysisRules[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this GetViewRequest to JSON. + * Converts this ListAnalysisRulesResponse to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.GetViewRequest + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysisRulesResponse * @instance * @returns {Object.} JSON object */ - GetViewRequest.prototype.toJSON = function toJSON() { + ListAnalysisRulesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetViewRequest + * Gets the default type url for ListAnalysisRulesResponse * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.GetViewRequest + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysisRulesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListAnalysisRulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.GetViewRequest"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListAnalysisRulesResponse"; }; - return GetViewRequest; + return ListAnalysisRulesResponse; })(); - v1.ListViewsRequest = (function() { + v1.GetEncryptionSpecRequest = (function() { /** - * Properties of a ListViewsRequest. + * Properties of a GetEncryptionSpecRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IListViewsRequest - * @property {string|null} [parent] ListViewsRequest parent - * @property {number|null} [pageSize] ListViewsRequest pageSize - * @property {string|null} [pageToken] ListViewsRequest pageToken + * @interface IGetEncryptionSpecRequest + * @property {string|null} [name] GetEncryptionSpecRequest name */ /** - * Constructs a new ListViewsRequest. + * Constructs a new GetEncryptionSpecRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a ListViewsRequest. - * @implements IListViewsRequest + * @classdesc Represents a GetEncryptionSpecRequest. + * @implements IGetEncryptionSpecRequest * @constructor - * @param {google.cloud.contactcenterinsights.v1.IListViewsRequest=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest=} [properties] Properties to set */ - function ListViewsRequest(properties) { + function GetEncryptionSpecRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20777,103 +21840,75 @@ } /** - * ListViewsRequest parent. - * @member {string} parent - * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest - * @instance - */ - ListViewsRequest.prototype.parent = ""; - - /** - * ListViewsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest - * @instance - */ - ListViewsRequest.prototype.pageSize = 0; - - /** - * ListViewsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest + * GetEncryptionSpecRequest name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest * @instance */ - ListViewsRequest.prototype.pageToken = ""; + GetEncryptionSpecRequest.prototype.name = ""; /** - * Creates a new ListViewsRequest instance using the specified properties. + * Creates a new GetEncryptionSpecRequest instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest + * @memberof google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IListViewsRequest=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.ListViewsRequest} ListViewsRequest instance + * @param {google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest} GetEncryptionSpecRequest instance */ - ListViewsRequest.create = function create(properties) { - return new ListViewsRequest(properties); + GetEncryptionSpecRequest.create = function create(properties) { + return new GetEncryptionSpecRequest(properties); }; /** - * Encodes the specified ListViewsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListViewsRequest.verify|verify} messages. + * Encodes the specified GetEncryptionSpecRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest + * @memberof google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IListViewsRequest} message ListViewsRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest} message GetEncryptionSpecRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListViewsRequest.encode = function encode(message, writer) { + GetEncryptionSpecRequest.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 ListViewsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListViewsRequest.verify|verify} messages. + * Encodes the specified GetEncryptionSpecRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest + * @memberof google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IListViewsRequest} message ListViewsRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest} message GetEncryptionSpecRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListViewsRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetEncryptionSpecRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListViewsRequest message from the specified reader or buffer. + * Decodes a GetEncryptionSpecRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest + * @memberof google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.ListViewsRequest} ListViewsRequest + * @returns {google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest} GetEncryptionSpecRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListViewsRequest.decode = function decode(reader, length) { + GetEncryptionSpecRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListViewsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest(); 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: @@ -20885,141 +21920,122 @@ }; /** - * Decodes a ListViewsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetEncryptionSpecRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest + * @memberof google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.ListViewsRequest} ListViewsRequest + * @returns {google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest} GetEncryptionSpecRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListViewsRequest.decodeDelimited = function decodeDelimited(reader) { + GetEncryptionSpecRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListViewsRequest message. + * Verifies a GetEncryptionSpecRequest message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest + * @memberof google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListViewsRequest.verify = function verify(message) { + GetEncryptionSpecRequest.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 ListViewsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetEncryptionSpecRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest + * @memberof google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.ListViewsRequest} ListViewsRequest + * @returns {google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest} GetEncryptionSpecRequest */ - ListViewsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListViewsRequest) + GetEncryptionSpecRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.ListViewsRequest(); - 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.contactcenterinsights.v1.GetEncryptionSpecRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListViewsRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetEncryptionSpecRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest + * @memberof google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest * @static - * @param {google.cloud.contactcenterinsights.v1.ListViewsRequest} message ListViewsRequest + * @param {google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest} message GetEncryptionSpecRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListViewsRequest.toObject = function toObject(message, options) { + GetEncryptionSpecRequest.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 ListViewsRequest to JSON. + * Converts this GetEncryptionSpecRequest to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest + * @memberof google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest * @instance * @returns {Object.} JSON object */ - ListViewsRequest.prototype.toJSON = function toJSON() { + GetEncryptionSpecRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListViewsRequest + * Gets the default type url for GetEncryptionSpecRequest * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest + * @memberof google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListViewsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetEncryptionSpecRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListViewsRequest"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest"; }; - return ListViewsRequest; + return GetEncryptionSpecRequest; })(); - v1.ListViewsResponse = (function() { + v1.InitializeEncryptionSpecRequest = (function() { /** - * Properties of a ListViewsResponse. + * Properties of an InitializeEncryptionSpecRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IListViewsResponse - * @property {Array.|null} [views] ListViewsResponse views - * @property {string|null} [nextPageToken] ListViewsResponse nextPageToken + * @interface IInitializeEncryptionSpecRequest + * @property {google.cloud.contactcenterinsights.v1.IEncryptionSpec|null} [encryptionSpec] InitializeEncryptionSpecRequest encryptionSpec */ /** - * Constructs a new ListViewsResponse. + * Constructs a new InitializeEncryptionSpecRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a ListViewsResponse. - * @implements IListViewsResponse + * @classdesc Represents an InitializeEncryptionSpecRequest. + * @implements IInitializeEncryptionSpecRequest * @constructor - * @param {google.cloud.contactcenterinsights.v1.IListViewsResponse=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest=} [properties] Properties to set */ - function ListViewsResponse(properties) { - this.views = []; + function InitializeEncryptionSpecRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21027,92 +22043,75 @@ } /** - * ListViewsResponse views. - * @member {Array.} views - * @memberof google.cloud.contactcenterinsights.v1.ListViewsResponse - * @instance - */ - ListViewsResponse.prototype.views = $util.emptyArray; - - /** - * ListViewsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.contactcenterinsights.v1.ListViewsResponse + * InitializeEncryptionSpecRequest encryptionSpec. + * @member {google.cloud.contactcenterinsights.v1.IEncryptionSpec|null|undefined} encryptionSpec + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest * @instance */ - ListViewsResponse.prototype.nextPageToken = ""; + InitializeEncryptionSpecRequest.prototype.encryptionSpec = null; /** - * Creates a new ListViewsResponse instance using the specified properties. + * Creates a new InitializeEncryptionSpecRequest instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.ListViewsResponse + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IListViewsResponse=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.ListViewsResponse} ListViewsResponse instance + * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest} InitializeEncryptionSpecRequest instance */ - ListViewsResponse.create = function create(properties) { - return new ListViewsResponse(properties); + InitializeEncryptionSpecRequest.create = function create(properties) { + return new InitializeEncryptionSpecRequest(properties); }; /** - * Encodes the specified ListViewsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListViewsResponse.verify|verify} messages. + * Encodes the specified InitializeEncryptionSpecRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.ListViewsResponse + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IListViewsResponse} message ListViewsResponse message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest} message InitializeEncryptionSpecRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListViewsResponse.encode = function encode(message, writer) { + InitializeEncryptionSpecRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.views != null && message.views.length) - for (var i = 0; i < message.views.length; ++i) - $root.google.cloud.contactcenterinsights.v1.View.encode(message.views[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.encryptionSpec != null && Object.hasOwnProperty.call(message, "encryptionSpec")) + $root.google.cloud.contactcenterinsights.v1.EncryptionSpec.encode(message.encryptionSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListViewsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListViewsResponse.verify|verify} messages. + * Encodes the specified InitializeEncryptionSpecRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.ListViewsResponse + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IListViewsResponse} message ListViewsResponse message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest} message InitializeEncryptionSpecRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListViewsResponse.encodeDelimited = function encodeDelimited(message, writer) { + InitializeEncryptionSpecRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListViewsResponse message from the specified reader or buffer. + * Decodes an InitializeEncryptionSpecRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.ListViewsResponse + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.ListViewsResponse} ListViewsResponse + * @returns {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest} InitializeEncryptionSpecRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListViewsResponse.decode = function decode(reader, length) { + InitializeEncryptionSpecRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListViewsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.views && message.views.length)) - message.views = []; - message.views.push($root.google.cloud.contactcenterinsights.v1.View.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); + message.encryptionSpec = $root.google.cloud.contactcenterinsights.v1.EncryptionSpec.decode(reader, reader.uint32()); break; } default: @@ -21124,149 +22123,126 @@ }; /** - * Decodes a ListViewsResponse message from the specified reader or buffer, length delimited. + * Decodes an InitializeEncryptionSpecRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.ListViewsResponse + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.ListViewsResponse} ListViewsResponse + * @returns {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest} InitializeEncryptionSpecRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListViewsResponse.decodeDelimited = function decodeDelimited(reader) { + InitializeEncryptionSpecRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListViewsResponse message. + * Verifies an InitializeEncryptionSpecRequest message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.ListViewsResponse + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListViewsResponse.verify = function verify(message) { + InitializeEncryptionSpecRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.views != null && message.hasOwnProperty("views")) { - if (!Array.isArray(message.views)) - return "views: array expected"; - for (var i = 0; i < message.views.length; ++i) { - var error = $root.google.cloud.contactcenterinsights.v1.View.verify(message.views[i]); - if (error) - return "views." + error; - } + if (message.encryptionSpec != null && message.hasOwnProperty("encryptionSpec")) { + var error = $root.google.cloud.contactcenterinsights.v1.EncryptionSpec.verify(message.encryptionSpec); + if (error) + return "encryptionSpec." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListViewsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an InitializeEncryptionSpecRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.ListViewsResponse + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.ListViewsResponse} ListViewsResponse + * @returns {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest} InitializeEncryptionSpecRequest */ - ListViewsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListViewsResponse) + InitializeEncryptionSpecRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.ListViewsResponse(); - if (object.views) { - if (!Array.isArray(object.views)) - throw TypeError(".google.cloud.contactcenterinsights.v1.ListViewsResponse.views: array expected"); - message.views = []; - for (var i = 0; i < object.views.length; ++i) { - if (typeof object.views[i] !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.ListViewsResponse.views: object expected"); - message.views[i] = $root.google.cloud.contactcenterinsights.v1.View.fromObject(object.views[i]); - } + var message = new $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest(); + if (object.encryptionSpec != null) { + if (typeof object.encryptionSpec !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest.encryptionSpec: object expected"); + message.encryptionSpec = $root.google.cloud.contactcenterinsights.v1.EncryptionSpec.fromObject(object.encryptionSpec); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListViewsResponse message. Also converts values to other types if specified. + * Creates a plain object from an InitializeEncryptionSpecRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.ListViewsResponse + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest * @static - * @param {google.cloud.contactcenterinsights.v1.ListViewsResponse} message ListViewsResponse + * @param {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest} message InitializeEncryptionSpecRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListViewsResponse.toObject = function toObject(message, options) { + InitializeEncryptionSpecRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.views = []; if (options.defaults) - object.nextPageToken = ""; - if (message.views && message.views.length) { - object.views = []; - for (var j = 0; j < message.views.length; ++j) - object.views[j] = $root.google.cloud.contactcenterinsights.v1.View.toObject(message.views[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + object.encryptionSpec = null; + if (message.encryptionSpec != null && message.hasOwnProperty("encryptionSpec")) + object.encryptionSpec = $root.google.cloud.contactcenterinsights.v1.EncryptionSpec.toObject(message.encryptionSpec, options); return object; }; /** - * Converts this ListViewsResponse to JSON. + * Converts this InitializeEncryptionSpecRequest to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.ListViewsResponse + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest * @instance * @returns {Object.} JSON object */ - ListViewsResponse.prototype.toJSON = function toJSON() { + InitializeEncryptionSpecRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListViewsResponse + * Gets the default type url for InitializeEncryptionSpecRequest * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.ListViewsResponse + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListViewsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + InitializeEncryptionSpecRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListViewsResponse"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest"; }; - return ListViewsResponse; + return InitializeEncryptionSpecRequest; })(); - v1.UpdateViewRequest = (function() { + v1.InitializeEncryptionSpecResponse = (function() { /** - * Properties of an UpdateViewRequest. + * Properties of an InitializeEncryptionSpecResponse. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IUpdateViewRequest - * @property {google.cloud.contactcenterinsights.v1.IView|null} [view] UpdateViewRequest view - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateViewRequest updateMask + * @interface IInitializeEncryptionSpecResponse */ /** - * Constructs a new UpdateViewRequest. + * Constructs a new InitializeEncryptionSpecResponse. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents an UpdateViewRequest. - * @implements IUpdateViewRequest + * @classdesc Represents an InitializeEncryptionSpecResponse. + * @implements IInitializeEncryptionSpecResponse * @constructor - * @param {google.cloud.contactcenterinsights.v1.IUpdateViewRequest=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse=} [properties] Properties to set */ - function UpdateViewRequest(properties) { + function InitializeEncryptionSpecResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21274,91 +22250,63 @@ } /** - * UpdateViewRequest view. - * @member {google.cloud.contactcenterinsights.v1.IView|null|undefined} view - * @memberof google.cloud.contactcenterinsights.v1.UpdateViewRequest - * @instance - */ - UpdateViewRequest.prototype.view = null; - - /** - * UpdateViewRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.contactcenterinsights.v1.UpdateViewRequest - * @instance - */ - UpdateViewRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateViewRequest instance using the specified properties. + * Creates a new InitializeEncryptionSpecResponse instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.UpdateViewRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse * @static - * @param {google.cloud.contactcenterinsights.v1.IUpdateViewRequest=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.UpdateViewRequest} UpdateViewRequest instance + * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse} InitializeEncryptionSpecResponse instance */ - UpdateViewRequest.create = function create(properties) { - return new UpdateViewRequest(properties); + InitializeEncryptionSpecResponse.create = function create(properties) { + return new InitializeEncryptionSpecResponse(properties); }; /** - * Encodes the specified UpdateViewRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateViewRequest.verify|verify} messages. + * Encodes the specified InitializeEncryptionSpecResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.UpdateViewRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse * @static - * @param {google.cloud.contactcenterinsights.v1.IUpdateViewRequest} message UpdateViewRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse} message InitializeEncryptionSpecResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateViewRequest.encode = function encode(message, writer) { + InitializeEncryptionSpecResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - $root.google.cloud.contactcenterinsights.v1.View.encode(message.view, 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 UpdateViewRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateViewRequest.verify|verify} messages. + * Encodes the specified InitializeEncryptionSpecResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.UpdateViewRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse * @static - * @param {google.cloud.contactcenterinsights.v1.IUpdateViewRequest} message UpdateViewRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse} message InitializeEncryptionSpecResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateViewRequest.encodeDelimited = function encodeDelimited(message, writer) { + InitializeEncryptionSpecResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateViewRequest message from the specified reader or buffer. + * Decodes an InitializeEncryptionSpecResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.UpdateViewRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.UpdateViewRequest} UpdateViewRequest + * @returns {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse} InitializeEncryptionSpecResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateViewRequest.decode = function decode(reader, length) { + InitializeEncryptionSpecResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.UpdateViewRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.view = $root.google.cloud.contactcenterinsights.v1.View.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } default: reader.skipType(tag & 7); break; @@ -21368,141 +22316,113 @@ }; /** - * Decodes an UpdateViewRequest message from the specified reader or buffer, length delimited. + * Decodes an InitializeEncryptionSpecResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.UpdateViewRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.UpdateViewRequest} UpdateViewRequest + * @returns {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse} InitializeEncryptionSpecResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateViewRequest.decodeDelimited = function decodeDelimited(reader) { + InitializeEncryptionSpecResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateViewRequest message. + * Verifies an InitializeEncryptionSpecResponse message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.UpdateViewRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateViewRequest.verify = function verify(message) { + InitializeEncryptionSpecResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.view != null && message.hasOwnProperty("view")) { - var error = $root.google.cloud.contactcenterinsights.v1.View.verify(message.view); - if (error) - return "view." + 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 UpdateViewRequest message from a plain object. Also converts values to their respective internal types. + * Creates an InitializeEncryptionSpecResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.UpdateViewRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.UpdateViewRequest} UpdateViewRequest + * @returns {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse} InitializeEncryptionSpecResponse */ - UpdateViewRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.UpdateViewRequest) + InitializeEncryptionSpecResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.UpdateViewRequest(); - if (object.view != null) { - if (typeof object.view !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.UpdateViewRequest.view: object expected"); - message.view = $root.google.cloud.contactcenterinsights.v1.View.fromObject(object.view); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.UpdateViewRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; + return new $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse(); }; /** - * Creates a plain object from an UpdateViewRequest message. Also converts values to other types if specified. + * Creates a plain object from an InitializeEncryptionSpecResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.UpdateViewRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse * @static - * @param {google.cloud.contactcenterinsights.v1.UpdateViewRequest} message UpdateViewRequest + * @param {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse} message InitializeEncryptionSpecResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateViewRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.view = null; - object.updateMask = null; - } - if (message.view != null && message.hasOwnProperty("view")) - object.view = $root.google.cloud.contactcenterinsights.v1.View.toObject(message.view, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; + InitializeEncryptionSpecResponse.toObject = function toObject() { + return {}; }; /** - * Converts this UpdateViewRequest to JSON. + * Converts this InitializeEncryptionSpecResponse to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.UpdateViewRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse * @instance * @returns {Object.} JSON object */ - UpdateViewRequest.prototype.toJSON = function toJSON() { + InitializeEncryptionSpecResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateViewRequest + * Gets the default type url for InitializeEncryptionSpecResponse * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.UpdateViewRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + InitializeEncryptionSpecResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.UpdateViewRequest"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse"; }; - return UpdateViewRequest; + return InitializeEncryptionSpecResponse; })(); - v1.DeleteViewRequest = (function() { + v1.InitializeEncryptionSpecMetadata = (function() { /** - * Properties of a DeleteViewRequest. + * Properties of an InitializeEncryptionSpecMetadata. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IDeleteViewRequest - * @property {string|null} [name] DeleteViewRequest name + * @interface IInitializeEncryptionSpecMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] InitializeEncryptionSpecMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] InitializeEncryptionSpecMetadata endTime + * @property {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest|null} [request] InitializeEncryptionSpecMetadata request + * @property {Array.|null} [partialErrors] InitializeEncryptionSpecMetadata partialErrors */ /** - * Constructs a new DeleteViewRequest. + * Constructs a new InitializeEncryptionSpecMetadata. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a DeleteViewRequest. - * @implements IDeleteViewRequest + * @classdesc Represents an InitializeEncryptionSpecMetadata. + * @implements IInitializeEncryptionSpecMetadata * @constructor - * @param {google.cloud.contactcenterinsights.v1.IDeleteViewRequest=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata=} [properties] Properties to set */ - function DeleteViewRequest(properties) { + function InitializeEncryptionSpecMetadata(properties) { + this.partialErrors = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21510,75 +22430,120 @@ } /** - * DeleteViewRequest name. - * @member {string} name - * @memberof google.cloud.contactcenterinsights.v1.DeleteViewRequest + * InitializeEncryptionSpecMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata * @instance */ - DeleteViewRequest.prototype.name = ""; + InitializeEncryptionSpecMetadata.prototype.createTime = null; /** - * Creates a new DeleteViewRequest instance using the specified properties. + * InitializeEncryptionSpecMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata + * @instance + */ + InitializeEncryptionSpecMetadata.prototype.endTime = null; + + /** + * InitializeEncryptionSpecMetadata request. + * @member {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest|null|undefined} request + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata + * @instance + */ + InitializeEncryptionSpecMetadata.prototype.request = null; + + /** + * InitializeEncryptionSpecMetadata partialErrors. + * @member {Array.} partialErrors + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata + * @instance + */ + InitializeEncryptionSpecMetadata.prototype.partialErrors = $util.emptyArray; + + /** + * Creates a new InitializeEncryptionSpecMetadata instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.DeleteViewRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata * @static - * @param {google.cloud.contactcenterinsights.v1.IDeleteViewRequest=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.DeleteViewRequest} DeleteViewRequest instance + * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata} InitializeEncryptionSpecMetadata instance */ - DeleteViewRequest.create = function create(properties) { - return new DeleteViewRequest(properties); + InitializeEncryptionSpecMetadata.create = function create(properties) { + return new InitializeEncryptionSpecMetadata(properties); }; /** - * Encodes the specified DeleteViewRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteViewRequest.verify|verify} messages. + * Encodes the specified InitializeEncryptionSpecMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.DeleteViewRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata * @static - * @param {google.cloud.contactcenterinsights.v1.IDeleteViewRequest} message DeleteViewRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata} message InitializeEncryptionSpecMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteViewRequest.encode = function encode(message, writer) { + InitializeEncryptionSpecMetadata.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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.request != null && Object.hasOwnProperty.call(message, "request")) + $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest.encode(message.request, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.partialErrors != null && message.partialErrors.length) + for (var i = 0; i < message.partialErrors.length; ++i) + $root.google.rpc.Status.encode(message.partialErrors[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified DeleteViewRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteViewRequest.verify|verify} messages. + * Encodes the specified InitializeEncryptionSpecMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.DeleteViewRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata * @static - * @param {google.cloud.contactcenterinsights.v1.IDeleteViewRequest} message DeleteViewRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata} message InitializeEncryptionSpecMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteViewRequest.encodeDelimited = function encodeDelimited(message, writer) { + InitializeEncryptionSpecMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteViewRequest message from the specified reader or buffer. + * Decodes an InitializeEncryptionSpecMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.DeleteViewRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.DeleteViewRequest} DeleteViewRequest + * @returns {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata} InitializeEncryptionSpecMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteViewRequest.decode = function decode(reader, length) { + InitializeEncryptionSpecMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.DeleteViewRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.request = $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.partialErrors && message.partialErrors.length)) + message.partialErrors = []; + message.partialErrors.push($root.google.rpc.Status.decode(reader, reader.uint32())); break; } default: @@ -21590,146 +22555,181 @@ }; /** - * Decodes a DeleteViewRequest message from the specified reader or buffer, length delimited. + * Decodes an InitializeEncryptionSpecMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.DeleteViewRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.DeleteViewRequest} DeleteViewRequest + * @returns {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata} InitializeEncryptionSpecMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteViewRequest.decodeDelimited = function decodeDelimited(reader) { + InitializeEncryptionSpecMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteViewRequest message. + * Verifies an InitializeEncryptionSpecMetadata message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.DeleteViewRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteViewRequest.verify = function verify(message) { + InitializeEncryptionSpecMetadata.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.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.request != null && message.hasOwnProperty("request")) { + var error = $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest.verify(message.request); + if (error) + return "request." + error; + } + if (message.partialErrors != null && message.hasOwnProperty("partialErrors")) { + if (!Array.isArray(message.partialErrors)) + return "partialErrors: array expected"; + for (var i = 0; i < message.partialErrors.length; ++i) { + var error = $root.google.rpc.Status.verify(message.partialErrors[i]); + if (error) + return "partialErrors." + error; + } + } return null; }; /** - * Creates a DeleteViewRequest message from a plain object. Also converts values to their respective internal types. + * Creates an InitializeEncryptionSpecMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.DeleteViewRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.DeleteViewRequest} DeleteViewRequest + * @returns {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata} InitializeEncryptionSpecMetadata */ - DeleteViewRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.DeleteViewRequest) + InitializeEncryptionSpecMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.DeleteViewRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.request != null) { + if (typeof object.request !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata.request: object expected"); + message.request = $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest.fromObject(object.request); + } + if (object.partialErrors) { + if (!Array.isArray(object.partialErrors)) + throw TypeError(".google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata.partialErrors: array expected"); + message.partialErrors = []; + for (var i = 0; i < object.partialErrors.length; ++i) { + if (typeof object.partialErrors[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata.partialErrors: object expected"); + message.partialErrors[i] = $root.google.rpc.Status.fromObject(object.partialErrors[i]); + } + } return message; }; /** - * Creates a plain object from a DeleteViewRequest message. Also converts values to other types if specified. + * Creates a plain object from an InitializeEncryptionSpecMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.DeleteViewRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata * @static - * @param {google.cloud.contactcenterinsights.v1.DeleteViewRequest} message DeleteViewRequest + * @param {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata} message InitializeEncryptionSpecMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteViewRequest.toObject = function toObject(message, options) { + InitializeEncryptionSpecMetadata.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.partialErrors = []; + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.request = null; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.request != null && message.hasOwnProperty("request")) + object.request = $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest.toObject(message.request, options); + if (message.partialErrors && message.partialErrors.length) { + object.partialErrors = []; + for (var j = 0; j < message.partialErrors.length; ++j) + object.partialErrors[j] = $root.google.rpc.Status.toObject(message.partialErrors[j], options); + } return object; }; /** - * Converts this DeleteViewRequest to JSON. + * Converts this InitializeEncryptionSpecMetadata to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.DeleteViewRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata * @instance * @returns {Object.} JSON object */ - DeleteViewRequest.prototype.toJSON = function toJSON() { + InitializeEncryptionSpecMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteViewRequest + * Gets the default type url for InitializeEncryptionSpecMetadata * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.DeleteViewRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + InitializeEncryptionSpecMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.DeleteViewRequest"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata"; }; - return DeleteViewRequest; + return InitializeEncryptionSpecMetadata; })(); - v1.Conversation = (function() { + v1.CreateViewRequest = (function() { /** - * Properties of a Conversation. + * Properties of a CreateViewRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IConversation - * @property {google.cloud.contactcenterinsights.v1.Conversation.ICallMetadata|null} [callMetadata] Conversation callMetadata - * @property {google.protobuf.ITimestamp|null} [expireTime] Conversation expireTime - * @property {google.protobuf.IDuration|null} [ttl] Conversation ttl - * @property {string|null} [name] Conversation name - * @property {google.cloud.contactcenterinsights.v1.IConversationDataSource|null} [dataSource] Conversation dataSource - * @property {google.protobuf.ITimestamp|null} [createTime] Conversation createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Conversation updateTime - * @property {google.protobuf.ITimestamp|null} [startTime] Conversation startTime - * @property {string|null} [languageCode] Conversation languageCode - * @property {string|null} [agentId] Conversation agentId - * @property {Object.|null} [labels] Conversation labels - * @property {google.cloud.contactcenterinsights.v1.Conversation.IQualityMetadata|null} [qualityMetadata] Conversation qualityMetadata - * @property {string|null} [metadataJson] Conversation metadataJson - * @property {google.cloud.contactcenterinsights.v1.Conversation.ITranscript|null} [transcript] Conversation transcript - * @property {google.cloud.contactcenterinsights.v1.Conversation.Medium|null} [medium] Conversation medium - * @property {google.protobuf.IDuration|null} [duration] Conversation duration - * @property {number|null} [turnCount] Conversation turnCount - * @property {google.cloud.contactcenterinsights.v1.IAnalysis|null} [latestAnalysis] Conversation latestAnalysis - * @property {google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData|null} [latestSummary] Conversation latestSummary - * @property {Array.|null} [runtimeAnnotations] Conversation runtimeAnnotations - * @property {Object.|null} [dialogflowIntents] Conversation dialogflowIntents - * @property {string|null} [obfuscatedUserId] Conversation obfuscatedUserId + * @interface ICreateViewRequest + * @property {string|null} [parent] CreateViewRequest parent + * @property {google.cloud.contactcenterinsights.v1.IView|null} [view] CreateViewRequest view */ /** - * Constructs a new Conversation. + * Constructs a new CreateViewRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a Conversation. - * @implements IConversation + * @classdesc Represents a CreateViewRequest. + * @implements ICreateViewRequest * @constructor - * @param {google.cloud.contactcenterinsights.v1.IConversation=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.ICreateViewRequest=} [properties] Properties to set */ - function Conversation(properties) { - this.labels = {}; - this.runtimeAnnotations = []; - this.dialogflowIntents = {}; + function CreateViewRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21737,441 +22737,308 @@ } /** - * Conversation callMetadata. - * @member {google.cloud.contactcenterinsights.v1.Conversation.ICallMetadata|null|undefined} callMetadata - * @memberof google.cloud.contactcenterinsights.v1.Conversation + * CreateViewRequest parent. + * @member {string} parent + * @memberof google.cloud.contactcenterinsights.v1.CreateViewRequest * @instance */ - Conversation.prototype.callMetadata = null; + CreateViewRequest.prototype.parent = ""; /** - * Conversation expireTime. - * @member {google.protobuf.ITimestamp|null|undefined} expireTime - * @memberof google.cloud.contactcenterinsights.v1.Conversation + * CreateViewRequest view. + * @member {google.cloud.contactcenterinsights.v1.IView|null|undefined} view + * @memberof google.cloud.contactcenterinsights.v1.CreateViewRequest * @instance */ - Conversation.prototype.expireTime = null; + CreateViewRequest.prototype.view = null; /** - * Conversation ttl. - * @member {google.protobuf.IDuration|null|undefined} ttl - * @memberof google.cloud.contactcenterinsights.v1.Conversation - * @instance + * Creates a new CreateViewRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.CreateViewRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreateViewRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.CreateViewRequest} CreateViewRequest instance */ - Conversation.prototype.ttl = null; + CreateViewRequest.create = function create(properties) { + return new CreateViewRequest(properties); + }; /** - * Conversation name. - * @member {string} name - * @memberof google.cloud.contactcenterinsights.v1.Conversation - * @instance + * Encodes the specified CreateViewRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateViewRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.CreateViewRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreateViewRequest} message CreateViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Conversation.prototype.name = ""; - - /** - * Conversation dataSource. - * @member {google.cloud.contactcenterinsights.v1.IConversationDataSource|null|undefined} dataSource - * @memberof google.cloud.contactcenterinsights.v1.Conversation - * @instance - */ - Conversation.prototype.dataSource = null; - - /** - * Conversation createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.contactcenterinsights.v1.Conversation - * @instance - */ - Conversation.prototype.createTime = null; - - /** - * Conversation updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.contactcenterinsights.v1.Conversation - * @instance - */ - Conversation.prototype.updateTime = null; - - /** - * Conversation startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.contactcenterinsights.v1.Conversation - * @instance - */ - Conversation.prototype.startTime = null; - - /** - * Conversation languageCode. - * @member {string} languageCode - * @memberof google.cloud.contactcenterinsights.v1.Conversation - * @instance - */ - Conversation.prototype.languageCode = ""; - - /** - * Conversation agentId. - * @member {string} agentId - * @memberof google.cloud.contactcenterinsights.v1.Conversation - * @instance - */ - Conversation.prototype.agentId = ""; - - /** - * Conversation labels. - * @member {Object.} labels - * @memberof google.cloud.contactcenterinsights.v1.Conversation - * @instance - */ - Conversation.prototype.labels = $util.emptyObject; + CreateViewRequest.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.view != null && Object.hasOwnProperty.call(message, "view")) + $root.google.cloud.contactcenterinsights.v1.View.encode(message.view, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; /** - * Conversation qualityMetadata. - * @member {google.cloud.contactcenterinsights.v1.Conversation.IQualityMetadata|null|undefined} qualityMetadata - * @memberof google.cloud.contactcenterinsights.v1.Conversation - * @instance + * Encodes the specified CreateViewRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateViewRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CreateViewRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreateViewRequest} message CreateViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Conversation.prototype.qualityMetadata = null; + CreateViewRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Conversation metadataJson. - * @member {string} metadataJson - * @memberof google.cloud.contactcenterinsights.v1.Conversation - * @instance + * Decodes a CreateViewRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.CreateViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.CreateViewRequest} CreateViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Conversation.prototype.metadataJson = ""; + CreateViewRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.CreateViewRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.view = $root.google.cloud.contactcenterinsights.v1.View.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Conversation transcript. - * @member {google.cloud.contactcenterinsights.v1.Conversation.ITranscript|null|undefined} transcript - * @memberof google.cloud.contactcenterinsights.v1.Conversation - * @instance + * Decodes a CreateViewRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CreateViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.CreateViewRequest} CreateViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Conversation.prototype.transcript = null; + CreateViewRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Conversation medium. - * @member {google.cloud.contactcenterinsights.v1.Conversation.Medium} medium - * @memberof google.cloud.contactcenterinsights.v1.Conversation - * @instance + * Verifies a CreateViewRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.CreateViewRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Conversation.prototype.medium = 0; + CreateViewRequest.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.view != null && message.hasOwnProperty("view")) { + var error = $root.google.cloud.contactcenterinsights.v1.View.verify(message.view); + if (error) + return "view." + error; + } + return null; + }; /** - * Conversation duration. - * @member {google.protobuf.IDuration|null|undefined} duration - * @memberof google.cloud.contactcenterinsights.v1.Conversation - * @instance + * Creates a CreateViewRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.CreateViewRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.CreateViewRequest} CreateViewRequest */ - Conversation.prototype.duration = null; + CreateViewRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.CreateViewRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.CreateViewRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.view != null) { + if (typeof object.view !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CreateViewRequest.view: object expected"); + message.view = $root.google.cloud.contactcenterinsights.v1.View.fromObject(object.view); + } + return message; + }; /** - * Conversation turnCount. - * @member {number} turnCount - * @memberof google.cloud.contactcenterinsights.v1.Conversation - * @instance + * Creates a plain object from a CreateViewRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.CreateViewRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.CreateViewRequest} message CreateViewRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Conversation.prototype.turnCount = 0; + CreateViewRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.view = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.view != null && message.hasOwnProperty("view")) + object.view = $root.google.cloud.contactcenterinsights.v1.View.toObject(message.view, options); + return object; + }; /** - * Conversation latestAnalysis. - * @member {google.cloud.contactcenterinsights.v1.IAnalysis|null|undefined} latestAnalysis - * @memberof google.cloud.contactcenterinsights.v1.Conversation + * Converts this CreateViewRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.CreateViewRequest * @instance + * @returns {Object.} JSON object */ - Conversation.prototype.latestAnalysis = null; + CreateViewRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Conversation latestSummary. - * @member {google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData|null|undefined} latestSummary - * @memberof google.cloud.contactcenterinsights.v1.Conversation - * @instance + * Gets the default type url for CreateViewRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.CreateViewRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - Conversation.prototype.latestSummary = null; + CreateViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.CreateViewRequest"; + }; - /** - * Conversation runtimeAnnotations. - * @member {Array.} runtimeAnnotations - * @memberof google.cloud.contactcenterinsights.v1.Conversation - * @instance - */ - Conversation.prototype.runtimeAnnotations = $util.emptyArray; + return CreateViewRequest; + })(); - /** - * Conversation dialogflowIntents. - * @member {Object.} dialogflowIntents - * @memberof google.cloud.contactcenterinsights.v1.Conversation - * @instance - */ - Conversation.prototype.dialogflowIntents = $util.emptyObject; + v1.GetViewRequest = (function() { /** - * Conversation obfuscatedUserId. - * @member {string} obfuscatedUserId - * @memberof google.cloud.contactcenterinsights.v1.Conversation - * @instance + * Properties of a GetViewRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IGetViewRequest + * @property {string|null} [name] GetViewRequest name */ - Conversation.prototype.obfuscatedUserId = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; /** - * Conversation metadata. - * @member {"callMetadata"|undefined} metadata - * @memberof google.cloud.contactcenterinsights.v1.Conversation - * @instance + * Constructs a new GetViewRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a GetViewRequest. + * @implements IGetViewRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IGetViewRequest=} [properties] Properties to set */ - Object.defineProperty(Conversation.prototype, "metadata", { - get: $util.oneOfGetter($oneOfFields = ["callMetadata"]), - set: $util.oneOfSetter($oneOfFields) - }); + function GetViewRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Conversation expiration. - * @member {"expireTime"|"ttl"|undefined} expiration - * @memberof google.cloud.contactcenterinsights.v1.Conversation + * GetViewRequest name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.GetViewRequest * @instance */ - Object.defineProperty(Conversation.prototype, "expiration", { - get: $util.oneOfGetter($oneOfFields = ["expireTime", "ttl"]), - set: $util.oneOfSetter($oneOfFields) - }); + GetViewRequest.prototype.name = ""; /** - * Creates a new Conversation instance using the specified properties. + * Creates a new GetViewRequest instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @memberof google.cloud.contactcenterinsights.v1.GetViewRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IConversation=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.Conversation} Conversation instance + * @param {google.cloud.contactcenterinsights.v1.IGetViewRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.GetViewRequest} GetViewRequest instance */ - Conversation.create = function create(properties) { - return new Conversation(properties); + GetViewRequest.create = function create(properties) { + return new GetViewRequest(properties); }; /** - * Encodes the specified Conversation message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.verify|verify} messages. + * Encodes the specified GetViewRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetViewRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @memberof google.cloud.contactcenterinsights.v1.GetViewRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IConversation} message Conversation message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IGetViewRequest} message GetViewRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Conversation.encode = function encode(message, writer) { + GetViewRequest.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.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) - $root.google.cloud.contactcenterinsights.v1.ConversationDataSource.encode(message.dataSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.agentId != null && Object.hasOwnProperty.call(message, "agentId")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.agentId); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.callMetadata != null && Object.hasOwnProperty.call(message, "callMetadata")) - $root.google.cloud.contactcenterinsights.v1.Conversation.CallMetadata.encode(message.callMetadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) - $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.encode(message.transcript, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.medium != null && Object.hasOwnProperty.call(message, "medium")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.medium); - if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) - $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.turnCount != null && Object.hasOwnProperty.call(message, "turnCount")) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.turnCount); - if (message.latestAnalysis != null && Object.hasOwnProperty.call(message, "latestAnalysis")) - $root.google.cloud.contactcenterinsights.v1.Analysis.encode(message.latestAnalysis, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.runtimeAnnotations != null && message.runtimeAnnotations.length) - for (var i = 0; i < message.runtimeAnnotations.length; ++i) - $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.encode(message.runtimeAnnotations[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.languageCode); - if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) - $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.ttl != null && Object.hasOwnProperty.call(message, "ttl")) - $root.google.protobuf.Duration.encode(message.ttl, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.dialogflowIntents != null && Object.hasOwnProperty.call(message, "dialogflowIntents")) - for (var keys = Object.keys(message.dialogflowIntents), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 18, wireType 2 =*/146).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.contactcenterinsights.v1.DialogflowIntent.encode(message.dialogflowIntents[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.latestSummary != null && Object.hasOwnProperty.call(message, "latestSummary")) - $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.encode(message.latestSummary, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.obfuscatedUserId != null && Object.hasOwnProperty.call(message, "obfuscatedUserId")) - writer.uint32(/* id 21, wireType 2 =*/170).string(message.obfuscatedUserId); - if (message.qualityMetadata != null && Object.hasOwnProperty.call(message, "qualityMetadata")) - $root.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.encode(message.qualityMetadata, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.metadataJson != null && Object.hasOwnProperty.call(message, "metadataJson")) - writer.uint32(/* id 25, wireType 2 =*/202).string(message.metadataJson); return writer; }; /** - * Encodes the specified Conversation message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.verify|verify} messages. + * Encodes the specified GetViewRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetViewRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @memberof google.cloud.contactcenterinsights.v1.GetViewRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IConversation} message Conversation message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IGetViewRequest} message GetViewRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Conversation.encodeDelimited = function encodeDelimited(message, writer) { + GetViewRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Conversation message from the specified reader or buffer. + * Decodes a GetViewRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @memberof google.cloud.contactcenterinsights.v1.GetViewRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.Conversation} Conversation + * @returns {google.cloud.contactcenterinsights.v1.GetViewRequest} GetViewRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Conversation.decode = function decode(reader, length) { + GetViewRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Conversation(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.GetViewRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 7: { - message.callMetadata = $root.google.cloud.contactcenterinsights.v1.Conversation.CallMetadata.decode(reader, reader.uint32()); - break; - } - case 15: { - message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 16: { - message.ttl = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } case 1: { message.name = reader.string(); break; } - case 2: { - message.dataSource = $root.google.cloud.contactcenterinsights.v1.ConversationDataSource.decode(reader, reader.uint32()); - break; - } - case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 17: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 14: { - message.languageCode = reader.string(); - break; - } - case 5: { - message.agentId = reader.string(); - break; - } - case 6: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 24: { - message.qualityMetadata = $root.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.decode(reader, reader.uint32()); - break; - } - case 25: { - message.metadataJson = reader.string(); - break; - } - case 8: { - message.transcript = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.decode(reader, reader.uint32()); - break; - } - case 9: { - message.medium = reader.int32(); - break; - } - case 10: { - message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 11: { - message.turnCount = reader.int32(); - break; - } - case 12: { - message.latestAnalysis = $root.google.cloud.contactcenterinsights.v1.Analysis.decode(reader, reader.uint32()); - break; - } - case 20: { - message.latestSummary = $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.decode(reader, reader.uint32()); - break; - } - case 13: { - if (!(message.runtimeAnnotations && message.runtimeAnnotations.length)) - message.runtimeAnnotations = []; - message.runtimeAnnotations.push($root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.decode(reader, reader.uint32())); - break; - } - case 18: { - if (message.dialogflowIntents === $util.emptyObject) - message.dialogflowIntents = {}; - 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.contactcenterinsights.v1.DialogflowIntent.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.dialogflowIntents[key] = value; - break; - } - case 21: { - message.obfuscatedUserId = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -22181,2405 +23048,22380 @@ }; /** - * Decodes a Conversation message from the specified reader or buffer, length delimited. + * Decodes a GetViewRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @memberof google.cloud.contactcenterinsights.v1.GetViewRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.Conversation} Conversation + * @returns {google.cloud.contactcenterinsights.v1.GetViewRequest} GetViewRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Conversation.decodeDelimited = function decodeDelimited(reader) { + GetViewRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Conversation message. + * Verifies a GetViewRequest message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @memberof google.cloud.contactcenterinsights.v1.GetViewRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Conversation.verify = function verify(message) { + GetViewRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.callMetadata != null && message.hasOwnProperty("callMetadata")) { - properties.metadata = 1; - { - var error = $root.google.cloud.contactcenterinsights.v1.Conversation.CallMetadata.verify(message.callMetadata); - if (error) - return "callMetadata." + error; - } - } - if (message.expireTime != null && message.hasOwnProperty("expireTime")) { - properties.expiration = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.expireTime); - if (error) - return "expireTime." + error; - } - } - if (message.ttl != null && message.hasOwnProperty("ttl")) { - if (properties.expiration === 1) - return "expiration: multiple values"; - properties.expiration = 1; - { - var error = $root.google.protobuf.Duration.verify(message.ttl); - if (error) - return "ttl." + error; - } - } if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.dataSource != null && message.hasOwnProperty("dataSource")) { - var error = $root.google.cloud.contactcenterinsights.v1.ConversationDataSource.verify(message.dataSource); - if (error) - return "dataSource." + error; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - if (message.agentId != null && message.hasOwnProperty("agentId")) - if (!$util.isString(message.agentId)) - return "agentId: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.qualityMetadata != null && message.hasOwnProperty("qualityMetadata")) { - var error = $root.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.verify(message.qualityMetadata); - if (error) - return "qualityMetadata." + error; - } - if (message.metadataJson != null && message.hasOwnProperty("metadataJson")) - if (!$util.isString(message.metadataJson)) - return "metadataJson: string expected"; - if (message.transcript != null && message.hasOwnProperty("transcript")) { - var error = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.verify(message.transcript); - if (error) - return "transcript." + error; - } - if (message.medium != null && message.hasOwnProperty("medium")) - switch (message.medium) { - default: - return "medium: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.duration != null && message.hasOwnProperty("duration")) { - var error = $root.google.protobuf.Duration.verify(message.duration); - if (error) - return "duration." + error; - } - if (message.turnCount != null && message.hasOwnProperty("turnCount")) - if (!$util.isInteger(message.turnCount)) - return "turnCount: integer expected"; - if (message.latestAnalysis != null && message.hasOwnProperty("latestAnalysis")) { - var error = $root.google.cloud.contactcenterinsights.v1.Analysis.verify(message.latestAnalysis); - if (error) - return "latestAnalysis." + error; - } - if (message.latestSummary != null && message.hasOwnProperty("latestSummary")) { - var error = $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.verify(message.latestSummary); - if (error) - return "latestSummary." + error; - } - if (message.runtimeAnnotations != null && message.hasOwnProperty("runtimeAnnotations")) { - if (!Array.isArray(message.runtimeAnnotations)) - return "runtimeAnnotations: array expected"; - for (var i = 0; i < message.runtimeAnnotations.length; ++i) { - var error = $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.verify(message.runtimeAnnotations[i]); - if (error) - return "runtimeAnnotations." + error; - } - } - if (message.dialogflowIntents != null && message.hasOwnProperty("dialogflowIntents")) { - if (!$util.isObject(message.dialogflowIntents)) - return "dialogflowIntents: object expected"; - var key = Object.keys(message.dialogflowIntents); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.contactcenterinsights.v1.DialogflowIntent.verify(message.dialogflowIntents[key[i]]); - if (error) - return "dialogflowIntents." + error; - } - } - if (message.obfuscatedUserId != null && message.hasOwnProperty("obfuscatedUserId")) - if (!$util.isString(message.obfuscatedUserId)) - return "obfuscatedUserId: string expected"; return null; }; /** - * Creates a Conversation message from a plain object. Also converts values to their respective internal types. + * Creates a GetViewRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @memberof google.cloud.contactcenterinsights.v1.GetViewRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.Conversation} Conversation + * @returns {google.cloud.contactcenterinsights.v1.GetViewRequest} GetViewRequest */ - Conversation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.Conversation) + GetViewRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.GetViewRequest) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.Conversation(); - if (object.callMetadata != null) { - if (typeof object.callMetadata !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.callMetadata: object expected"); - message.callMetadata = $root.google.cloud.contactcenterinsights.v1.Conversation.CallMetadata.fromObject(object.callMetadata); - } - if (object.expireTime != null) { - if (typeof object.expireTime !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.expireTime: object expected"); - message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); - } - if (object.ttl != null) { - if (typeof object.ttl !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.ttl: object expected"); - message.ttl = $root.google.protobuf.Duration.fromObject(object.ttl); - } + var message = new $root.google.cloud.contactcenterinsights.v1.GetViewRequest(); if (object.name != null) message.name = String(object.name); - if (object.dataSource != null) { - if (typeof object.dataSource !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.dataSource: object expected"); - message.dataSource = $root.google.cloud.contactcenterinsights.v1.ConversationDataSource.fromObject(object.dataSource); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - if (object.agentId != null) - message.agentId = String(object.agentId); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.qualityMetadata != null) { - if (typeof object.qualityMetadata !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.qualityMetadata: object expected"); - message.qualityMetadata = $root.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.fromObject(object.qualityMetadata); - } - if (object.metadataJson != null) - message.metadataJson = String(object.metadataJson); - if (object.transcript != null) { - if (typeof object.transcript !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.transcript: object expected"); - message.transcript = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.fromObject(object.transcript); - } - switch (object.medium) { - default: - if (typeof object.medium === "number") { - message.medium = object.medium; - break; - } - break; - case "MEDIUM_UNSPECIFIED": - case 0: - message.medium = 0; - break; - case "PHONE_CALL": - case 1: - message.medium = 1; - break; - case "CHAT": - case 2: - message.medium = 2; - break; - } - if (object.duration != null) { - if (typeof object.duration !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.duration: object expected"); - message.duration = $root.google.protobuf.Duration.fromObject(object.duration); - } - if (object.turnCount != null) - message.turnCount = object.turnCount | 0; - if (object.latestAnalysis != null) { - if (typeof object.latestAnalysis !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.latestAnalysis: object expected"); - message.latestAnalysis = $root.google.cloud.contactcenterinsights.v1.Analysis.fromObject(object.latestAnalysis); - } - if (object.latestSummary != null) { - if (typeof object.latestSummary !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.latestSummary: object expected"); - message.latestSummary = $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.fromObject(object.latestSummary); - } - if (object.runtimeAnnotations) { - if (!Array.isArray(object.runtimeAnnotations)) - throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.runtimeAnnotations: array expected"); - message.runtimeAnnotations = []; - for (var i = 0; i < object.runtimeAnnotations.length; ++i) { - if (typeof object.runtimeAnnotations[i] !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.runtimeAnnotations: object expected"); - message.runtimeAnnotations[i] = $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.fromObject(object.runtimeAnnotations[i]); - } - } - if (object.dialogflowIntents) { - if (typeof object.dialogflowIntents !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.dialogflowIntents: object expected"); - message.dialogflowIntents = {}; - for (var keys = Object.keys(object.dialogflowIntents), i = 0; i < keys.length; ++i) { - if (typeof object.dialogflowIntents[keys[i]] !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.dialogflowIntents: object expected"); - message.dialogflowIntents[keys[i]] = $root.google.cloud.contactcenterinsights.v1.DialogflowIntent.fromObject(object.dialogflowIntents[keys[i]]); - } - } - if (object.obfuscatedUserId != null) - message.obfuscatedUserId = String(object.obfuscatedUserId); return message; }; /** - * Creates a plain object from a Conversation message. Also converts values to other types if specified. + * Creates a plain object from a GetViewRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @memberof google.cloud.contactcenterinsights.v1.GetViewRequest * @static - * @param {google.cloud.contactcenterinsights.v1.Conversation} message Conversation + * @param {google.cloud.contactcenterinsights.v1.GetViewRequest} message GetViewRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Conversation.toObject = function toObject(message, options) { + GetViewRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.runtimeAnnotations = []; - if (options.objects || options.defaults) { - object.labels = {}; - object.dialogflowIntents = {}; - } - if (options.defaults) { + if (options.defaults) object.name = ""; - object.dataSource = null; - object.createTime = null; - object.updateTime = null; - object.agentId = ""; - object.transcript = null; - object.medium = options.enums === String ? "MEDIUM_UNSPECIFIED" : 0; - object.duration = null; - object.turnCount = 0; - object.latestAnalysis = null; - object.languageCode = ""; - object.startTime = null; - object.latestSummary = null; - object.obfuscatedUserId = ""; - object.qualityMetadata = null; - object.metadataJson = ""; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - object.dataSource = $root.google.cloud.contactcenterinsights.v1.ConversationDataSource.toObject(message.dataSource, options); - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.agentId != null && message.hasOwnProperty("agentId")) - object.agentId = message.agentId; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.callMetadata != null && message.hasOwnProperty("callMetadata")) { - object.callMetadata = $root.google.cloud.contactcenterinsights.v1.Conversation.CallMetadata.toObject(message.callMetadata, options); - if (options.oneofs) - object.metadata = "callMetadata"; - } - if (message.transcript != null && message.hasOwnProperty("transcript")) - object.transcript = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.toObject(message.transcript, options); - if (message.medium != null && message.hasOwnProperty("medium")) - object.medium = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.Conversation.Medium[message.medium] === undefined ? message.medium : $root.google.cloud.contactcenterinsights.v1.Conversation.Medium[message.medium] : message.medium; - if (message.duration != null && message.hasOwnProperty("duration")) - object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); - if (message.turnCount != null && message.hasOwnProperty("turnCount")) - object.turnCount = message.turnCount; - if (message.latestAnalysis != null && message.hasOwnProperty("latestAnalysis")) - object.latestAnalysis = $root.google.cloud.contactcenterinsights.v1.Analysis.toObject(message.latestAnalysis, options); - if (message.runtimeAnnotations && message.runtimeAnnotations.length) { - object.runtimeAnnotations = []; - for (var j = 0; j < message.runtimeAnnotations.length; ++j) - object.runtimeAnnotations[j] = $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.toObject(message.runtimeAnnotations[j], options); - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - if (message.expireTime != null && message.hasOwnProperty("expireTime")) { - object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); - if (options.oneofs) - object.expiration = "expireTime"; - } - if (message.ttl != null && message.hasOwnProperty("ttl")) { - object.ttl = $root.google.protobuf.Duration.toObject(message.ttl, options); - if (options.oneofs) - object.expiration = "ttl"; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.dialogflowIntents && (keys2 = Object.keys(message.dialogflowIntents)).length) { - object.dialogflowIntents = {}; - for (var j = 0; j < keys2.length; ++j) - object.dialogflowIntents[keys2[j]] = $root.google.cloud.contactcenterinsights.v1.DialogflowIntent.toObject(message.dialogflowIntents[keys2[j]], options); - } - if (message.latestSummary != null && message.hasOwnProperty("latestSummary")) - object.latestSummary = $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.toObject(message.latestSummary, options); - if (message.obfuscatedUserId != null && message.hasOwnProperty("obfuscatedUserId")) - object.obfuscatedUserId = message.obfuscatedUserId; - if (message.qualityMetadata != null && message.hasOwnProperty("qualityMetadata")) - object.qualityMetadata = $root.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.toObject(message.qualityMetadata, options); - if (message.metadataJson != null && message.hasOwnProperty("metadataJson")) - object.metadataJson = message.metadataJson; return object; }; /** - * Converts this Conversation to JSON. + * Converts this GetViewRequest to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @memberof google.cloud.contactcenterinsights.v1.GetViewRequest * @instance * @returns {Object.} JSON object */ - Conversation.prototype.toJSON = function toJSON() { + GetViewRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Conversation + * Gets the default type url for GetViewRequest * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @memberof google.cloud.contactcenterinsights.v1.GetViewRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Conversation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Conversation"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.GetViewRequest"; }; - Conversation.CallMetadata = (function() { + return GetViewRequest; + })(); - /** - * Properties of a CallMetadata. - * @memberof google.cloud.contactcenterinsights.v1.Conversation - * @interface ICallMetadata - * @property {number|null} [customerChannel] CallMetadata customerChannel - * @property {number|null} [agentChannel] CallMetadata agentChannel - */ + v1.ListViewsRequest = (function() { - /** - * Constructs a new CallMetadata. - * @memberof google.cloud.contactcenterinsights.v1.Conversation - * @classdesc Represents a CallMetadata. - * @implements ICallMetadata - * @constructor - * @param {google.cloud.contactcenterinsights.v1.Conversation.ICallMetadata=} [properties] Properties to set - */ - function CallMetadata(properties) { - if (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 ListViewsRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IListViewsRequest + * @property {string|null} [parent] ListViewsRequest parent + * @property {number|null} [pageSize] ListViewsRequest pageSize + * @property {string|null} [pageToken] ListViewsRequest pageToken + */ - /** - * CallMetadata customerChannel. - * @member {number} customerChannel - * @memberof google.cloud.contactcenterinsights.v1.Conversation.CallMetadata - * @instance - */ - CallMetadata.prototype.customerChannel = 0; + /** + * Constructs a new ListViewsRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ListViewsRequest. + * @implements IListViewsRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IListViewsRequest=} [properties] Properties to set + */ + function ListViewsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * CallMetadata agentChannel. - * @member {number} agentChannel - * @memberof google.cloud.contactcenterinsights.v1.Conversation.CallMetadata - * @instance - */ - CallMetadata.prototype.agentChannel = 0; + /** + * ListViewsRequest parent. + * @member {string} parent + * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest + * @instance + */ + ListViewsRequest.prototype.parent = ""; - /** - * Creates a new CallMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.contactcenterinsights.v1.Conversation.CallMetadata - * @static - * @param {google.cloud.contactcenterinsights.v1.Conversation.ICallMetadata=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.Conversation.CallMetadata} CallMetadata instance - */ - CallMetadata.create = function create(properties) { - return new CallMetadata(properties); - }; + /** + * ListViewsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest + * @instance + */ + ListViewsRequest.prototype.pageSize = 0; - /** - * Encodes the specified CallMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.CallMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.contactcenterinsights.v1.Conversation.CallMetadata - * @static - * @param {google.cloud.contactcenterinsights.v1.Conversation.ICallMetadata} message CallMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CallMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.customerChannel != null && Object.hasOwnProperty.call(message, "customerChannel")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.customerChannel); - if (message.agentChannel != null && Object.hasOwnProperty.call(message, "agentChannel")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.agentChannel); - return writer; - }; + /** + * ListViewsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest + * @instance + */ + ListViewsRequest.prototype.pageToken = ""; - /** - * Encodes the specified CallMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.CallMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.Conversation.CallMetadata - * @static - * @param {google.cloud.contactcenterinsights.v1.Conversation.ICallMetadata} message CallMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CallMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new ListViewsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListViewsRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ListViewsRequest} ListViewsRequest instance + */ + ListViewsRequest.create = function create(properties) { + return new ListViewsRequest(properties); + }; - /** - * Decodes a CallMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.contactcenterinsights.v1.Conversation.CallMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.Conversation.CallMetadata} CallMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CallMetadata.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Conversation.CallMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.customerChannel = reader.int32(); - break; - } - case 2: { - message.agentChannel = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Encodes the specified ListViewsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListViewsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListViewsRequest} message ListViewsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListViewsRequest.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 ListViewsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListViewsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListViewsRequest} message ListViewsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListViewsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListViewsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ListViewsRequest} ListViewsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListViewsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListViewsRequest(); + 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 CallMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.Conversation.CallMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.Conversation.CallMetadata} CallMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CallMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a CallMetadata message. - * @function verify - * @memberof google.cloud.contactcenterinsights.v1.Conversation.CallMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CallMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.customerChannel != null && message.hasOwnProperty("customerChannel")) - if (!$util.isInteger(message.customerChannel)) - return "customerChannel: integer expected"; - if (message.agentChannel != null && message.hasOwnProperty("agentChannel")) - if (!$util.isInteger(message.agentChannel)) - return "agentChannel: integer expected"; - return null; - }; + /** + * Decodes a ListViewsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ListViewsRequest} ListViewsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListViewsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a CallMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.Conversation.CallMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.Conversation.CallMetadata} CallMetadata - */ - CallMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.Conversation.CallMetadata) - return object; - var message = new $root.google.cloud.contactcenterinsights.v1.Conversation.CallMetadata(); - if (object.customerChannel != null) - message.customerChannel = object.customerChannel | 0; - if (object.agentChannel != null) - message.agentChannel = object.agentChannel | 0; - return message; - }; + /** + * Verifies a ListViewsRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListViewsRequest.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 plain object from a CallMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.Conversation.CallMetadata - * @static - * @param {google.cloud.contactcenterinsights.v1.Conversation.CallMetadata} message CallMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CallMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.customerChannel = 0; - object.agentChannel = 0; - } - if (message.customerChannel != null && message.hasOwnProperty("customerChannel")) - object.customerChannel = message.customerChannel; - if (message.agentChannel != null && message.hasOwnProperty("agentChannel")) - object.agentChannel = message.agentChannel; + /** + * Creates a ListViewsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ListViewsRequest} ListViewsRequest + */ + ListViewsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListViewsRequest) return object; - }; + var message = new $root.google.cloud.contactcenterinsights.v1.ListViewsRequest(); + 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; + }; - /** - * Converts this CallMetadata to JSON. - * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.Conversation.CallMetadata - * @instance - * @returns {Object.} JSON object - */ - CallMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a ListViewsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ListViewsRequest} message ListViewsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListViewsRequest.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; + }; - /** - * Gets the default type url for CallMetadata - * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.Conversation.CallMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CallMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Conversation.CallMetadata"; - }; + /** + * Converts this ListViewsRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest + * @instance + * @returns {Object.} JSON object + */ + ListViewsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return CallMetadata; - })(); + /** + * Gets the default type url for ListViewsRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ListViewsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListViewsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListViewsRequest"; + }; - Conversation.QualityMetadata = (function() { + return ListViewsRequest; + })(); - /** - * Properties of a QualityMetadata. - * @memberof google.cloud.contactcenterinsights.v1.Conversation - * @interface IQualityMetadata - * @property {number|null} [customerSatisfactionRating] QualityMetadata customerSatisfactionRating - * @property {google.protobuf.IDuration|null} [waitDuration] QualityMetadata waitDuration - * @property {string|null} [menuPath] QualityMetadata menuPath - * @property {Array.|null} [agentInfo] QualityMetadata agentInfo - */ + v1.ListViewsResponse = (function() { - /** - * Constructs a new QualityMetadata. - * @memberof google.cloud.contactcenterinsights.v1.Conversation - * @classdesc Represents a QualityMetadata. - * @implements IQualityMetadata - * @constructor - * @param {google.cloud.contactcenterinsights.v1.Conversation.IQualityMetadata=} [properties] Properties to set - */ - function QualityMetadata(properties) { - this.agentInfo = []; - if (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 ListViewsResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IListViewsResponse + * @property {Array.|null} [views] ListViewsResponse views + * @property {string|null} [nextPageToken] ListViewsResponse nextPageToken + */ - /** - * QualityMetadata customerSatisfactionRating. - * @member {number} customerSatisfactionRating - * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata - * @instance - */ - QualityMetadata.prototype.customerSatisfactionRating = 0; + /** + * Constructs a new ListViewsResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ListViewsResponse. + * @implements IListViewsResponse + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IListViewsResponse=} [properties] Properties to set + */ + function ListViewsResponse(properties) { + this.views = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * QualityMetadata waitDuration. - * @member {google.protobuf.IDuration|null|undefined} waitDuration - * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata - * @instance - */ - QualityMetadata.prototype.waitDuration = null; + /** + * ListViewsResponse views. + * @member {Array.} views + * @memberof google.cloud.contactcenterinsights.v1.ListViewsResponse + * @instance + */ + ListViewsResponse.prototype.views = $util.emptyArray; - /** - * QualityMetadata menuPath. - * @member {string} menuPath - * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata - * @instance - */ - QualityMetadata.prototype.menuPath = ""; + /** + * ListViewsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.contactcenterinsights.v1.ListViewsResponse + * @instance + */ + ListViewsResponse.prototype.nextPageToken = ""; - /** - * QualityMetadata agentInfo. - * @member {Array.} agentInfo - * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata - * @instance - */ - QualityMetadata.prototype.agentInfo = $util.emptyArray; + /** + * Creates a new ListViewsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ListViewsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListViewsResponse=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ListViewsResponse} ListViewsResponse instance + */ + ListViewsResponse.create = function create(properties) { + return new ListViewsResponse(properties); + }; - /** - * Creates a new QualityMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata - * @static - * @param {google.cloud.contactcenterinsights.v1.Conversation.IQualityMetadata=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata} QualityMetadata instance - */ - QualityMetadata.create = function create(properties) { - return new QualityMetadata(properties); - }; + /** + * Encodes the specified ListViewsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListViewsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ListViewsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListViewsResponse} message ListViewsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListViewsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.views != null && message.views.length) + for (var i = 0; i < message.views.length; ++i) + $root.google.cloud.contactcenterinsights.v1.View.encode(message.views[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 QualityMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata - * @static - * @param {google.cloud.contactcenterinsights.v1.Conversation.IQualityMetadata} message QualityMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QualityMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.customerSatisfactionRating != null && Object.hasOwnProperty.call(message, "customerSatisfactionRating")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.customerSatisfactionRating); - if (message.waitDuration != null && Object.hasOwnProperty.call(message, "waitDuration")) - $root.google.protobuf.Duration.encode(message.waitDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.menuPath != null && Object.hasOwnProperty.call(message, "menuPath")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.menuPath); - if (message.agentInfo != null && message.agentInfo.length) - for (var i = 0; i < message.agentInfo.length; ++i) - $root.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo.encode(message.agentInfo[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified ListViewsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListViewsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListViewsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListViewsResponse} message ListViewsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListViewsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified QualityMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata - * @static - * @param {google.cloud.contactcenterinsights.v1.Conversation.IQualityMetadata} message QualityMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QualityMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes a ListViewsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ListViewsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ListViewsResponse} ListViewsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListViewsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListViewsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.views && message.views.length)) + message.views = []; + message.views.push($root.google.cloud.contactcenterinsights.v1.View.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Decodes a QualityMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata} QualityMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QualityMetadata.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.customerSatisfactionRating = reader.int32(); - break; - } - case 2: { - message.waitDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 3: { - message.menuPath = reader.string(); - break; - } - case 4: { - if (!(message.agentInfo && message.agentInfo.length)) - message.agentInfo = []; - message.agentInfo.push($root.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QualityMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata} QualityMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QualityMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a ListViewsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListViewsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ListViewsResponse} ListViewsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListViewsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a QualityMetadata message. - * @function verify - * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QualityMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.customerSatisfactionRating != null && message.hasOwnProperty("customerSatisfactionRating")) - if (!$util.isInteger(message.customerSatisfactionRating)) - return "customerSatisfactionRating: integer expected"; - if (message.waitDuration != null && message.hasOwnProperty("waitDuration")) { - var error = $root.google.protobuf.Duration.verify(message.waitDuration); + /** + * Verifies a ListViewsResponse message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ListViewsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListViewsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.views != null && message.hasOwnProperty("views")) { + if (!Array.isArray(message.views)) + return "views: array expected"; + for (var i = 0; i < message.views.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.View.verify(message.views[i]); if (error) - return "waitDuration." + error; - } - if (message.menuPath != null && message.hasOwnProperty("menuPath")) - if (!$util.isString(message.menuPath)) - return "menuPath: string expected"; - if (message.agentInfo != null && message.hasOwnProperty("agentInfo")) { - if (!Array.isArray(message.agentInfo)) - return "agentInfo: array expected"; - for (var i = 0; i < message.agentInfo.length; ++i) { - var error = $root.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo.verify(message.agentInfo[i]); - if (error) - return "agentInfo." + error; - } + return "views." + error; } - return null; - }; + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; - /** - * Creates a QualityMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata} QualityMetadata - */ - QualityMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata) - return object; - var message = new $root.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata(); - if (object.customerSatisfactionRating != null) - message.customerSatisfactionRating = object.customerSatisfactionRating | 0; - if (object.waitDuration != null) { - if (typeof object.waitDuration !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.waitDuration: object expected"); - message.waitDuration = $root.google.protobuf.Duration.fromObject(object.waitDuration); - } - if (object.menuPath != null) - message.menuPath = String(object.menuPath); - if (object.agentInfo) { - if (!Array.isArray(object.agentInfo)) - throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.agentInfo: array expected"); - message.agentInfo = []; - for (var i = 0; i < object.agentInfo.length; ++i) { - if (typeof object.agentInfo[i] !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.agentInfo: object expected"); - message.agentInfo[i] = $root.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo.fromObject(object.agentInfo[i]); - } + /** + * Creates a ListViewsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ListViewsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ListViewsResponse} ListViewsResponse + */ + ListViewsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListViewsResponse) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ListViewsResponse(); + if (object.views) { + if (!Array.isArray(object.views)) + throw TypeError(".google.cloud.contactcenterinsights.v1.ListViewsResponse.views: array expected"); + message.views = []; + for (var i = 0; i < object.views.length; ++i) { + if (typeof object.views[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ListViewsResponse.views: object expected"); + message.views[i] = $root.google.cloud.contactcenterinsights.v1.View.fromObject(object.views[i]); } - return message; - }; + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; - /** - * Creates a plain object from a QualityMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata - * @static - * @param {google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata} message QualityMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QualityMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.agentInfo = []; - if (options.defaults) { - object.customerSatisfactionRating = 0; - object.waitDuration = null; - object.menuPath = ""; - } - if (message.customerSatisfactionRating != null && message.hasOwnProperty("customerSatisfactionRating")) - object.customerSatisfactionRating = message.customerSatisfactionRating; - if (message.waitDuration != null && message.hasOwnProperty("waitDuration")) - object.waitDuration = $root.google.protobuf.Duration.toObject(message.waitDuration, options); - if (message.menuPath != null && message.hasOwnProperty("menuPath")) - object.menuPath = message.menuPath; - if (message.agentInfo && message.agentInfo.length) { - object.agentInfo = []; - for (var j = 0; j < message.agentInfo.length; ++j) - object.agentInfo[j] = $root.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo.toObject(message.agentInfo[j], options); - } - return object; - }; + /** + * Creates a plain object from a ListViewsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ListViewsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.ListViewsResponse} message ListViewsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListViewsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.views = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.views && message.views.length) { + object.views = []; + for (var j = 0; j < message.views.length; ++j) + object.views[j] = $root.google.cloud.contactcenterinsights.v1.View.toObject(message.views[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; - /** - * Converts this QualityMetadata to JSON. - * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata - * @instance - * @returns {Object.} JSON object - */ - QualityMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this ListViewsResponse to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ListViewsResponse + * @instance + * @returns {Object.} JSON object + */ + ListViewsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for QualityMetadata - * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - QualityMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata"; - }; + /** + * Gets the default type url for ListViewsResponse + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ListViewsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListViewsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListViewsResponse"; + }; - QualityMetadata.AgentInfo = (function() { + return ListViewsResponse; + })(); - /** - * Properties of an AgentInfo. - * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata - * @interface IAgentInfo - * @property {string|null} [agentId] AgentInfo agentId - * @property {string|null} [displayName] AgentInfo displayName - * @property {string|null} [team] AgentInfo team - * @property {string|null} [dispositionCode] AgentInfo dispositionCode - */ + v1.UpdateViewRequest = (function() { - /** - * Constructs a new AgentInfo. - * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata - * @classdesc Represents an AgentInfo. - * @implements IAgentInfo - * @constructor - * @param {google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.IAgentInfo=} [properties] Properties to set - */ - function AgentInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of an UpdateViewRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IUpdateViewRequest + * @property {google.cloud.contactcenterinsights.v1.IView|null} [view] UpdateViewRequest view + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateViewRequest updateMask + */ - /** - * AgentInfo agentId. - * @member {string} agentId - * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo - * @instance - */ - AgentInfo.prototype.agentId = ""; + /** + * Constructs a new UpdateViewRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an UpdateViewRequest. + * @implements IUpdateViewRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IUpdateViewRequest=} [properties] Properties to set + */ + function UpdateViewRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * AgentInfo displayName. - * @member {string} displayName - * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo - * @instance - */ - AgentInfo.prototype.displayName = ""; + /** + * UpdateViewRequest view. + * @member {google.cloud.contactcenterinsights.v1.IView|null|undefined} view + * @memberof google.cloud.contactcenterinsights.v1.UpdateViewRequest + * @instance + */ + UpdateViewRequest.prototype.view = null; - /** - * AgentInfo team. - * @member {string} team - * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo - * @instance - */ - AgentInfo.prototype.team = ""; + /** + * UpdateViewRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.contactcenterinsights.v1.UpdateViewRequest + * @instance + */ + UpdateViewRequest.prototype.updateMask = null; - /** - * AgentInfo dispositionCode. - * @member {string} dispositionCode - * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo - * @instance - */ - AgentInfo.prototype.dispositionCode = ""; + /** + * Creates a new UpdateViewRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.UpdateViewRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUpdateViewRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.UpdateViewRequest} UpdateViewRequest instance + */ + UpdateViewRequest.create = function create(properties) { + return new UpdateViewRequest(properties); + }; - /** - * Creates a new AgentInfo instance using the specified properties. - * @function create - * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo - * @static - * @param {google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.IAgentInfo=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo} AgentInfo instance - */ - AgentInfo.create = function create(properties) { - return new AgentInfo(properties); - }; + /** + * Encodes the specified UpdateViewRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateViewRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.UpdateViewRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUpdateViewRequest} message UpdateViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateViewRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + $root.google.cloud.contactcenterinsights.v1.View.encode(message.view, 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 AgentInfo message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo - * @static - * @param {google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.IAgentInfo} message AgentInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AgentInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.agentId != null && Object.hasOwnProperty.call(message, "agentId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.agentId); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.team != null && Object.hasOwnProperty.call(message, "team")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.team); - if (message.dispositionCode != null && Object.hasOwnProperty.call(message, "dispositionCode")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.dispositionCode); - return writer; - }; + /** + * Encodes the specified UpdateViewRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateViewRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.UpdateViewRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUpdateViewRequest} message UpdateViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateViewRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified AgentInfo message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo - * @static - * @param {google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.IAgentInfo} message AgentInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AgentInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes an UpdateViewRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.UpdateViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.UpdateViewRequest} UpdateViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateViewRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.UpdateViewRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.view = $root.google.cloud.contactcenterinsights.v1.View.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 AgentInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo} AgentInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AgentInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.agentId = reader.string(); - break; - } - case 2: { - message.displayName = reader.string(); - break; - } - case 3: { - message.team = reader.string(); - break; - } - case 4: { - message.dispositionCode = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AgentInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo} AgentInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AgentInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AgentInfo message. - * @function verify - * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AgentInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.agentId != null && message.hasOwnProperty("agentId")) - if (!$util.isString(message.agentId)) - return "agentId: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.team != null && message.hasOwnProperty("team")) - if (!$util.isString(message.team)) - return "team: string expected"; - if (message.dispositionCode != null && message.hasOwnProperty("dispositionCode")) - if (!$util.isString(message.dispositionCode)) - return "dispositionCode: string expected"; - return null; - }; + /** + * Decodes an UpdateViewRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.UpdateViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.UpdateViewRequest} UpdateViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateViewRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates an AgentInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo} AgentInfo - */ - AgentInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo) - return object; - var message = new $root.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo(); - if (object.agentId != null) - message.agentId = String(object.agentId); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.team != null) - message.team = String(object.team); - if (object.dispositionCode != null) - message.dispositionCode = String(object.dispositionCode); - return message; - }; + /** + * Verifies an UpdateViewRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.UpdateViewRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateViewRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.view != null && message.hasOwnProperty("view")) { + var error = $root.google.cloud.contactcenterinsights.v1.View.verify(message.view); + if (error) + return "view." + 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 plain object from an AgentInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo - * @static - * @param {google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo} message AgentInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AgentInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.agentId = ""; - object.displayName = ""; - object.team = ""; - object.dispositionCode = ""; - } - if (message.agentId != null && message.hasOwnProperty("agentId")) - object.agentId = message.agentId; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.team != null && message.hasOwnProperty("team")) - object.team = message.team; - if (message.dispositionCode != null && message.hasOwnProperty("dispositionCode")) - object.dispositionCode = message.dispositionCode; - return object; - }; + /** + * Creates an UpdateViewRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.UpdateViewRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.UpdateViewRequest} UpdateViewRequest + */ + UpdateViewRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.UpdateViewRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.UpdateViewRequest(); + if (object.view != null) { + if (typeof object.view !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.UpdateViewRequest.view: object expected"); + message.view = $root.google.cloud.contactcenterinsights.v1.View.fromObject(object.view); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.UpdateViewRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; - /** - * Converts this AgentInfo to JSON. - * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo - * @instance - * @returns {Object.} JSON object - */ - AgentInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from an UpdateViewRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.UpdateViewRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.UpdateViewRequest} message UpdateViewRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateViewRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.view = null; + object.updateMask = null; + } + if (message.view != null && message.hasOwnProperty("view")) + object.view = $root.google.cloud.contactcenterinsights.v1.View.toObject(message.view, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; - /** - * Gets the default type url for AgentInfo - * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AgentInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo"; - }; + /** + * Converts this UpdateViewRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.UpdateViewRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateViewRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return AgentInfo; - })(); + /** + * Gets the default type url for UpdateViewRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.UpdateViewRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.UpdateViewRequest"; + }; - return QualityMetadata; - })(); + return UpdateViewRequest; + })(); - Conversation.Transcript = (function() { + v1.DeleteViewRequest = (function() { - /** - * Properties of a Transcript. - * @memberof google.cloud.contactcenterinsights.v1.Conversation - * @interface ITranscript - * @property {Array.|null} [transcriptSegments] Transcript transcriptSegments - */ + /** + * Properties of a DeleteViewRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IDeleteViewRequest + * @property {string|null} [name] DeleteViewRequest name + */ - /** - * Constructs a new Transcript. - * @memberof google.cloud.contactcenterinsights.v1.Conversation - * @classdesc Represents a Transcript. - * @implements ITranscript - * @constructor - * @param {google.cloud.contactcenterinsights.v1.Conversation.ITranscript=} [properties] Properties to set - */ - function Transcript(properties) { - this.transcriptSegments = []; - if (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 DeleteViewRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a DeleteViewRequest. + * @implements IDeleteViewRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IDeleteViewRequest=} [properties] Properties to set + */ + function DeleteViewRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Transcript transcriptSegments. - * @member {Array.} transcriptSegments - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript - * @instance - */ - Transcript.prototype.transcriptSegments = $util.emptyArray; + /** + * DeleteViewRequest name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.DeleteViewRequest + * @instance + */ + DeleteViewRequest.prototype.name = ""; - /** - * Creates a new Transcript instance using the specified properties. - * @function create - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript - * @static - * @param {google.cloud.contactcenterinsights.v1.Conversation.ITranscript=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript} Transcript instance - */ - Transcript.create = function create(properties) { - return new Transcript(properties); - }; + /** + * Creates a new DeleteViewRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.DeleteViewRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeleteViewRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.DeleteViewRequest} DeleteViewRequest instance + */ + DeleteViewRequest.create = function create(properties) { + return new DeleteViewRequest(properties); + }; - /** - * Encodes the specified Transcript message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.verify|verify} messages. - * @function encode - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript - * @static - * @param {google.cloud.contactcenterinsights.v1.Conversation.ITranscript} message Transcript message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Transcript.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.transcriptSegments != null && message.transcriptSegments.length) - for (var i = 0; i < message.transcriptSegments.length; ++i) - $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.encode(message.transcriptSegments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified DeleteViewRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteViewRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.DeleteViewRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeleteViewRequest} message DeleteViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteViewRequest.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 Transcript message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript - * @static - * @param {google.cloud.contactcenterinsights.v1.Conversation.ITranscript} message Transcript message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Transcript.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified DeleteViewRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteViewRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DeleteViewRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeleteViewRequest} message DeleteViewRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteViewRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a Transcript message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript} Transcript - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Transcript.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.transcriptSegments && message.transcriptSegments.length)) - message.transcriptSegments = []; - message.transcriptSegments.push($root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); + /** + * Decodes a DeleteViewRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.DeleteViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.DeleteViewRequest} DeleteViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteViewRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.DeleteViewRequest(); + 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; - }; + } + return message; + }; - /** - * Decodes a Transcript message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript} Transcript - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Transcript.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a DeleteViewRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DeleteViewRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.DeleteViewRequest} DeleteViewRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteViewRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a Transcript message. - * @function verify - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Transcript.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.transcriptSegments != null && message.hasOwnProperty("transcriptSegments")) { - if (!Array.isArray(message.transcriptSegments)) - return "transcriptSegments: array expected"; - for (var i = 0; i < message.transcriptSegments.length; ++i) { - var error = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.verify(message.transcriptSegments[i]); - if (error) - return "transcriptSegments." + error; - } - } - return null; - }; + /** + * Verifies a DeleteViewRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.DeleteViewRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteViewRequest.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 Transcript message from a plain object. Also converts values to their respective internal types. + /** + * Creates a DeleteViewRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.DeleteViewRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.DeleteViewRequest} DeleteViewRequest + */ + DeleteViewRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.DeleteViewRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.DeleteViewRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteViewRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.DeleteViewRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.DeleteViewRequest} message DeleteViewRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteViewRequest.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 DeleteViewRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.DeleteViewRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteViewRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteViewRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.DeleteViewRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteViewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.DeleteViewRequest"; + }; + + return DeleteViewRequest; + })(); + + v1.Dimension = (function() { + + /** + * Properties of a Dimension. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IDimension + * @property {google.cloud.contactcenterinsights.v1.Dimension.IIssueDimensionMetadata|null} [issueDimensionMetadata] Dimension issueDimensionMetadata + * @property {google.cloud.contactcenterinsights.v1.Dimension.IAgentDimensionMetadata|null} [agentDimensionMetadata] Dimension agentDimensionMetadata + * @property {google.cloud.contactcenterinsights.v1.Dimension.IQaQuestionDimensionMetadata|null} [qaQuestionDimensionMetadata] Dimension qaQuestionDimensionMetadata + * @property {google.cloud.contactcenterinsights.v1.Dimension.IQaQuestionAnswerDimensionMetadata|null} [qaQuestionAnswerDimensionMetadata] Dimension qaQuestionAnswerDimensionMetadata + * @property {google.cloud.contactcenterinsights.v1.Dimension.DimensionKey|null} [dimensionKey] Dimension dimensionKey + */ + + /** + * Constructs a new Dimension. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a Dimension. + * @implements IDimension + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IDimension=} [properties] Properties to set + */ + function Dimension(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Dimension issueDimensionMetadata. + * @member {google.cloud.contactcenterinsights.v1.Dimension.IIssueDimensionMetadata|null|undefined} issueDimensionMetadata + * @memberof google.cloud.contactcenterinsights.v1.Dimension + * @instance + */ + Dimension.prototype.issueDimensionMetadata = null; + + /** + * Dimension agentDimensionMetadata. + * @member {google.cloud.contactcenterinsights.v1.Dimension.IAgentDimensionMetadata|null|undefined} agentDimensionMetadata + * @memberof google.cloud.contactcenterinsights.v1.Dimension + * @instance + */ + Dimension.prototype.agentDimensionMetadata = null; + + /** + * Dimension qaQuestionDimensionMetadata. + * @member {google.cloud.contactcenterinsights.v1.Dimension.IQaQuestionDimensionMetadata|null|undefined} qaQuestionDimensionMetadata + * @memberof google.cloud.contactcenterinsights.v1.Dimension + * @instance + */ + Dimension.prototype.qaQuestionDimensionMetadata = null; + + /** + * Dimension qaQuestionAnswerDimensionMetadata. + * @member {google.cloud.contactcenterinsights.v1.Dimension.IQaQuestionAnswerDimensionMetadata|null|undefined} qaQuestionAnswerDimensionMetadata + * @memberof google.cloud.contactcenterinsights.v1.Dimension + * @instance + */ + Dimension.prototype.qaQuestionAnswerDimensionMetadata = null; + + /** + * Dimension dimensionKey. + * @member {google.cloud.contactcenterinsights.v1.Dimension.DimensionKey} dimensionKey + * @memberof google.cloud.contactcenterinsights.v1.Dimension + * @instance + */ + Dimension.prototype.dimensionKey = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Dimension dimensionMetadata. + * @member {"issueDimensionMetadata"|"agentDimensionMetadata"|"qaQuestionDimensionMetadata"|"qaQuestionAnswerDimensionMetadata"|undefined} dimensionMetadata + * @memberof google.cloud.contactcenterinsights.v1.Dimension + * @instance + */ + Object.defineProperty(Dimension.prototype, "dimensionMetadata", { + get: $util.oneOfGetter($oneOfFields = ["issueDimensionMetadata", "agentDimensionMetadata", "qaQuestionDimensionMetadata", "qaQuestionAnswerDimensionMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Dimension instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.Dimension + * @static + * @param {google.cloud.contactcenterinsights.v1.IDimension=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.Dimension} Dimension instance + */ + Dimension.create = function create(properties) { + return new Dimension(properties); + }; + + /** + * Encodes the specified Dimension message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Dimension.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.Dimension + * @static + * @param {google.cloud.contactcenterinsights.v1.IDimension} message Dimension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Dimension.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionKey != null && Object.hasOwnProperty.call(message, "dimensionKey")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.dimensionKey); + if (message.issueDimensionMetadata != null && Object.hasOwnProperty.call(message, "issueDimensionMetadata")) + $root.google.cloud.contactcenterinsights.v1.Dimension.IssueDimensionMetadata.encode(message.issueDimensionMetadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.agentDimensionMetadata != null && Object.hasOwnProperty.call(message, "agentDimensionMetadata")) + $root.google.cloud.contactcenterinsights.v1.Dimension.AgentDimensionMetadata.encode(message.agentDimensionMetadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.qaQuestionDimensionMetadata != null && Object.hasOwnProperty.call(message, "qaQuestionDimensionMetadata")) + $root.google.cloud.contactcenterinsights.v1.Dimension.QaQuestionDimensionMetadata.encode(message.qaQuestionDimensionMetadata, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.qaQuestionAnswerDimensionMetadata != null && Object.hasOwnProperty.call(message, "qaQuestionAnswerDimensionMetadata")) + $root.google.cloud.contactcenterinsights.v1.Dimension.QaQuestionAnswerDimensionMetadata.encode(message.qaQuestionAnswerDimensionMetadata, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Dimension message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Dimension.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Dimension + * @static + * @param {google.cloud.contactcenterinsights.v1.IDimension} message Dimension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Dimension.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Dimension message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.Dimension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.Dimension} Dimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Dimension.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Dimension(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.issueDimensionMetadata = $root.google.cloud.contactcenterinsights.v1.Dimension.IssueDimensionMetadata.decode(reader, reader.uint32()); + break; + } + case 3: { + message.agentDimensionMetadata = $root.google.cloud.contactcenterinsights.v1.Dimension.AgentDimensionMetadata.decode(reader, reader.uint32()); + break; + } + case 4: { + message.qaQuestionDimensionMetadata = $root.google.cloud.contactcenterinsights.v1.Dimension.QaQuestionDimensionMetadata.decode(reader, reader.uint32()); + break; + } + case 5: { + message.qaQuestionAnswerDimensionMetadata = $root.google.cloud.contactcenterinsights.v1.Dimension.QaQuestionAnswerDimensionMetadata.decode(reader, reader.uint32()); + break; + } + case 1: { + message.dimensionKey = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Dimension message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Dimension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.Dimension} Dimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Dimension.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Dimension message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.Dimension + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Dimension.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.issueDimensionMetadata != null && message.hasOwnProperty("issueDimensionMetadata")) { + properties.dimensionMetadata = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.Dimension.IssueDimensionMetadata.verify(message.issueDimensionMetadata); + if (error) + return "issueDimensionMetadata." + error; + } + } + if (message.agentDimensionMetadata != null && message.hasOwnProperty("agentDimensionMetadata")) { + if (properties.dimensionMetadata === 1) + return "dimensionMetadata: multiple values"; + properties.dimensionMetadata = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.Dimension.AgentDimensionMetadata.verify(message.agentDimensionMetadata); + if (error) + return "agentDimensionMetadata." + error; + } + } + if (message.qaQuestionDimensionMetadata != null && message.hasOwnProperty("qaQuestionDimensionMetadata")) { + if (properties.dimensionMetadata === 1) + return "dimensionMetadata: multiple values"; + properties.dimensionMetadata = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.Dimension.QaQuestionDimensionMetadata.verify(message.qaQuestionDimensionMetadata); + if (error) + return "qaQuestionDimensionMetadata." + error; + } + } + if (message.qaQuestionAnswerDimensionMetadata != null && message.hasOwnProperty("qaQuestionAnswerDimensionMetadata")) { + if (properties.dimensionMetadata === 1) + return "dimensionMetadata: multiple values"; + properties.dimensionMetadata = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.Dimension.QaQuestionAnswerDimensionMetadata.verify(message.qaQuestionAnswerDimensionMetadata); + if (error) + return "qaQuestionAnswerDimensionMetadata." + error; + } + } + if (message.dimensionKey != null && message.hasOwnProperty("dimensionKey")) + switch (message.dimensionKey) { + default: + return "dimensionKey: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + return null; + }; + + /** + * Creates a Dimension message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.Dimension + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.Dimension} Dimension + */ + Dimension.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.Dimension) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.Dimension(); + if (object.issueDimensionMetadata != null) { + if (typeof object.issueDimensionMetadata !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Dimension.issueDimensionMetadata: object expected"); + message.issueDimensionMetadata = $root.google.cloud.contactcenterinsights.v1.Dimension.IssueDimensionMetadata.fromObject(object.issueDimensionMetadata); + } + if (object.agentDimensionMetadata != null) { + if (typeof object.agentDimensionMetadata !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Dimension.agentDimensionMetadata: object expected"); + message.agentDimensionMetadata = $root.google.cloud.contactcenterinsights.v1.Dimension.AgentDimensionMetadata.fromObject(object.agentDimensionMetadata); + } + if (object.qaQuestionDimensionMetadata != null) { + if (typeof object.qaQuestionDimensionMetadata !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Dimension.qaQuestionDimensionMetadata: object expected"); + message.qaQuestionDimensionMetadata = $root.google.cloud.contactcenterinsights.v1.Dimension.QaQuestionDimensionMetadata.fromObject(object.qaQuestionDimensionMetadata); + } + if (object.qaQuestionAnswerDimensionMetadata != null) { + if (typeof object.qaQuestionAnswerDimensionMetadata !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Dimension.qaQuestionAnswerDimensionMetadata: object expected"); + message.qaQuestionAnswerDimensionMetadata = $root.google.cloud.contactcenterinsights.v1.Dimension.QaQuestionAnswerDimensionMetadata.fromObject(object.qaQuestionAnswerDimensionMetadata); + } + switch (object.dimensionKey) { + default: + if (typeof object.dimensionKey === "number") { + message.dimensionKey = object.dimensionKey; + break; + } + break; + case "DIMENSION_KEY_UNSPECIFIED": + case 0: + message.dimensionKey = 0; + break; + case "ISSUE": + case 1: + message.dimensionKey = 1; + break; + case "AGENT": + case 2: + message.dimensionKey = 2; + break; + case "AGENT_TEAM": + case 3: + message.dimensionKey = 3; + break; + case "QA_QUESTION_ID": + case 4: + message.dimensionKey = 4; + break; + case "QA_QUESTION_ANSWER_VALUE": + case 5: + message.dimensionKey = 5; + break; + case "CONVERSATION_PROFILE_ID": + case 6: + message.dimensionKey = 6; + break; + } + return message; + }; + + /** + * Creates a plain object from a Dimension message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.Dimension + * @static + * @param {google.cloud.contactcenterinsights.v1.Dimension} message Dimension + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Dimension.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.dimensionKey = options.enums === String ? "DIMENSION_KEY_UNSPECIFIED" : 0; + if (message.dimensionKey != null && message.hasOwnProperty("dimensionKey")) + object.dimensionKey = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.Dimension.DimensionKey[message.dimensionKey] === undefined ? message.dimensionKey : $root.google.cloud.contactcenterinsights.v1.Dimension.DimensionKey[message.dimensionKey] : message.dimensionKey; + if (message.issueDimensionMetadata != null && message.hasOwnProperty("issueDimensionMetadata")) { + object.issueDimensionMetadata = $root.google.cloud.contactcenterinsights.v1.Dimension.IssueDimensionMetadata.toObject(message.issueDimensionMetadata, options); + if (options.oneofs) + object.dimensionMetadata = "issueDimensionMetadata"; + } + if (message.agentDimensionMetadata != null && message.hasOwnProperty("agentDimensionMetadata")) { + object.agentDimensionMetadata = $root.google.cloud.contactcenterinsights.v1.Dimension.AgentDimensionMetadata.toObject(message.agentDimensionMetadata, options); + if (options.oneofs) + object.dimensionMetadata = "agentDimensionMetadata"; + } + if (message.qaQuestionDimensionMetadata != null && message.hasOwnProperty("qaQuestionDimensionMetadata")) { + object.qaQuestionDimensionMetadata = $root.google.cloud.contactcenterinsights.v1.Dimension.QaQuestionDimensionMetadata.toObject(message.qaQuestionDimensionMetadata, options); + if (options.oneofs) + object.dimensionMetadata = "qaQuestionDimensionMetadata"; + } + if (message.qaQuestionAnswerDimensionMetadata != null && message.hasOwnProperty("qaQuestionAnswerDimensionMetadata")) { + object.qaQuestionAnswerDimensionMetadata = $root.google.cloud.contactcenterinsights.v1.Dimension.QaQuestionAnswerDimensionMetadata.toObject(message.qaQuestionAnswerDimensionMetadata, options); + if (options.oneofs) + object.dimensionMetadata = "qaQuestionAnswerDimensionMetadata"; + } + return object; + }; + + /** + * Converts this Dimension to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.Dimension + * @instance + * @returns {Object.} JSON object + */ + Dimension.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Dimension + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.Dimension + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Dimension.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Dimension"; + }; + + Dimension.IssueDimensionMetadata = (function() { + + /** + * Properties of an IssueDimensionMetadata. + * @memberof google.cloud.contactcenterinsights.v1.Dimension + * @interface IIssueDimensionMetadata + * @property {string|null} [issueId] IssueDimensionMetadata issueId + * @property {string|null} [issueDisplayName] IssueDimensionMetadata issueDisplayName + * @property {string|null} [issueModelId] IssueDimensionMetadata issueModelId + */ + + /** + * Constructs a new IssueDimensionMetadata. + * @memberof google.cloud.contactcenterinsights.v1.Dimension + * @classdesc Represents an IssueDimensionMetadata. + * @implements IIssueDimensionMetadata + * @constructor + * @param {google.cloud.contactcenterinsights.v1.Dimension.IIssueDimensionMetadata=} [properties] Properties to set + */ + function IssueDimensionMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IssueDimensionMetadata issueId. + * @member {string} issueId + * @memberof google.cloud.contactcenterinsights.v1.Dimension.IssueDimensionMetadata + * @instance + */ + IssueDimensionMetadata.prototype.issueId = ""; + + /** + * IssueDimensionMetadata issueDisplayName. + * @member {string} issueDisplayName + * @memberof google.cloud.contactcenterinsights.v1.Dimension.IssueDimensionMetadata + * @instance + */ + IssueDimensionMetadata.prototype.issueDisplayName = ""; + + /** + * IssueDimensionMetadata issueModelId. + * @member {string} issueModelId + * @memberof google.cloud.contactcenterinsights.v1.Dimension.IssueDimensionMetadata + * @instance + */ + IssueDimensionMetadata.prototype.issueModelId = ""; + + /** + * Creates a new IssueDimensionMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.Dimension.IssueDimensionMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.Dimension.IIssueDimensionMetadata=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.Dimension.IssueDimensionMetadata} IssueDimensionMetadata instance + */ + IssueDimensionMetadata.create = function create(properties) { + return new IssueDimensionMetadata(properties); + }; + + /** + * Encodes the specified IssueDimensionMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Dimension.IssueDimensionMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.Dimension.IssueDimensionMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.Dimension.IIssueDimensionMetadata} message IssueDimensionMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IssueDimensionMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.issueId != null && Object.hasOwnProperty.call(message, "issueId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.issueId); + if (message.issueDisplayName != null && Object.hasOwnProperty.call(message, "issueDisplayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.issueDisplayName); + if (message.issueModelId != null && Object.hasOwnProperty.call(message, "issueModelId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.issueModelId); + return writer; + }; + + /** + * Encodes the specified IssueDimensionMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Dimension.IssueDimensionMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Dimension.IssueDimensionMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.Dimension.IIssueDimensionMetadata} message IssueDimensionMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IssueDimensionMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IssueDimensionMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.Dimension.IssueDimensionMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.Dimension.IssueDimensionMetadata} IssueDimensionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IssueDimensionMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Dimension.IssueDimensionMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.issueId = reader.string(); + break; + } + case 2: { + message.issueDisplayName = reader.string(); + break; + } + case 3: { + message.issueModelId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IssueDimensionMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Dimension.IssueDimensionMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.Dimension.IssueDimensionMetadata} IssueDimensionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IssueDimensionMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IssueDimensionMetadata message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.Dimension.IssueDimensionMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IssueDimensionMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.issueId != null && message.hasOwnProperty("issueId")) + if (!$util.isString(message.issueId)) + return "issueId: string expected"; + if (message.issueDisplayName != null && message.hasOwnProperty("issueDisplayName")) + if (!$util.isString(message.issueDisplayName)) + return "issueDisplayName: string expected"; + if (message.issueModelId != null && message.hasOwnProperty("issueModelId")) + if (!$util.isString(message.issueModelId)) + return "issueModelId: string expected"; + return null; + }; + + /** + * Creates an IssueDimensionMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript + * @memberof google.cloud.contactcenterinsights.v1.Dimension.IssueDimensionMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript} Transcript + * @returns {google.cloud.contactcenterinsights.v1.Dimension.IssueDimensionMetadata} IssueDimensionMetadata */ - Transcript.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript) + IssueDimensionMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.Dimension.IssueDimensionMetadata) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript(); - if (object.transcriptSegments) { - if (!Array.isArray(object.transcriptSegments)) - throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.Transcript.transcriptSegments: array expected"); - message.transcriptSegments = []; - for (var i = 0; i < object.transcriptSegments.length; ++i) { - if (typeof object.transcriptSegments[i] !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.Transcript.transcriptSegments: object expected"); - message.transcriptSegments[i] = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.fromObject(object.transcriptSegments[i]); - } - } + var message = new $root.google.cloud.contactcenterinsights.v1.Dimension.IssueDimensionMetadata(); + if (object.issueId != null) + message.issueId = String(object.issueId); + if (object.issueDisplayName != null) + message.issueDisplayName = String(object.issueDisplayName); + if (object.issueModelId != null) + message.issueModelId = String(object.issueModelId); return message; }; /** - * Creates a plain object from a Transcript message. Also converts values to other types if specified. + * Creates a plain object from an IssueDimensionMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript + * @memberof google.cloud.contactcenterinsights.v1.Dimension.IssueDimensionMetadata * @static - * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript} message Transcript + * @param {google.cloud.contactcenterinsights.v1.Dimension.IssueDimensionMetadata} message IssueDimensionMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Transcript.toObject = function toObject(message, options) { + IssueDimensionMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.transcriptSegments = []; - if (message.transcriptSegments && message.transcriptSegments.length) { - object.transcriptSegments = []; - for (var j = 0; j < message.transcriptSegments.length; ++j) - object.transcriptSegments[j] = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.toObject(message.transcriptSegments[j], options); + if (options.defaults) { + object.issueId = ""; + object.issueDisplayName = ""; + object.issueModelId = ""; } + if (message.issueId != null && message.hasOwnProperty("issueId")) + object.issueId = message.issueId; + if (message.issueDisplayName != null && message.hasOwnProperty("issueDisplayName")) + object.issueDisplayName = message.issueDisplayName; + if (message.issueModelId != null && message.hasOwnProperty("issueModelId")) + object.issueModelId = message.issueModelId; return object; }; /** - * Converts this Transcript to JSON. + * Converts this IssueDimensionMetadata to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript + * @memberof google.cloud.contactcenterinsights.v1.Dimension.IssueDimensionMetadata * @instance * @returns {Object.} JSON object */ - Transcript.prototype.toJSON = function toJSON() { + IssueDimensionMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Transcript + * Gets the default type url for IssueDimensionMetadata * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript + * @memberof google.cloud.contactcenterinsights.v1.Dimension.IssueDimensionMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Transcript.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + IssueDimensionMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Conversation.Transcript"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Dimension.IssueDimensionMetadata"; }; - Transcript.TranscriptSegment = (function() { + return IssueDimensionMetadata; + })(); - /** - * Properties of a TranscriptSegment. - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript - * @interface ITranscriptSegment - * @property {google.protobuf.ITimestamp|null} [messageTime] TranscriptSegment messageTime - * @property {string|null} [text] TranscriptSegment text - * @property {number|null} [confidence] TranscriptSegment confidence - * @property {Array.|null} [words] TranscriptSegment words - * @property {string|null} [languageCode] TranscriptSegment languageCode - * @property {number|null} [channelTag] TranscriptSegment channelTag - * @property {google.cloud.contactcenterinsights.v1.IConversationParticipant|null} [segmentParticipant] TranscriptSegment segmentParticipant - * @property {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IDialogflowSegmentMetadata|null} [dialogflowSegmentMetadata] TranscriptSegment dialogflowSegmentMetadata - * @property {google.cloud.contactcenterinsights.v1.ISentimentData|null} [sentiment] TranscriptSegment sentiment - */ + Dimension.AgentDimensionMetadata = (function() { - /** - * Constructs a new TranscriptSegment. - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript - * @classdesc Represents a TranscriptSegment. - * @implements ITranscriptSegment - * @constructor - * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.ITranscriptSegment=} [properties] Properties to set - */ - function TranscriptSegment(properties) { - this.words = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of an AgentDimensionMetadata. + * @memberof google.cloud.contactcenterinsights.v1.Dimension + * @interface IAgentDimensionMetadata + * @property {string|null} [agentId] AgentDimensionMetadata agentId + * @property {string|null} [agentDisplayName] AgentDimensionMetadata agentDisplayName + * @property {string|null} [agentTeam] AgentDimensionMetadata agentTeam + */ - /** - * TranscriptSegment messageTime. - * @member {google.protobuf.ITimestamp|null|undefined} messageTime - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment - * @instance - */ - TranscriptSegment.prototype.messageTime = null; + /** + * Constructs a new AgentDimensionMetadata. + * @memberof google.cloud.contactcenterinsights.v1.Dimension + * @classdesc Represents an AgentDimensionMetadata. + * @implements IAgentDimensionMetadata + * @constructor + * @param {google.cloud.contactcenterinsights.v1.Dimension.IAgentDimensionMetadata=} [properties] Properties to set + */ + function AgentDimensionMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * TranscriptSegment text. - * @member {string} text - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment - * @instance - */ - TranscriptSegment.prototype.text = ""; + /** + * AgentDimensionMetadata agentId. + * @member {string} agentId + * @memberof google.cloud.contactcenterinsights.v1.Dimension.AgentDimensionMetadata + * @instance + */ + AgentDimensionMetadata.prototype.agentId = ""; - /** - * TranscriptSegment confidence. - * @member {number} confidence - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment - * @instance - */ - TranscriptSegment.prototype.confidence = 0; + /** + * AgentDimensionMetadata agentDisplayName. + * @member {string} agentDisplayName + * @memberof google.cloud.contactcenterinsights.v1.Dimension.AgentDimensionMetadata + * @instance + */ + AgentDimensionMetadata.prototype.agentDisplayName = ""; - /** - * TranscriptSegment words. - * @member {Array.} words - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment - * @instance - */ - TranscriptSegment.prototype.words = $util.emptyArray; + /** + * AgentDimensionMetadata agentTeam. + * @member {string} agentTeam + * @memberof google.cloud.contactcenterinsights.v1.Dimension.AgentDimensionMetadata + * @instance + */ + AgentDimensionMetadata.prototype.agentTeam = ""; - /** - * TranscriptSegment languageCode. - * @member {string} languageCode - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment - * @instance - */ - TranscriptSegment.prototype.languageCode = ""; - - /** - * TranscriptSegment channelTag. - * @member {number} channelTag - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment - * @instance - */ - TranscriptSegment.prototype.channelTag = 0; - - /** - * TranscriptSegment segmentParticipant. - * @member {google.cloud.contactcenterinsights.v1.IConversationParticipant|null|undefined} segmentParticipant - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment - * @instance - */ - TranscriptSegment.prototype.segmentParticipant = null; - - /** - * TranscriptSegment dialogflowSegmentMetadata. - * @member {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IDialogflowSegmentMetadata|null|undefined} dialogflowSegmentMetadata - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment - * @instance - */ - TranscriptSegment.prototype.dialogflowSegmentMetadata = null; - - /** - * TranscriptSegment sentiment. - * @member {google.cloud.contactcenterinsights.v1.ISentimentData|null|undefined} sentiment - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment - * @instance - */ - TranscriptSegment.prototype.sentiment = null; - - /** - * Creates a new TranscriptSegment instance using the specified properties. - * @function create - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment - * @static - * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.ITranscriptSegment=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment} TranscriptSegment instance - */ - TranscriptSegment.create = function create(properties) { - return new TranscriptSegment(properties); - }; + /** + * Creates a new AgentDimensionMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.Dimension.AgentDimensionMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.Dimension.IAgentDimensionMetadata=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.Dimension.AgentDimensionMetadata} AgentDimensionMetadata instance + */ + AgentDimensionMetadata.create = function create(properties) { + return new AgentDimensionMetadata(properties); + }; - /** - * Encodes the specified TranscriptSegment message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.verify|verify} messages. - * @function encode - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment - * @static - * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.ITranscriptSegment} message TranscriptSegment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TranscriptSegment.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.confidence != null && Object.hasOwnProperty.call(message, "confidence")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence); - if (message.words != null && message.words.length) - for (var i = 0; i < message.words.length; ++i) - $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo.encode(message.words[i], 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.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.channelTag); - if (message.messageTime != null && Object.hasOwnProperty.call(message, "messageTime")) - $root.google.protobuf.Timestamp.encode(message.messageTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.segmentParticipant != null && Object.hasOwnProperty.call(message, "segmentParticipant")) - $root.google.cloud.contactcenterinsights.v1.ConversationParticipant.encode(message.segmentParticipant, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.dialogflowSegmentMetadata != null && Object.hasOwnProperty.call(message, "dialogflowSegmentMetadata")) - $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata.encode(message.dialogflowSegmentMetadata, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.sentiment != null && Object.hasOwnProperty.call(message, "sentiment")) - $root.google.cloud.contactcenterinsights.v1.SentimentData.encode(message.sentiment, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified AgentDimensionMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Dimension.AgentDimensionMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.Dimension.AgentDimensionMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.Dimension.IAgentDimensionMetadata} message AgentDimensionMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AgentDimensionMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.agentId != null && Object.hasOwnProperty.call(message, "agentId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.agentId); + if (message.agentDisplayName != null && Object.hasOwnProperty.call(message, "agentDisplayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.agentDisplayName); + if (message.agentTeam != null && Object.hasOwnProperty.call(message, "agentTeam")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.agentTeam); + return writer; + }; - /** - * Encodes the specified TranscriptSegment message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment - * @static - * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.ITranscriptSegment} message TranscriptSegment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TranscriptSegment.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified AgentDimensionMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Dimension.AgentDimensionMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Dimension.AgentDimensionMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.Dimension.IAgentDimensionMetadata} message AgentDimensionMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AgentDimensionMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a TranscriptSegment message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment} TranscriptSegment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TranscriptSegment.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 6: { - message.messageTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 1: { - message.text = reader.string(); - break; - } - case 2: { - message.confidence = reader.float(); - break; - } - case 3: { - if (!(message.words && message.words.length)) - message.words = []; - message.words.push($root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo.decode(reader, reader.uint32())); - break; - } - case 4: { - message.languageCode = reader.string(); - break; - } - case 5: { - message.channelTag = reader.int32(); - break; - } - case 9: { - message.segmentParticipant = $root.google.cloud.contactcenterinsights.v1.ConversationParticipant.decode(reader, reader.uint32()); - break; - } - case 10: { - message.dialogflowSegmentMetadata = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata.decode(reader, reader.uint32()); - break; - } - case 11: { - message.sentiment = $root.google.cloud.contactcenterinsights.v1.SentimentData.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); + /** + * Decodes an AgentDimensionMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.Dimension.AgentDimensionMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.Dimension.AgentDimensionMetadata} AgentDimensionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AgentDimensionMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Dimension.AgentDimensionMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.agentId = reader.string(); break; } - } - return message; - }; - - /** - * Decodes a TranscriptSegment message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment} TranscriptSegment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TranscriptSegment.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TranscriptSegment message. - * @function verify - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TranscriptSegment.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.messageTime != null && message.hasOwnProperty("messageTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.messageTime); - if (error) - return "messageTime." + error; - } - if (message.text != null && message.hasOwnProperty("text")) - if (!$util.isString(message.text)) - return "text: string expected"; - if (message.confidence != null && message.hasOwnProperty("confidence")) - if (typeof message.confidence !== "number") - return "confidence: number expected"; - if (message.words != null && message.hasOwnProperty("words")) { - if (!Array.isArray(message.words)) - return "words: array expected"; - for (var i = 0; i < message.words.length; ++i) { - var error = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo.verify(message.words[i]); - if (error) - return "words." + error; + case 2: { + message.agentDisplayName = reader.string(); + break; } - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - if (message.channelTag != null && message.hasOwnProperty("channelTag")) - if (!$util.isInteger(message.channelTag)) - return "channelTag: integer expected"; - if (message.segmentParticipant != null && message.hasOwnProperty("segmentParticipant")) { - var error = $root.google.cloud.contactcenterinsights.v1.ConversationParticipant.verify(message.segmentParticipant); - if (error) - return "segmentParticipant." + error; - } - if (message.dialogflowSegmentMetadata != null && message.hasOwnProperty("dialogflowSegmentMetadata")) { - var error = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata.verify(message.dialogflowSegmentMetadata); - if (error) - return "dialogflowSegmentMetadata." + error; - } - if (message.sentiment != null && message.hasOwnProperty("sentiment")) { - var error = $root.google.cloud.contactcenterinsights.v1.SentimentData.verify(message.sentiment); - if (error) - return "sentiment." + error; - } - return null; - }; - - /** - * Creates a TranscriptSegment message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment} TranscriptSegment - */ - TranscriptSegment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment) - return object; - var message = new $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment(); - if (object.messageTime != null) { - if (typeof object.messageTime !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.messageTime: object expected"); - message.messageTime = $root.google.protobuf.Timestamp.fromObject(object.messageTime); - } - if (object.text != null) - message.text = String(object.text); - if (object.confidence != null) - message.confidence = Number(object.confidence); - if (object.words) { - if (!Array.isArray(object.words)) - throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.words: array expected"); - message.words = []; - for (var i = 0; i < object.words.length; ++i) { - if (typeof object.words[i] !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.words: object expected"); - message.words[i] = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo.fromObject(object.words[i]); + case 3: { + message.agentTeam = reader.string(); + break; } + default: + reader.skipType(tag & 7); + break; } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - if (object.channelTag != null) - message.channelTag = object.channelTag | 0; - if (object.segmentParticipant != null) { - if (typeof object.segmentParticipant !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.segmentParticipant: object expected"); - message.segmentParticipant = $root.google.cloud.contactcenterinsights.v1.ConversationParticipant.fromObject(object.segmentParticipant); - } - if (object.dialogflowSegmentMetadata != null) { - if (typeof object.dialogflowSegmentMetadata !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.dialogflowSegmentMetadata: object expected"); - message.dialogflowSegmentMetadata = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata.fromObject(object.dialogflowSegmentMetadata); - } - if (object.sentiment != null) { - if (typeof object.sentiment !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.sentiment: object expected"); - message.sentiment = $root.google.cloud.contactcenterinsights.v1.SentimentData.fromObject(object.sentiment); - } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from a TranscriptSegment message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment - * @static - * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment} message TranscriptSegment - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TranscriptSegment.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.words = []; - if (options.defaults) { - object.text = ""; - object.confidence = 0; - object.languageCode = ""; - object.channelTag = 0; - object.messageTime = null; - object.segmentParticipant = null; - object.dialogflowSegmentMetadata = null; - object.sentiment = null; - } - if (message.text != null && message.hasOwnProperty("text")) - object.text = message.text; - if (message.confidence != null && message.hasOwnProperty("confidence")) - object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; - if (message.words && message.words.length) { - object.words = []; - for (var j = 0; j < message.words.length; ++j) - object.words[j] = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo.toObject(message.words[j], options); - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - if (message.channelTag != null && message.hasOwnProperty("channelTag")) - object.channelTag = message.channelTag; - if (message.messageTime != null && message.hasOwnProperty("messageTime")) - object.messageTime = $root.google.protobuf.Timestamp.toObject(message.messageTime, options); - if (message.segmentParticipant != null && message.hasOwnProperty("segmentParticipant")) - object.segmentParticipant = $root.google.cloud.contactcenterinsights.v1.ConversationParticipant.toObject(message.segmentParticipant, options); - if (message.dialogflowSegmentMetadata != null && message.hasOwnProperty("dialogflowSegmentMetadata")) - object.dialogflowSegmentMetadata = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata.toObject(message.dialogflowSegmentMetadata, options); - if (message.sentiment != null && message.hasOwnProperty("sentiment")) - object.sentiment = $root.google.cloud.contactcenterinsights.v1.SentimentData.toObject(message.sentiment, options); - return object; - }; + /** + * Decodes an AgentDimensionMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Dimension.AgentDimensionMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.Dimension.AgentDimensionMetadata} AgentDimensionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AgentDimensionMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this TranscriptSegment to JSON. - * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment - * @instance - * @returns {Object.} JSON object - */ - TranscriptSegment.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies an AgentDimensionMetadata message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.Dimension.AgentDimensionMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AgentDimensionMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.agentId != null && message.hasOwnProperty("agentId")) + if (!$util.isString(message.agentId)) + return "agentId: string expected"; + if (message.agentDisplayName != null && message.hasOwnProperty("agentDisplayName")) + if (!$util.isString(message.agentDisplayName)) + return "agentDisplayName: string expected"; + if (message.agentTeam != null && message.hasOwnProperty("agentTeam")) + if (!$util.isString(message.agentTeam)) + return "agentTeam: string expected"; + return null; + }; - /** - * Gets the default type url for TranscriptSegment - * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TranscriptSegment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment"; - }; + /** + * Creates an AgentDimensionMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.Dimension.AgentDimensionMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.Dimension.AgentDimensionMetadata} AgentDimensionMetadata + */ + AgentDimensionMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.Dimension.AgentDimensionMetadata) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.Dimension.AgentDimensionMetadata(); + if (object.agentId != null) + message.agentId = String(object.agentId); + if (object.agentDisplayName != null) + message.agentDisplayName = String(object.agentDisplayName); + if (object.agentTeam != null) + message.agentTeam = String(object.agentTeam); + return message; + }; - TranscriptSegment.WordInfo = (function() { + /** + * Creates a plain object from an AgentDimensionMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.Dimension.AgentDimensionMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.Dimension.AgentDimensionMetadata} message AgentDimensionMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AgentDimensionMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.agentId = ""; + object.agentDisplayName = ""; + object.agentTeam = ""; + } + if (message.agentId != null && message.hasOwnProperty("agentId")) + object.agentId = message.agentId; + if (message.agentDisplayName != null && message.hasOwnProperty("agentDisplayName")) + object.agentDisplayName = message.agentDisplayName; + if (message.agentTeam != null && message.hasOwnProperty("agentTeam")) + object.agentTeam = message.agentTeam; + return object; + }; - /** - * Properties of a WordInfo. - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment - * @interface IWordInfo - * @property {google.protobuf.IDuration|null} [startOffset] WordInfo startOffset - * @property {google.protobuf.IDuration|null} [endOffset] WordInfo endOffset - * @property {string|null} [word] WordInfo word - * @property {number|null} [confidence] WordInfo confidence - */ + /** + * Converts this AgentDimensionMetadata to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.Dimension.AgentDimensionMetadata + * @instance + * @returns {Object.} JSON object + */ + AgentDimensionMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new WordInfo. - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment - * @classdesc Represents a WordInfo. - * @implements IWordInfo - * @constructor - * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IWordInfo=} [properties] Properties to set - */ - function WordInfo(properties) { - if (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 AgentDimensionMetadata + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.Dimension.AgentDimensionMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AgentDimensionMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Dimension.AgentDimensionMetadata"; + }; - /** - * WordInfo startOffset. - * @member {google.protobuf.IDuration|null|undefined} startOffset - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo - * @instance - */ - WordInfo.prototype.startOffset = null; + return AgentDimensionMetadata; + })(); - /** - * WordInfo endOffset. - * @member {google.protobuf.IDuration|null|undefined} endOffset - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo - * @instance - */ - WordInfo.prototype.endOffset = null; + Dimension.QaQuestionDimensionMetadata = (function() { - /** - * WordInfo word. - * @member {string} word - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo - * @instance - */ - WordInfo.prototype.word = ""; + /** + * Properties of a QaQuestionDimensionMetadata. + * @memberof google.cloud.contactcenterinsights.v1.Dimension + * @interface IQaQuestionDimensionMetadata + * @property {string|null} [qaScorecardId] QaQuestionDimensionMetadata qaScorecardId + * @property {string|null} [qaQuestionId] QaQuestionDimensionMetadata qaQuestionId + * @property {string|null} [questionBody] QaQuestionDimensionMetadata questionBody + */ - /** + /** + * Constructs a new QaQuestionDimensionMetadata. + * @memberof google.cloud.contactcenterinsights.v1.Dimension + * @classdesc Represents a QaQuestionDimensionMetadata. + * @implements IQaQuestionDimensionMetadata + * @constructor + * @param {google.cloud.contactcenterinsights.v1.Dimension.IQaQuestionDimensionMetadata=} [properties] Properties to set + */ + function QaQuestionDimensionMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QaQuestionDimensionMetadata qaScorecardId. + * @member {string} qaScorecardId + * @memberof google.cloud.contactcenterinsights.v1.Dimension.QaQuestionDimensionMetadata + * @instance + */ + QaQuestionDimensionMetadata.prototype.qaScorecardId = ""; + + /** + * QaQuestionDimensionMetadata qaQuestionId. + * @member {string} qaQuestionId + * @memberof google.cloud.contactcenterinsights.v1.Dimension.QaQuestionDimensionMetadata + * @instance + */ + QaQuestionDimensionMetadata.prototype.qaQuestionId = ""; + + /** + * QaQuestionDimensionMetadata questionBody. + * @member {string} questionBody + * @memberof google.cloud.contactcenterinsights.v1.Dimension.QaQuestionDimensionMetadata + * @instance + */ + QaQuestionDimensionMetadata.prototype.questionBody = ""; + + /** + * Creates a new QaQuestionDimensionMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.Dimension.QaQuestionDimensionMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.Dimension.IQaQuestionDimensionMetadata=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.Dimension.QaQuestionDimensionMetadata} QaQuestionDimensionMetadata instance + */ + QaQuestionDimensionMetadata.create = function create(properties) { + return new QaQuestionDimensionMetadata(properties); + }; + + /** + * Encodes the specified QaQuestionDimensionMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Dimension.QaQuestionDimensionMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.Dimension.QaQuestionDimensionMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.Dimension.IQaQuestionDimensionMetadata} message QaQuestionDimensionMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QaQuestionDimensionMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.qaScorecardId != null && Object.hasOwnProperty.call(message, "qaScorecardId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.qaScorecardId); + if (message.qaQuestionId != null && Object.hasOwnProperty.call(message, "qaQuestionId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.qaQuestionId); + if (message.questionBody != null && Object.hasOwnProperty.call(message, "questionBody")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.questionBody); + return writer; + }; + + /** + * Encodes the specified QaQuestionDimensionMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Dimension.QaQuestionDimensionMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Dimension.QaQuestionDimensionMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.Dimension.IQaQuestionDimensionMetadata} message QaQuestionDimensionMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QaQuestionDimensionMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QaQuestionDimensionMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.Dimension.QaQuestionDimensionMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.Dimension.QaQuestionDimensionMetadata} QaQuestionDimensionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QaQuestionDimensionMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Dimension.QaQuestionDimensionMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.qaScorecardId = reader.string(); + break; + } + case 2: { + message.qaQuestionId = reader.string(); + break; + } + case 3: { + message.questionBody = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QaQuestionDimensionMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Dimension.QaQuestionDimensionMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.Dimension.QaQuestionDimensionMetadata} QaQuestionDimensionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QaQuestionDimensionMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QaQuestionDimensionMetadata message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.Dimension.QaQuestionDimensionMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QaQuestionDimensionMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.qaScorecardId != null && message.hasOwnProperty("qaScorecardId")) + if (!$util.isString(message.qaScorecardId)) + return "qaScorecardId: string expected"; + if (message.qaQuestionId != null && message.hasOwnProperty("qaQuestionId")) + if (!$util.isString(message.qaQuestionId)) + return "qaQuestionId: string expected"; + if (message.questionBody != null && message.hasOwnProperty("questionBody")) + if (!$util.isString(message.questionBody)) + return "questionBody: string expected"; + return null; + }; + + /** + * Creates a QaQuestionDimensionMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.Dimension.QaQuestionDimensionMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.Dimension.QaQuestionDimensionMetadata} QaQuestionDimensionMetadata + */ + QaQuestionDimensionMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.Dimension.QaQuestionDimensionMetadata) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.Dimension.QaQuestionDimensionMetadata(); + if (object.qaScorecardId != null) + message.qaScorecardId = String(object.qaScorecardId); + if (object.qaQuestionId != null) + message.qaQuestionId = String(object.qaQuestionId); + if (object.questionBody != null) + message.questionBody = String(object.questionBody); + return message; + }; + + /** + * Creates a plain object from a QaQuestionDimensionMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.Dimension.QaQuestionDimensionMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.Dimension.QaQuestionDimensionMetadata} message QaQuestionDimensionMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QaQuestionDimensionMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.qaScorecardId = ""; + object.qaQuestionId = ""; + object.questionBody = ""; + } + if (message.qaScorecardId != null && message.hasOwnProperty("qaScorecardId")) + object.qaScorecardId = message.qaScorecardId; + if (message.qaQuestionId != null && message.hasOwnProperty("qaQuestionId")) + object.qaQuestionId = message.qaQuestionId; + if (message.questionBody != null && message.hasOwnProperty("questionBody")) + object.questionBody = message.questionBody; + return object; + }; + + /** + * Converts this QaQuestionDimensionMetadata to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.Dimension.QaQuestionDimensionMetadata + * @instance + * @returns {Object.} JSON object + */ + QaQuestionDimensionMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QaQuestionDimensionMetadata + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.Dimension.QaQuestionDimensionMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QaQuestionDimensionMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Dimension.QaQuestionDimensionMetadata"; + }; + + return QaQuestionDimensionMetadata; + })(); + + Dimension.QaQuestionAnswerDimensionMetadata = (function() { + + /** + * Properties of a QaQuestionAnswerDimensionMetadata. + * @memberof google.cloud.contactcenterinsights.v1.Dimension + * @interface IQaQuestionAnswerDimensionMetadata + * @property {string|null} [qaScorecardId] QaQuestionAnswerDimensionMetadata qaScorecardId + * @property {string|null} [qaQuestionId] QaQuestionAnswerDimensionMetadata qaQuestionId + * @property {string|null} [questionBody] QaQuestionAnswerDimensionMetadata questionBody + * @property {string|null} [answerValue] QaQuestionAnswerDimensionMetadata answerValue + */ + + /** + * Constructs a new QaQuestionAnswerDimensionMetadata. + * @memberof google.cloud.contactcenterinsights.v1.Dimension + * @classdesc Represents a QaQuestionAnswerDimensionMetadata. + * @implements IQaQuestionAnswerDimensionMetadata + * @constructor + * @param {google.cloud.contactcenterinsights.v1.Dimension.IQaQuestionAnswerDimensionMetadata=} [properties] Properties to set + */ + function QaQuestionAnswerDimensionMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QaQuestionAnswerDimensionMetadata qaScorecardId. + * @member {string} qaScorecardId + * @memberof google.cloud.contactcenterinsights.v1.Dimension.QaQuestionAnswerDimensionMetadata + * @instance + */ + QaQuestionAnswerDimensionMetadata.prototype.qaScorecardId = ""; + + /** + * QaQuestionAnswerDimensionMetadata qaQuestionId. + * @member {string} qaQuestionId + * @memberof google.cloud.contactcenterinsights.v1.Dimension.QaQuestionAnswerDimensionMetadata + * @instance + */ + QaQuestionAnswerDimensionMetadata.prototype.qaQuestionId = ""; + + /** + * QaQuestionAnswerDimensionMetadata questionBody. + * @member {string} questionBody + * @memberof google.cloud.contactcenterinsights.v1.Dimension.QaQuestionAnswerDimensionMetadata + * @instance + */ + QaQuestionAnswerDimensionMetadata.prototype.questionBody = ""; + + /** + * QaQuestionAnswerDimensionMetadata answerValue. + * @member {string} answerValue + * @memberof google.cloud.contactcenterinsights.v1.Dimension.QaQuestionAnswerDimensionMetadata + * @instance + */ + QaQuestionAnswerDimensionMetadata.prototype.answerValue = ""; + + /** + * Creates a new QaQuestionAnswerDimensionMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.Dimension.QaQuestionAnswerDimensionMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.Dimension.IQaQuestionAnswerDimensionMetadata=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.Dimension.QaQuestionAnswerDimensionMetadata} QaQuestionAnswerDimensionMetadata instance + */ + QaQuestionAnswerDimensionMetadata.create = function create(properties) { + return new QaQuestionAnswerDimensionMetadata(properties); + }; + + /** + * Encodes the specified QaQuestionAnswerDimensionMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Dimension.QaQuestionAnswerDimensionMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.Dimension.QaQuestionAnswerDimensionMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.Dimension.IQaQuestionAnswerDimensionMetadata} message QaQuestionAnswerDimensionMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QaQuestionAnswerDimensionMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.qaScorecardId != null && Object.hasOwnProperty.call(message, "qaScorecardId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.qaScorecardId); + if (message.qaQuestionId != null && Object.hasOwnProperty.call(message, "qaQuestionId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.qaQuestionId); + if (message.questionBody != null && Object.hasOwnProperty.call(message, "questionBody")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.questionBody); + if (message.answerValue != null && Object.hasOwnProperty.call(message, "answerValue")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.answerValue); + return writer; + }; + + /** + * Encodes the specified QaQuestionAnswerDimensionMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Dimension.QaQuestionAnswerDimensionMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Dimension.QaQuestionAnswerDimensionMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.Dimension.IQaQuestionAnswerDimensionMetadata} message QaQuestionAnswerDimensionMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QaQuestionAnswerDimensionMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QaQuestionAnswerDimensionMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.Dimension.QaQuestionAnswerDimensionMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.Dimension.QaQuestionAnswerDimensionMetadata} QaQuestionAnswerDimensionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QaQuestionAnswerDimensionMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Dimension.QaQuestionAnswerDimensionMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.qaScorecardId = reader.string(); + break; + } + case 2: { + message.qaQuestionId = reader.string(); + break; + } + case 3: { + message.questionBody = reader.string(); + break; + } + case 4: { + message.answerValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QaQuestionAnswerDimensionMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Dimension.QaQuestionAnswerDimensionMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.Dimension.QaQuestionAnswerDimensionMetadata} QaQuestionAnswerDimensionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QaQuestionAnswerDimensionMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QaQuestionAnswerDimensionMetadata message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.Dimension.QaQuestionAnswerDimensionMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QaQuestionAnswerDimensionMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.qaScorecardId != null && message.hasOwnProperty("qaScorecardId")) + if (!$util.isString(message.qaScorecardId)) + return "qaScorecardId: string expected"; + if (message.qaQuestionId != null && message.hasOwnProperty("qaQuestionId")) + if (!$util.isString(message.qaQuestionId)) + return "qaQuestionId: string expected"; + if (message.questionBody != null && message.hasOwnProperty("questionBody")) + if (!$util.isString(message.questionBody)) + return "questionBody: string expected"; + if (message.answerValue != null && message.hasOwnProperty("answerValue")) + if (!$util.isString(message.answerValue)) + return "answerValue: string expected"; + return null; + }; + + /** + * Creates a QaQuestionAnswerDimensionMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.Dimension.QaQuestionAnswerDimensionMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.Dimension.QaQuestionAnswerDimensionMetadata} QaQuestionAnswerDimensionMetadata + */ + QaQuestionAnswerDimensionMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.Dimension.QaQuestionAnswerDimensionMetadata) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.Dimension.QaQuestionAnswerDimensionMetadata(); + if (object.qaScorecardId != null) + message.qaScorecardId = String(object.qaScorecardId); + if (object.qaQuestionId != null) + message.qaQuestionId = String(object.qaQuestionId); + if (object.questionBody != null) + message.questionBody = String(object.questionBody); + if (object.answerValue != null) + message.answerValue = String(object.answerValue); + return message; + }; + + /** + * Creates a plain object from a QaQuestionAnswerDimensionMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.Dimension.QaQuestionAnswerDimensionMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.Dimension.QaQuestionAnswerDimensionMetadata} message QaQuestionAnswerDimensionMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QaQuestionAnswerDimensionMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.qaScorecardId = ""; + object.qaQuestionId = ""; + object.questionBody = ""; + object.answerValue = ""; + } + if (message.qaScorecardId != null && message.hasOwnProperty("qaScorecardId")) + object.qaScorecardId = message.qaScorecardId; + if (message.qaQuestionId != null && message.hasOwnProperty("qaQuestionId")) + object.qaQuestionId = message.qaQuestionId; + if (message.questionBody != null && message.hasOwnProperty("questionBody")) + object.questionBody = message.questionBody; + if (message.answerValue != null && message.hasOwnProperty("answerValue")) + object.answerValue = message.answerValue; + return object; + }; + + /** + * Converts this QaQuestionAnswerDimensionMetadata to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.Dimension.QaQuestionAnswerDimensionMetadata + * @instance + * @returns {Object.} JSON object + */ + QaQuestionAnswerDimensionMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QaQuestionAnswerDimensionMetadata + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.Dimension.QaQuestionAnswerDimensionMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QaQuestionAnswerDimensionMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Dimension.QaQuestionAnswerDimensionMetadata"; + }; + + return QaQuestionAnswerDimensionMetadata; + })(); + + /** + * DimensionKey enum. + * @name google.cloud.contactcenterinsights.v1.Dimension.DimensionKey + * @enum {number} + * @property {number} DIMENSION_KEY_UNSPECIFIED=0 DIMENSION_KEY_UNSPECIFIED value + * @property {number} ISSUE=1 ISSUE value + * @property {number} AGENT=2 AGENT value + * @property {number} AGENT_TEAM=3 AGENT_TEAM value + * @property {number} QA_QUESTION_ID=4 QA_QUESTION_ID value + * @property {number} QA_QUESTION_ANSWER_VALUE=5 QA_QUESTION_ANSWER_VALUE value + * @property {number} CONVERSATION_PROFILE_ID=6 CONVERSATION_PROFILE_ID value + */ + Dimension.DimensionKey = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DIMENSION_KEY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ISSUE"] = 1; + values[valuesById[2] = "AGENT"] = 2; + values[valuesById[3] = "AGENT_TEAM"] = 3; + values[valuesById[4] = "QA_QUESTION_ID"] = 4; + values[valuesById[5] = "QA_QUESTION_ANSWER_VALUE"] = 5; + values[valuesById[6] = "CONVERSATION_PROFILE_ID"] = 6; + return values; + })(); + + return Dimension; + })(); + + v1.QueryMetricsRequest = (function() { + + /** + * Properties of a QueryMetricsRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IQueryMetricsRequest + * @property {string|null} [location] QueryMetricsRequest location + * @property {string|null} [filter] QueryMetricsRequest filter + * @property {google.cloud.contactcenterinsights.v1.QueryMetricsRequest.TimeGranularity|null} [timeGranularity] QueryMetricsRequest timeGranularity + * @property {Array.|null} [dimensions] QueryMetricsRequest dimensions + * @property {google.protobuf.IFieldMask|null} [measureMask] QueryMetricsRequest measureMask + */ + + /** + * Constructs a new QueryMetricsRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a QueryMetricsRequest. + * @implements IQueryMetricsRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IQueryMetricsRequest=} [properties] Properties to set + */ + function QueryMetricsRequest(properties) { + this.dimensions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryMetricsRequest location. + * @member {string} location + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsRequest + * @instance + */ + QueryMetricsRequest.prototype.location = ""; + + /** + * QueryMetricsRequest filter. + * @member {string} filter + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsRequest + * @instance + */ + QueryMetricsRequest.prototype.filter = ""; + + /** + * QueryMetricsRequest timeGranularity. + * @member {google.cloud.contactcenterinsights.v1.QueryMetricsRequest.TimeGranularity} timeGranularity + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsRequest + * @instance + */ + QueryMetricsRequest.prototype.timeGranularity = 0; + + /** + * QueryMetricsRequest dimensions. + * @member {Array.} dimensions + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsRequest + * @instance + */ + QueryMetricsRequest.prototype.dimensions = $util.emptyArray; + + /** + * QueryMetricsRequest measureMask. + * @member {google.protobuf.IFieldMask|null|undefined} measureMask + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsRequest + * @instance + */ + QueryMetricsRequest.prototype.measureMask = null; + + /** + * Creates a new QueryMetricsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IQueryMetricsRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.QueryMetricsRequest} QueryMetricsRequest instance + */ + QueryMetricsRequest.create = function create(properties) { + return new QueryMetricsRequest(properties); + }; + + /** + * Encodes the specified QueryMetricsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QueryMetricsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IQueryMetricsRequest} message QueryMetricsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryMetricsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.location); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.timeGranularity != null && Object.hasOwnProperty.call(message, "timeGranularity")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.timeGranularity); + if (message.dimensions != null && message.dimensions.length) + for (var i = 0; i < message.dimensions.length; ++i) + $root.google.cloud.contactcenterinsights.v1.Dimension.encode(message.dimensions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.measureMask != null && Object.hasOwnProperty.call(message, "measureMask")) + $root.google.protobuf.FieldMask.encode(message.measureMask, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryMetricsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QueryMetricsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IQueryMetricsRequest} message QueryMetricsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryMetricsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryMetricsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.QueryMetricsRequest} QueryMetricsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryMetricsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.QueryMetricsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.location = reader.string(); + break; + } + case 2: { + message.filter = reader.string(); + break; + } + case 3: { + message.timeGranularity = reader.int32(); + break; + } + case 4: { + if (!(message.dimensions && message.dimensions.length)) + message.dimensions = []; + message.dimensions.push($root.google.cloud.contactcenterinsights.v1.Dimension.decode(reader, reader.uint32())); + break; + } + case 5: { + message.measureMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryMetricsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.QueryMetricsRequest} QueryMetricsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryMetricsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryMetricsRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryMetricsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.timeGranularity != null && message.hasOwnProperty("timeGranularity")) + switch (message.timeGranularity) { + default: + return "timeGranularity: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.dimensions != null && message.hasOwnProperty("dimensions")) { + if (!Array.isArray(message.dimensions)) + return "dimensions: array expected"; + for (var i = 0; i < message.dimensions.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.Dimension.verify(message.dimensions[i]); + if (error) + return "dimensions." + error; + } + } + if (message.measureMask != null && message.hasOwnProperty("measureMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.measureMask); + if (error) + return "measureMask." + error; + } + return null; + }; + + /** + * Creates a QueryMetricsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.QueryMetricsRequest} QueryMetricsRequest + */ + QueryMetricsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.QueryMetricsRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.QueryMetricsRequest(); + if (object.location != null) + message.location = String(object.location); + if (object.filter != null) + message.filter = String(object.filter); + switch (object.timeGranularity) { + default: + if (typeof object.timeGranularity === "number") { + message.timeGranularity = object.timeGranularity; + break; + } + break; + case "TIME_GRANULARITY_UNSPECIFIED": + case 0: + message.timeGranularity = 0; + break; + case "NONE": + case 1: + message.timeGranularity = 1; + break; + case "DAILY": + case 2: + message.timeGranularity = 2; + break; + case "HOURLY": + case 3: + message.timeGranularity = 3; + break; + case "PER_MINUTE": + case 4: + message.timeGranularity = 4; + break; + case "PER_5_MINUTES": + case 5: + message.timeGranularity = 5; + break; + case "MONTHLY": + case 6: + message.timeGranularity = 6; + break; + } + if (object.dimensions) { + if (!Array.isArray(object.dimensions)) + throw TypeError(".google.cloud.contactcenterinsights.v1.QueryMetricsRequest.dimensions: array expected"); + message.dimensions = []; + for (var i = 0; i < object.dimensions.length; ++i) { + if (typeof object.dimensions[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.QueryMetricsRequest.dimensions: object expected"); + message.dimensions[i] = $root.google.cloud.contactcenterinsights.v1.Dimension.fromObject(object.dimensions[i]); + } + } + if (object.measureMask != null) { + if (typeof object.measureMask !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.QueryMetricsRequest.measureMask: object expected"); + message.measureMask = $root.google.protobuf.FieldMask.fromObject(object.measureMask); + } + return message; + }; + + /** + * Creates a plain object from a QueryMetricsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.QueryMetricsRequest} message QueryMetricsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryMetricsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dimensions = []; + if (options.defaults) { + object.location = ""; + object.filter = ""; + object.timeGranularity = options.enums === String ? "TIME_GRANULARITY_UNSPECIFIED" : 0; + object.measureMask = null; + } + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.timeGranularity != null && message.hasOwnProperty("timeGranularity")) + object.timeGranularity = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.QueryMetricsRequest.TimeGranularity[message.timeGranularity] === undefined ? message.timeGranularity : $root.google.cloud.contactcenterinsights.v1.QueryMetricsRequest.TimeGranularity[message.timeGranularity] : message.timeGranularity; + if (message.dimensions && message.dimensions.length) { + object.dimensions = []; + for (var j = 0; j < message.dimensions.length; ++j) + object.dimensions[j] = $root.google.cloud.contactcenterinsights.v1.Dimension.toObject(message.dimensions[j], options); + } + if (message.measureMask != null && message.hasOwnProperty("measureMask")) + object.measureMask = $root.google.protobuf.FieldMask.toObject(message.measureMask, options); + return object; + }; + + /** + * Converts this QueryMetricsRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryMetricsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryMetricsRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryMetricsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.QueryMetricsRequest"; + }; + + /** + * TimeGranularity enum. + * @name google.cloud.contactcenterinsights.v1.QueryMetricsRequest.TimeGranularity + * @enum {number} + * @property {number} TIME_GRANULARITY_UNSPECIFIED=0 TIME_GRANULARITY_UNSPECIFIED value + * @property {number} NONE=1 NONE value + * @property {number} DAILY=2 DAILY value + * @property {number} HOURLY=3 HOURLY value + * @property {number} PER_MINUTE=4 PER_MINUTE value + * @property {number} PER_5_MINUTES=5 PER_5_MINUTES value + * @property {number} MONTHLY=6 MONTHLY value + */ + QueryMetricsRequest.TimeGranularity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TIME_GRANULARITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "NONE"] = 1; + values[valuesById[2] = "DAILY"] = 2; + values[valuesById[3] = "HOURLY"] = 3; + values[valuesById[4] = "PER_MINUTE"] = 4; + values[valuesById[5] = "PER_5_MINUTES"] = 5; + values[valuesById[6] = "MONTHLY"] = 6; + return values; + })(); + + return QueryMetricsRequest; + })(); + + v1.QueryMetricsResponse = (function() { + + /** + * Properties of a QueryMetricsResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IQueryMetricsResponse + * @property {string|null} [location] QueryMetricsResponse location + * @property {google.protobuf.ITimestamp|null} [updateTime] QueryMetricsResponse updateTime + * @property {Array.|null} [slices] QueryMetricsResponse slices + * @property {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.ISlice|null} [macroAverageSlice] QueryMetricsResponse macroAverageSlice + */ + + /** + * Constructs a new QueryMetricsResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a QueryMetricsResponse. + * @implements IQueryMetricsResponse + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IQueryMetricsResponse=} [properties] Properties to set + */ + function QueryMetricsResponse(properties) { + this.slices = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryMetricsResponse location. + * @member {string} location + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse + * @instance + */ + QueryMetricsResponse.prototype.location = ""; + + /** + * QueryMetricsResponse updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse + * @instance + */ + QueryMetricsResponse.prototype.updateTime = null; + + /** + * QueryMetricsResponse slices. + * @member {Array.} slices + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse + * @instance + */ + QueryMetricsResponse.prototype.slices = $util.emptyArray; + + /** + * QueryMetricsResponse macroAverageSlice. + * @member {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.ISlice|null|undefined} macroAverageSlice + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse + * @instance + */ + QueryMetricsResponse.prototype.macroAverageSlice = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * QueryMetricsResponse _macroAverageSlice. + * @member {"macroAverageSlice"|undefined} _macroAverageSlice + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse + * @instance + */ + Object.defineProperty(QueryMetricsResponse.prototype, "_macroAverageSlice", { + get: $util.oneOfGetter($oneOfFields = ["macroAverageSlice"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new QueryMetricsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IQueryMetricsResponse=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.QueryMetricsResponse} QueryMetricsResponse instance + */ + QueryMetricsResponse.create = function create(properties) { + return new QueryMetricsResponse(properties); + }; + + /** + * Encodes the specified QueryMetricsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QueryMetricsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IQueryMetricsResponse} message QueryMetricsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryMetricsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.location); + if (message.slices != null && message.slices.length) + for (var i = 0; i < message.slices.length; ++i) + $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.encode(message.slices[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.macroAverageSlice != null && Object.hasOwnProperty.call(message, "macroAverageSlice")) + $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.encode(message.macroAverageSlice, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryMetricsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QueryMetricsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IQueryMetricsResponse} message QueryMetricsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryMetricsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryMetricsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.QueryMetricsResponse} QueryMetricsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryMetricsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.location = reader.string(); + break; + } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.slices && message.slices.length)) + message.slices = []; + message.slices.push($root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.decode(reader, reader.uint32())); + break; + } + case 4: { + message.macroAverageSlice = $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryMetricsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.QueryMetricsResponse} QueryMetricsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryMetricsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryMetricsResponse message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryMetricsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.slices != null && message.hasOwnProperty("slices")) { + if (!Array.isArray(message.slices)) + return "slices: array expected"; + for (var i = 0; i < message.slices.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.verify(message.slices[i]); + if (error) + return "slices." + error; + } + } + if (message.macroAverageSlice != null && message.hasOwnProperty("macroAverageSlice")) { + properties._macroAverageSlice = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.verify(message.macroAverageSlice); + if (error) + return "macroAverageSlice." + error; + } + } + return null; + }; + + /** + * Creates a QueryMetricsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.QueryMetricsResponse} QueryMetricsResponse + */ + QueryMetricsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse(); + if (object.location != null) + message.location = String(object.location); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.QueryMetricsResponse.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.slices) { + if (!Array.isArray(object.slices)) + throw TypeError(".google.cloud.contactcenterinsights.v1.QueryMetricsResponse.slices: array expected"); + message.slices = []; + for (var i = 0; i < object.slices.length; ++i) { + if (typeof object.slices[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.QueryMetricsResponse.slices: object expected"); + message.slices[i] = $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.fromObject(object.slices[i]); + } + } + if (object.macroAverageSlice != null) { + if (typeof object.macroAverageSlice !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.QueryMetricsResponse.macroAverageSlice: object expected"); + message.macroAverageSlice = $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.fromObject(object.macroAverageSlice); + } + return message; + }; + + /** + * Creates a plain object from a QueryMetricsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.QueryMetricsResponse} message QueryMetricsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryMetricsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.slices = []; + if (options.defaults) { + object.location = ""; + object.updateTime = null; + } + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.slices && message.slices.length) { + object.slices = []; + for (var j = 0; j < message.slices.length; ++j) + object.slices[j] = $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.toObject(message.slices[j], options); + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.macroAverageSlice != null && message.hasOwnProperty("macroAverageSlice")) { + object.macroAverageSlice = $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.toObject(message.macroAverageSlice, options); + if (options.oneofs) + object._macroAverageSlice = "macroAverageSlice"; + } + return object; + }; + + /** + * Converts this QueryMetricsResponse to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryMetricsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryMetricsResponse + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryMetricsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.QueryMetricsResponse"; + }; + + QueryMetricsResponse.Slice = (function() { + + /** + * Properties of a Slice. + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse + * @interface ISlice + * @property {Array.|null} [dimensions] Slice dimensions + * @property {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.IDataPoint|null} [total] Slice total + * @property {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.ITimeSeries|null} [timeSeries] Slice timeSeries + */ + + /** + * Constructs a new Slice. + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse + * @classdesc Represents a Slice. + * @implements ISlice + * @constructor + * @param {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.ISlice=} [properties] Properties to set + */ + function Slice(properties) { + this.dimensions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Slice dimensions. + * @member {Array.} dimensions + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice + * @instance + */ + Slice.prototype.dimensions = $util.emptyArray; + + /** + * Slice total. + * @member {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.IDataPoint|null|undefined} total + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice + * @instance + */ + Slice.prototype.total = null; + + /** + * Slice timeSeries. + * @member {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.ITimeSeries|null|undefined} timeSeries + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice + * @instance + */ + Slice.prototype.timeSeries = null; + + /** + * Creates a new Slice instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice + * @static + * @param {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.ISlice=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice} Slice instance + */ + Slice.create = function create(properties) { + return new Slice(properties); + }; + + /** + * Encodes the specified Slice message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice + * @static + * @param {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.ISlice} message Slice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Slice.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensions != null && message.dimensions.length) + for (var i = 0; i < message.dimensions.length; ++i) + $root.google.cloud.contactcenterinsights.v1.Dimension.encode(message.dimensions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.total != null && Object.hasOwnProperty.call(message, "total")) + $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.encode(message.total, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.timeSeries != null && Object.hasOwnProperty.call(message, "timeSeries")) + $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.TimeSeries.encode(message.timeSeries, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Slice message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice + * @static + * @param {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.ISlice} message Slice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Slice.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Slice message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice} Slice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Slice.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.dimensions && message.dimensions.length)) + message.dimensions = []; + message.dimensions.push($root.google.cloud.contactcenterinsights.v1.Dimension.decode(reader, reader.uint32())); + break; + } + case 2: { + message.total = $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.decode(reader, reader.uint32()); + break; + } + case 3: { + message.timeSeries = $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.TimeSeries.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Slice message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice} Slice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Slice.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Slice message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Slice.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensions != null && message.hasOwnProperty("dimensions")) { + if (!Array.isArray(message.dimensions)) + return "dimensions: array expected"; + for (var i = 0; i < message.dimensions.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.Dimension.verify(message.dimensions[i]); + if (error) + return "dimensions." + error; + } + } + if (message.total != null && message.hasOwnProperty("total")) { + var error = $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.verify(message.total); + if (error) + return "total." + error; + } + if (message.timeSeries != null && message.hasOwnProperty("timeSeries")) { + var error = $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.TimeSeries.verify(message.timeSeries); + if (error) + return "timeSeries." + error; + } + return null; + }; + + /** + * Creates a Slice message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice} Slice + */ + Slice.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice(); + if (object.dimensions) { + if (!Array.isArray(object.dimensions)) + throw TypeError(".google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.dimensions: array expected"); + message.dimensions = []; + for (var i = 0; i < object.dimensions.length; ++i) { + if (typeof object.dimensions[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.dimensions: object expected"); + message.dimensions[i] = $root.google.cloud.contactcenterinsights.v1.Dimension.fromObject(object.dimensions[i]); + } + } + if (object.total != null) { + if (typeof object.total !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.total: object expected"); + message.total = $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.fromObject(object.total); + } + if (object.timeSeries != null) { + if (typeof object.timeSeries !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.timeSeries: object expected"); + message.timeSeries = $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.TimeSeries.fromObject(object.timeSeries); + } + return message; + }; + + /** + * Creates a plain object from a Slice message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice + * @static + * @param {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice} message Slice + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Slice.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dimensions = []; + if (options.defaults) { + object.total = null; + object.timeSeries = null; + } + if (message.dimensions && message.dimensions.length) { + object.dimensions = []; + for (var j = 0; j < message.dimensions.length; ++j) + object.dimensions[j] = $root.google.cloud.contactcenterinsights.v1.Dimension.toObject(message.dimensions[j], options); + } + if (message.total != null && message.hasOwnProperty("total")) + object.total = $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.toObject(message.total, options); + if (message.timeSeries != null && message.hasOwnProperty("timeSeries")) + object.timeSeries = $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.TimeSeries.toObject(message.timeSeries, options); + return object; + }; + + /** + * Converts this Slice to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice + * @instance + * @returns {Object.} JSON object + */ + Slice.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Slice + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Slice.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice"; + }; + + Slice.DataPoint = (function() { + + /** + * Properties of a DataPoint. + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice + * @interface IDataPoint + * @property {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.IConversationMeasure|null} [conversationMeasure] DataPoint conversationMeasure + * @property {google.type.IInterval|null} [interval] DataPoint interval + */ + + /** + * Constructs a new DataPoint. + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice + * @classdesc Represents a DataPoint. + * @implements IDataPoint + * @constructor + * @param {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.IDataPoint=} [properties] Properties to set + */ + function DataPoint(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataPoint conversationMeasure. + * @member {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.IConversationMeasure|null|undefined} conversationMeasure + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint + * @instance + */ + DataPoint.prototype.conversationMeasure = null; + + /** + * DataPoint interval. + * @member {google.type.IInterval|null|undefined} interval + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint + * @instance + */ + DataPoint.prototype.interval = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataPoint measure. + * @member {"conversationMeasure"|undefined} measure + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint + * @instance + */ + Object.defineProperty(DataPoint.prototype, "measure", { + get: $util.oneOfGetter($oneOfFields = ["conversationMeasure"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataPoint instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint + * @static + * @param {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.IDataPoint=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint} DataPoint instance + */ + DataPoint.create = function create(properties) { + return new DataPoint(properties); + }; + + /** + * Encodes the specified DataPoint message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint + * @static + * @param {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.IDataPoint} message DataPoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataPoint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.interval != null && Object.hasOwnProperty.call(message, "interval")) + $root.google.type.Interval.encode(message.interval, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.conversationMeasure != null && Object.hasOwnProperty.call(message, "conversationMeasure")) + $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.encode(message.conversationMeasure, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataPoint message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint + * @static + * @param {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.IDataPoint} message DataPoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataPoint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataPoint message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint} DataPoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataPoint.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.conversationMeasure = $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.decode(reader, reader.uint32()); + break; + } + case 1: { + message.interval = $root.google.type.Interval.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataPoint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint} DataPoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataPoint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataPoint message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataPoint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.conversationMeasure != null && message.hasOwnProperty("conversationMeasure")) { + properties.measure = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.verify(message.conversationMeasure); + if (error) + return "conversationMeasure." + error; + } + } + if (message.interval != null && message.hasOwnProperty("interval")) { + var error = $root.google.type.Interval.verify(message.interval); + if (error) + return "interval." + error; + } + return null; + }; + + /** + * Creates a DataPoint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint} DataPoint + */ + DataPoint.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint(); + if (object.conversationMeasure != null) { + if (typeof object.conversationMeasure !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.conversationMeasure: object expected"); + message.conversationMeasure = $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.fromObject(object.conversationMeasure); + } + if (object.interval != null) { + if (typeof object.interval !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.interval: object expected"); + message.interval = $root.google.type.Interval.fromObject(object.interval); + } + return message; + }; + + /** + * Creates a plain object from a DataPoint message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint + * @static + * @param {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint} message DataPoint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataPoint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.interval = null; + if (message.interval != null && message.hasOwnProperty("interval")) + object.interval = $root.google.type.Interval.toObject(message.interval, options); + if (message.conversationMeasure != null && message.hasOwnProperty("conversationMeasure")) { + object.conversationMeasure = $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.toObject(message.conversationMeasure, options); + if (options.oneofs) + object.measure = "conversationMeasure"; + } + return object; + }; + + /** + * Converts this DataPoint to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint + * @instance + * @returns {Object.} JSON object + */ + DataPoint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataPoint + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataPoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint"; + }; + + DataPoint.ConversationMeasure = (function() { + + /** + * Properties of a ConversationMeasure. + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint + * @interface IConversationMeasure + * @property {number|null} [conversationCount] ConversationMeasure conversationCount + * @property {number|null} [averageSilencePercentage] ConversationMeasure averageSilencePercentage + * @property {google.protobuf.IDuration|null} [averageDuration] ConversationMeasure averageDuration + * @property {number|null} [averageTurnCount] ConversationMeasure averageTurnCount + * @property {number|null} [averageAgentSentimentScore] ConversationMeasure averageAgentSentimentScore + * @property {number|null} [averageClientSentimentScore] ConversationMeasure averageClientSentimentScore + * @property {number|null} [averageCustomerSatisfactionRating] ConversationMeasure averageCustomerSatisfactionRating + * @property {number|null} [averageQaNormalizedScore] ConversationMeasure averageQaNormalizedScore + * @property {Array.|null} [qaTagScores] ConversationMeasure qaTagScores + * @property {number|null} [averageQaQuestionNormalizedScore] ConversationMeasure averageQaQuestionNormalizedScore + */ + + /** + * Constructs a new ConversationMeasure. + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint + * @classdesc Represents a ConversationMeasure. + * @implements IConversationMeasure + * @constructor + * @param {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.IConversationMeasure=} [properties] Properties to set + */ + function ConversationMeasure(properties) { + this.qaTagScores = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConversationMeasure conversationCount. + * @member {number|null|undefined} conversationCount + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure + * @instance + */ + ConversationMeasure.prototype.conversationCount = null; + + /** + * ConversationMeasure averageSilencePercentage. + * @member {number|null|undefined} averageSilencePercentage + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure + * @instance + */ + ConversationMeasure.prototype.averageSilencePercentage = null; + + /** + * ConversationMeasure averageDuration. + * @member {google.protobuf.IDuration|null|undefined} averageDuration + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure + * @instance + */ + ConversationMeasure.prototype.averageDuration = null; + + /** + * ConversationMeasure averageTurnCount. + * @member {number|null|undefined} averageTurnCount + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure + * @instance + */ + ConversationMeasure.prototype.averageTurnCount = null; + + /** + * ConversationMeasure averageAgentSentimentScore. + * @member {number|null|undefined} averageAgentSentimentScore + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure + * @instance + */ + ConversationMeasure.prototype.averageAgentSentimentScore = null; + + /** + * ConversationMeasure averageClientSentimentScore. + * @member {number|null|undefined} averageClientSentimentScore + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure + * @instance + */ + ConversationMeasure.prototype.averageClientSentimentScore = null; + + /** + * ConversationMeasure averageCustomerSatisfactionRating. + * @member {number|null|undefined} averageCustomerSatisfactionRating + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure + * @instance + */ + ConversationMeasure.prototype.averageCustomerSatisfactionRating = null; + + /** + * ConversationMeasure averageQaNormalizedScore. + * @member {number|null|undefined} averageQaNormalizedScore + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure + * @instance + */ + ConversationMeasure.prototype.averageQaNormalizedScore = null; + + /** + * ConversationMeasure qaTagScores. + * @member {Array.} qaTagScores + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure + * @instance + */ + ConversationMeasure.prototype.qaTagScores = $util.emptyArray; + + /** + * ConversationMeasure averageQaQuestionNormalizedScore. + * @member {number|null|undefined} averageQaQuestionNormalizedScore + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure + * @instance + */ + ConversationMeasure.prototype.averageQaQuestionNormalizedScore = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ConversationMeasure _conversationCount. + * @member {"conversationCount"|undefined} _conversationCount + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure + * @instance + */ + Object.defineProperty(ConversationMeasure.prototype, "_conversationCount", { + get: $util.oneOfGetter($oneOfFields = ["conversationCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ConversationMeasure _averageSilencePercentage. + * @member {"averageSilencePercentage"|undefined} _averageSilencePercentage + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure + * @instance + */ + Object.defineProperty(ConversationMeasure.prototype, "_averageSilencePercentage", { + get: $util.oneOfGetter($oneOfFields = ["averageSilencePercentage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ConversationMeasure _averageDuration. + * @member {"averageDuration"|undefined} _averageDuration + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure + * @instance + */ + Object.defineProperty(ConversationMeasure.prototype, "_averageDuration", { + get: $util.oneOfGetter($oneOfFields = ["averageDuration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ConversationMeasure _averageTurnCount. + * @member {"averageTurnCount"|undefined} _averageTurnCount + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure + * @instance + */ + Object.defineProperty(ConversationMeasure.prototype, "_averageTurnCount", { + get: $util.oneOfGetter($oneOfFields = ["averageTurnCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ConversationMeasure _averageAgentSentimentScore. + * @member {"averageAgentSentimentScore"|undefined} _averageAgentSentimentScore + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure + * @instance + */ + Object.defineProperty(ConversationMeasure.prototype, "_averageAgentSentimentScore", { + get: $util.oneOfGetter($oneOfFields = ["averageAgentSentimentScore"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ConversationMeasure _averageClientSentimentScore. + * @member {"averageClientSentimentScore"|undefined} _averageClientSentimentScore + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure + * @instance + */ + Object.defineProperty(ConversationMeasure.prototype, "_averageClientSentimentScore", { + get: $util.oneOfGetter($oneOfFields = ["averageClientSentimentScore"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ConversationMeasure _averageCustomerSatisfactionRating. + * @member {"averageCustomerSatisfactionRating"|undefined} _averageCustomerSatisfactionRating + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure + * @instance + */ + Object.defineProperty(ConversationMeasure.prototype, "_averageCustomerSatisfactionRating", { + get: $util.oneOfGetter($oneOfFields = ["averageCustomerSatisfactionRating"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ConversationMeasure _averageQaNormalizedScore. + * @member {"averageQaNormalizedScore"|undefined} _averageQaNormalizedScore + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure + * @instance + */ + Object.defineProperty(ConversationMeasure.prototype, "_averageQaNormalizedScore", { + get: $util.oneOfGetter($oneOfFields = ["averageQaNormalizedScore"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ConversationMeasure _averageQaQuestionNormalizedScore. + * @member {"averageQaQuestionNormalizedScore"|undefined} _averageQaQuestionNormalizedScore + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure + * @instance + */ + Object.defineProperty(ConversationMeasure.prototype, "_averageQaQuestionNormalizedScore", { + get: $util.oneOfGetter($oneOfFields = ["averageQaQuestionNormalizedScore"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ConversationMeasure instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure + * @static + * @param {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.IConversationMeasure=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure} ConversationMeasure instance + */ + ConversationMeasure.create = function create(properties) { + return new ConversationMeasure(properties); + }; + + /** + * Encodes the specified ConversationMeasure message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure + * @static + * @param {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.IConversationMeasure} message ConversationMeasure message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationMeasure.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conversationCount != null && Object.hasOwnProperty.call(message, "conversationCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.conversationCount); + if (message.averageSilencePercentage != null && Object.hasOwnProperty.call(message, "averageSilencePercentage")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.averageSilencePercentage); + if (message.averageDuration != null && Object.hasOwnProperty.call(message, "averageDuration")) + $root.google.protobuf.Duration.encode(message.averageDuration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.averageTurnCount != null && Object.hasOwnProperty.call(message, "averageTurnCount")) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.averageTurnCount); + if (message.averageAgentSentimentScore != null && Object.hasOwnProperty.call(message, "averageAgentSentimentScore")) + writer.uint32(/* id 5, wireType 5 =*/45).float(message.averageAgentSentimentScore); + if (message.averageClientSentimentScore != null && Object.hasOwnProperty.call(message, "averageClientSentimentScore")) + writer.uint32(/* id 6, wireType 5 =*/53).float(message.averageClientSentimentScore); + if (message.averageQaNormalizedScore != null && Object.hasOwnProperty.call(message, "averageQaNormalizedScore")) + writer.uint32(/* id 7, wireType 1 =*/57).double(message.averageQaNormalizedScore); + if (message.averageCustomerSatisfactionRating != null && Object.hasOwnProperty.call(message, "averageCustomerSatisfactionRating")) + writer.uint32(/* id 8, wireType 1 =*/65).double(message.averageCustomerSatisfactionRating); + if (message.qaTagScores != null && message.qaTagScores.length) + for (var i = 0; i < message.qaTagScores.length; ++i) + $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.QaTagScore.encode(message.qaTagScores[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.averageQaQuestionNormalizedScore != null && Object.hasOwnProperty.call(message, "averageQaQuestionNormalizedScore")) + writer.uint32(/* id 10, wireType 1 =*/81).double(message.averageQaQuestionNormalizedScore); + return writer; + }; + + /** + * Encodes the specified ConversationMeasure message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure + * @static + * @param {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.IConversationMeasure} message ConversationMeasure message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationMeasure.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConversationMeasure message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure} ConversationMeasure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationMeasure.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.conversationCount = reader.int32(); + break; + } + case 2: { + message.averageSilencePercentage = reader.float(); + break; + } + case 3: { + message.averageDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.averageTurnCount = reader.float(); + break; + } + case 5: { + message.averageAgentSentimentScore = reader.float(); + break; + } + case 6: { + message.averageClientSentimentScore = reader.float(); + break; + } + case 8: { + message.averageCustomerSatisfactionRating = reader.double(); + break; + } + case 7: { + message.averageQaNormalizedScore = reader.double(); + break; + } + case 9: { + if (!(message.qaTagScores && message.qaTagScores.length)) + message.qaTagScores = []; + message.qaTagScores.push($root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.QaTagScore.decode(reader, reader.uint32())); + break; + } + case 10: { + message.averageQaQuestionNormalizedScore = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConversationMeasure message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure} ConversationMeasure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationMeasure.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConversationMeasure message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConversationMeasure.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.conversationCount != null && message.hasOwnProperty("conversationCount")) { + properties._conversationCount = 1; + if (!$util.isInteger(message.conversationCount)) + return "conversationCount: integer expected"; + } + if (message.averageSilencePercentage != null && message.hasOwnProperty("averageSilencePercentage")) { + properties._averageSilencePercentage = 1; + if (typeof message.averageSilencePercentage !== "number") + return "averageSilencePercentage: number expected"; + } + if (message.averageDuration != null && message.hasOwnProperty("averageDuration")) { + properties._averageDuration = 1; + { + var error = $root.google.protobuf.Duration.verify(message.averageDuration); + if (error) + return "averageDuration." + error; + } + } + if (message.averageTurnCount != null && message.hasOwnProperty("averageTurnCount")) { + properties._averageTurnCount = 1; + if (typeof message.averageTurnCount !== "number") + return "averageTurnCount: number expected"; + } + if (message.averageAgentSentimentScore != null && message.hasOwnProperty("averageAgentSentimentScore")) { + properties._averageAgentSentimentScore = 1; + if (typeof message.averageAgentSentimentScore !== "number") + return "averageAgentSentimentScore: number expected"; + } + if (message.averageClientSentimentScore != null && message.hasOwnProperty("averageClientSentimentScore")) { + properties._averageClientSentimentScore = 1; + if (typeof message.averageClientSentimentScore !== "number") + return "averageClientSentimentScore: number expected"; + } + if (message.averageCustomerSatisfactionRating != null && message.hasOwnProperty("averageCustomerSatisfactionRating")) { + properties._averageCustomerSatisfactionRating = 1; + if (typeof message.averageCustomerSatisfactionRating !== "number") + return "averageCustomerSatisfactionRating: number expected"; + } + if (message.averageQaNormalizedScore != null && message.hasOwnProperty("averageQaNormalizedScore")) { + properties._averageQaNormalizedScore = 1; + if (typeof message.averageQaNormalizedScore !== "number") + return "averageQaNormalizedScore: number expected"; + } + if (message.qaTagScores != null && message.hasOwnProperty("qaTagScores")) { + if (!Array.isArray(message.qaTagScores)) + return "qaTagScores: array expected"; + for (var i = 0; i < message.qaTagScores.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.QaTagScore.verify(message.qaTagScores[i]); + if (error) + return "qaTagScores." + error; + } + } + if (message.averageQaQuestionNormalizedScore != null && message.hasOwnProperty("averageQaQuestionNormalizedScore")) { + properties._averageQaQuestionNormalizedScore = 1; + if (typeof message.averageQaQuestionNormalizedScore !== "number") + return "averageQaQuestionNormalizedScore: number expected"; + } + return null; + }; + + /** + * Creates a ConversationMeasure message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure} ConversationMeasure + */ + ConversationMeasure.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure(); + if (object.conversationCount != null) + message.conversationCount = object.conversationCount | 0; + if (object.averageSilencePercentage != null) + message.averageSilencePercentage = Number(object.averageSilencePercentage); + if (object.averageDuration != null) { + if (typeof object.averageDuration !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.averageDuration: object expected"); + message.averageDuration = $root.google.protobuf.Duration.fromObject(object.averageDuration); + } + if (object.averageTurnCount != null) + message.averageTurnCount = Number(object.averageTurnCount); + if (object.averageAgentSentimentScore != null) + message.averageAgentSentimentScore = Number(object.averageAgentSentimentScore); + if (object.averageClientSentimentScore != null) + message.averageClientSentimentScore = Number(object.averageClientSentimentScore); + if (object.averageCustomerSatisfactionRating != null) + message.averageCustomerSatisfactionRating = Number(object.averageCustomerSatisfactionRating); + if (object.averageQaNormalizedScore != null) + message.averageQaNormalizedScore = Number(object.averageQaNormalizedScore); + if (object.qaTagScores) { + if (!Array.isArray(object.qaTagScores)) + throw TypeError(".google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.qaTagScores: array expected"); + message.qaTagScores = []; + for (var i = 0; i < object.qaTagScores.length; ++i) { + if (typeof object.qaTagScores[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.qaTagScores: object expected"); + message.qaTagScores[i] = $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.QaTagScore.fromObject(object.qaTagScores[i]); + } + } + if (object.averageQaQuestionNormalizedScore != null) + message.averageQaQuestionNormalizedScore = Number(object.averageQaQuestionNormalizedScore); + return message; + }; + + /** + * Creates a plain object from a ConversationMeasure message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure + * @static + * @param {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure} message ConversationMeasure + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConversationMeasure.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.qaTagScores = []; + if (message.conversationCount != null && message.hasOwnProperty("conversationCount")) { + object.conversationCount = message.conversationCount; + if (options.oneofs) + object._conversationCount = "conversationCount"; + } + if (message.averageSilencePercentage != null && message.hasOwnProperty("averageSilencePercentage")) { + object.averageSilencePercentage = options.json && !isFinite(message.averageSilencePercentage) ? String(message.averageSilencePercentage) : message.averageSilencePercentage; + if (options.oneofs) + object._averageSilencePercentage = "averageSilencePercentage"; + } + if (message.averageDuration != null && message.hasOwnProperty("averageDuration")) { + object.averageDuration = $root.google.protobuf.Duration.toObject(message.averageDuration, options); + if (options.oneofs) + object._averageDuration = "averageDuration"; + } + if (message.averageTurnCount != null && message.hasOwnProperty("averageTurnCount")) { + object.averageTurnCount = options.json && !isFinite(message.averageTurnCount) ? String(message.averageTurnCount) : message.averageTurnCount; + if (options.oneofs) + object._averageTurnCount = "averageTurnCount"; + } + if (message.averageAgentSentimentScore != null && message.hasOwnProperty("averageAgentSentimentScore")) { + object.averageAgentSentimentScore = options.json && !isFinite(message.averageAgentSentimentScore) ? String(message.averageAgentSentimentScore) : message.averageAgentSentimentScore; + if (options.oneofs) + object._averageAgentSentimentScore = "averageAgentSentimentScore"; + } + if (message.averageClientSentimentScore != null && message.hasOwnProperty("averageClientSentimentScore")) { + object.averageClientSentimentScore = options.json && !isFinite(message.averageClientSentimentScore) ? String(message.averageClientSentimentScore) : message.averageClientSentimentScore; + if (options.oneofs) + object._averageClientSentimentScore = "averageClientSentimentScore"; + } + if (message.averageQaNormalizedScore != null && message.hasOwnProperty("averageQaNormalizedScore")) { + object.averageQaNormalizedScore = options.json && !isFinite(message.averageQaNormalizedScore) ? String(message.averageQaNormalizedScore) : message.averageQaNormalizedScore; + if (options.oneofs) + object._averageQaNormalizedScore = "averageQaNormalizedScore"; + } + if (message.averageCustomerSatisfactionRating != null && message.hasOwnProperty("averageCustomerSatisfactionRating")) { + object.averageCustomerSatisfactionRating = options.json && !isFinite(message.averageCustomerSatisfactionRating) ? String(message.averageCustomerSatisfactionRating) : message.averageCustomerSatisfactionRating; + if (options.oneofs) + object._averageCustomerSatisfactionRating = "averageCustomerSatisfactionRating"; + } + if (message.qaTagScores && message.qaTagScores.length) { + object.qaTagScores = []; + for (var j = 0; j < message.qaTagScores.length; ++j) + object.qaTagScores[j] = $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.QaTagScore.toObject(message.qaTagScores[j], options); + } + if (message.averageQaQuestionNormalizedScore != null && message.hasOwnProperty("averageQaQuestionNormalizedScore")) { + object.averageQaQuestionNormalizedScore = options.json && !isFinite(message.averageQaQuestionNormalizedScore) ? String(message.averageQaQuestionNormalizedScore) : message.averageQaQuestionNormalizedScore; + if (options.oneofs) + object._averageQaQuestionNormalizedScore = "averageQaQuestionNormalizedScore"; + } + return object; + }; + + /** + * Converts this ConversationMeasure to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure + * @instance + * @returns {Object.} JSON object + */ + ConversationMeasure.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConversationMeasure + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConversationMeasure.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure"; + }; + + ConversationMeasure.QaTagScore = (function() { + + /** + * Properties of a QaTagScore. + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure + * @interface IQaTagScore + * @property {string|null} [tag] QaTagScore tag + * @property {number|null} [averageTagNormalizedScore] QaTagScore averageTagNormalizedScore + */ + + /** + * Constructs a new QaTagScore. + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure + * @classdesc Represents a QaTagScore. + * @implements IQaTagScore + * @constructor + * @param {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.IQaTagScore=} [properties] Properties to set + */ + function QaTagScore(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QaTagScore tag. + * @member {string} tag + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.QaTagScore + * @instance + */ + QaTagScore.prototype.tag = ""; + + /** + * QaTagScore averageTagNormalizedScore. + * @member {number} averageTagNormalizedScore + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.QaTagScore + * @instance + */ + QaTagScore.prototype.averageTagNormalizedScore = 0; + + /** + * Creates a new QaTagScore instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.QaTagScore + * @static + * @param {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.IQaTagScore=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.QaTagScore} QaTagScore instance + */ + QaTagScore.create = function create(properties) { + return new QaTagScore(properties); + }; + + /** + * Encodes the specified QaTagScore message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.QaTagScore.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.QaTagScore + * @static + * @param {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.IQaTagScore} message QaTagScore message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QaTagScore.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.tag); + if (message.averageTagNormalizedScore != null && Object.hasOwnProperty.call(message, "averageTagNormalizedScore")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.averageTagNormalizedScore); + return writer; + }; + + /** + * Encodes the specified QaTagScore message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.QaTagScore.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.QaTagScore + * @static + * @param {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.IQaTagScore} message QaTagScore message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QaTagScore.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QaTagScore message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.QaTagScore + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.QaTagScore} QaTagScore + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QaTagScore.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.QaTagScore(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tag = reader.string(); + break; + } + case 2: { + message.averageTagNormalizedScore = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QaTagScore message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.QaTagScore + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.QaTagScore} QaTagScore + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QaTagScore.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QaTagScore message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.QaTagScore + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QaTagScore.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tag != null && message.hasOwnProperty("tag")) + if (!$util.isString(message.tag)) + return "tag: string expected"; + if (message.averageTagNormalizedScore != null && message.hasOwnProperty("averageTagNormalizedScore")) + if (typeof message.averageTagNormalizedScore !== "number") + return "averageTagNormalizedScore: number expected"; + return null; + }; + + /** + * Creates a QaTagScore message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.QaTagScore + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.QaTagScore} QaTagScore + */ + QaTagScore.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.QaTagScore) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.QaTagScore(); + if (object.tag != null) + message.tag = String(object.tag); + if (object.averageTagNormalizedScore != null) + message.averageTagNormalizedScore = Number(object.averageTagNormalizedScore); + return message; + }; + + /** + * Creates a plain object from a QaTagScore message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.QaTagScore + * @static + * @param {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.QaTagScore} message QaTagScore + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QaTagScore.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.tag = ""; + object.averageTagNormalizedScore = 0; + } + if (message.tag != null && message.hasOwnProperty("tag")) + object.tag = message.tag; + if (message.averageTagNormalizedScore != null && message.hasOwnProperty("averageTagNormalizedScore")) + object.averageTagNormalizedScore = options.json && !isFinite(message.averageTagNormalizedScore) ? String(message.averageTagNormalizedScore) : message.averageTagNormalizedScore; + return object; + }; + + /** + * Converts this QaTagScore to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.QaTagScore + * @instance + * @returns {Object.} JSON object + */ + QaTagScore.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QaTagScore + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.QaTagScore + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QaTagScore.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.ConversationMeasure.QaTagScore"; + }; + + return QaTagScore; + })(); + + return ConversationMeasure; + })(); + + return DataPoint; + })(); + + Slice.TimeSeries = (function() { + + /** + * Properties of a TimeSeries. + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice + * @interface ITimeSeries + * @property {Array.|null} [dataPoints] TimeSeries dataPoints + */ + + /** + * Constructs a new TimeSeries. + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice + * @classdesc Represents a TimeSeries. + * @implements ITimeSeries + * @constructor + * @param {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.ITimeSeries=} [properties] Properties to set + */ + function TimeSeries(properties) { + this.dataPoints = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TimeSeries dataPoints. + * @member {Array.} dataPoints + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.TimeSeries + * @instance + */ + TimeSeries.prototype.dataPoints = $util.emptyArray; + + /** + * Creates a new TimeSeries instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.TimeSeries + * @static + * @param {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.ITimeSeries=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.TimeSeries} TimeSeries instance + */ + TimeSeries.create = function create(properties) { + return new TimeSeries(properties); + }; + + /** + * Encodes the specified TimeSeries message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.TimeSeries.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.TimeSeries + * @static + * @param {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.ITimeSeries} message TimeSeries message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeSeries.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataPoints != null && message.dataPoints.length) + for (var i = 0; i < message.dataPoints.length; ++i) + $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.encode(message.dataPoints[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TimeSeries message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.TimeSeries.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.TimeSeries + * @static + * @param {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.ITimeSeries} message TimeSeries message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeSeries.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeSeries message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.TimeSeries + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.TimeSeries} TimeSeries + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeSeries.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.TimeSeries(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: { + if (!(message.dataPoints && message.dataPoints.length)) + message.dataPoints = []; + message.dataPoints.push($root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TimeSeries message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.TimeSeries + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.TimeSeries} TimeSeries + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeSeries.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeSeries message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.TimeSeries + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeSeries.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataPoints != null && message.hasOwnProperty("dataPoints")) { + if (!Array.isArray(message.dataPoints)) + return "dataPoints: array expected"; + for (var i = 0; i < message.dataPoints.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.verify(message.dataPoints[i]); + if (error) + return "dataPoints." + error; + } + } + return null; + }; + + /** + * Creates a TimeSeries message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.TimeSeries + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.TimeSeries} TimeSeries + */ + TimeSeries.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.TimeSeries) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.TimeSeries(); + if (object.dataPoints) { + if (!Array.isArray(object.dataPoints)) + throw TypeError(".google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.TimeSeries.dataPoints: array expected"); + message.dataPoints = []; + for (var i = 0; i < object.dataPoints.length; ++i) { + if (typeof object.dataPoints[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.TimeSeries.dataPoints: object expected"); + message.dataPoints[i] = $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.fromObject(object.dataPoints[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a TimeSeries message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.TimeSeries + * @static + * @param {google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.TimeSeries} message TimeSeries + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeSeries.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dataPoints = []; + if (message.dataPoints && message.dataPoints.length) { + object.dataPoints = []; + for (var j = 0; j < message.dataPoints.length; ++j) + object.dataPoints[j] = $root.google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.DataPoint.toObject(message.dataPoints[j], options); + } + return object; + }; + + /** + * Converts this TimeSeries to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.TimeSeries + * @instance + * @returns {Object.} JSON object + */ + TimeSeries.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TimeSeries + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.TimeSeries + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimeSeries.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.QueryMetricsResponse.Slice.TimeSeries"; + }; + + return TimeSeries; + })(); + + return Slice; + })(); + + return QueryMetricsResponse; + })(); + + v1.QueryMetricsMetadata = (function() { + + /** + * Properties of a QueryMetricsMetadata. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IQueryMetricsMetadata + */ + + /** + * Constructs a new QueryMetricsMetadata. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a QueryMetricsMetadata. + * @implements IQueryMetricsMetadata + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IQueryMetricsMetadata=} [properties] Properties to set + */ + function QueryMetricsMetadata(properties) { + if (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 QueryMetricsMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.IQueryMetricsMetadata=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.QueryMetricsMetadata} QueryMetricsMetadata instance + */ + QueryMetricsMetadata.create = function create(properties) { + return new QueryMetricsMetadata(properties); + }; + + /** + * Encodes the specified QueryMetricsMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QueryMetricsMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.IQueryMetricsMetadata} message QueryMetricsMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryMetricsMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified QueryMetricsMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QueryMetricsMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.IQueryMetricsMetadata} message QueryMetricsMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryMetricsMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryMetricsMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.QueryMetricsMetadata} QueryMetricsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryMetricsMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.QueryMetricsMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryMetricsMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.QueryMetricsMetadata} QueryMetricsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryMetricsMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryMetricsMetadata message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryMetricsMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a QueryMetricsMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.QueryMetricsMetadata} QueryMetricsMetadata + */ + QueryMetricsMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.QueryMetricsMetadata) + return object; + return new $root.google.cloud.contactcenterinsights.v1.QueryMetricsMetadata(); + }; + + /** + * Creates a plain object from a QueryMetricsMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.QueryMetricsMetadata} message QueryMetricsMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryMetricsMetadata.toObject = function toObject() { + return {}; + }; + + /** + * Converts this QueryMetricsMetadata to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsMetadata + * @instance + * @returns {Object.} JSON object + */ + QueryMetricsMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryMetricsMetadata + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.QueryMetricsMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryMetricsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.QueryMetricsMetadata"; + }; + + return QueryMetricsMetadata; + })(); + + v1.CreateQaQuestionRequest = (function() { + + /** + * Properties of a CreateQaQuestionRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface ICreateQaQuestionRequest + * @property {string|null} [parent] CreateQaQuestionRequest parent + * @property {google.cloud.contactcenterinsights.v1.IQaQuestion|null} [qaQuestion] CreateQaQuestionRequest qaQuestion + * @property {string|null} [qaQuestionId] CreateQaQuestionRequest qaQuestionId + */ + + /** + * Constructs a new CreateQaQuestionRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a CreateQaQuestionRequest. + * @implements ICreateQaQuestionRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.ICreateQaQuestionRequest=} [properties] Properties to set + */ + function CreateQaQuestionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateQaQuestionRequest parent. + * @member {string} parent + * @memberof google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest + * @instance + */ + CreateQaQuestionRequest.prototype.parent = ""; + + /** + * CreateQaQuestionRequest qaQuestion. + * @member {google.cloud.contactcenterinsights.v1.IQaQuestion|null|undefined} qaQuestion + * @memberof google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest + * @instance + */ + CreateQaQuestionRequest.prototype.qaQuestion = null; + + /** + * CreateQaQuestionRequest qaQuestionId. + * @member {string} qaQuestionId + * @memberof google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest + * @instance + */ + CreateQaQuestionRequest.prototype.qaQuestionId = ""; + + /** + * Creates a new CreateQaQuestionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreateQaQuestionRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest} CreateQaQuestionRequest instance + */ + CreateQaQuestionRequest.create = function create(properties) { + return new CreateQaQuestionRequest(properties); + }; + + /** + * Encodes the specified CreateQaQuestionRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreateQaQuestionRequest} message CreateQaQuestionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateQaQuestionRequest.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.qaQuestion != null && Object.hasOwnProperty.call(message, "qaQuestion")) + $root.google.cloud.contactcenterinsights.v1.QaQuestion.encode(message.qaQuestion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.qaQuestionId != null && Object.hasOwnProperty.call(message, "qaQuestionId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.qaQuestionId); + return writer; + }; + + /** + * Encodes the specified CreateQaQuestionRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreateQaQuestionRequest} message CreateQaQuestionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateQaQuestionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateQaQuestionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest} CreateQaQuestionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateQaQuestionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.qaQuestion = $root.google.cloud.contactcenterinsights.v1.QaQuestion.decode(reader, reader.uint32()); + break; + } + case 3: { + message.qaQuestionId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateQaQuestionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest} CreateQaQuestionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateQaQuestionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateQaQuestionRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateQaQuestionRequest.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.qaQuestion != null && message.hasOwnProperty("qaQuestion")) { + var error = $root.google.cloud.contactcenterinsights.v1.QaQuestion.verify(message.qaQuestion); + if (error) + return "qaQuestion." + error; + } + if (message.qaQuestionId != null && message.hasOwnProperty("qaQuestionId")) + if (!$util.isString(message.qaQuestionId)) + return "qaQuestionId: string expected"; + return null; + }; + + /** + * Creates a CreateQaQuestionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest} CreateQaQuestionRequest + */ + CreateQaQuestionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.qaQuestion != null) { + if (typeof object.qaQuestion !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest.qaQuestion: object expected"); + message.qaQuestion = $root.google.cloud.contactcenterinsights.v1.QaQuestion.fromObject(object.qaQuestion); + } + if (object.qaQuestionId != null) + message.qaQuestionId = String(object.qaQuestionId); + return message; + }; + + /** + * Creates a plain object from a CreateQaQuestionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest} message CreateQaQuestionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateQaQuestionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.qaQuestion = null; + object.qaQuestionId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.qaQuestion != null && message.hasOwnProperty("qaQuestion")) + object.qaQuestion = $root.google.cloud.contactcenterinsights.v1.QaQuestion.toObject(message.qaQuestion, options); + if (message.qaQuestionId != null && message.hasOwnProperty("qaQuestionId")) + object.qaQuestionId = message.qaQuestionId; + return object; + }; + + /** + * Converts this CreateQaQuestionRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest + * @instance + * @returns {Object.} JSON object + */ + CreateQaQuestionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateQaQuestionRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateQaQuestionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest"; + }; + + return CreateQaQuestionRequest; + })(); + + v1.GetQaQuestionRequest = (function() { + + /** + * Properties of a GetQaQuestionRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IGetQaQuestionRequest + * @property {string|null} [name] GetQaQuestionRequest name + */ + + /** + * Constructs a new GetQaQuestionRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a GetQaQuestionRequest. + * @implements IGetQaQuestionRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IGetQaQuestionRequest=} [properties] Properties to set + */ + function GetQaQuestionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetQaQuestionRequest name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.GetQaQuestionRequest + * @instance + */ + GetQaQuestionRequest.prototype.name = ""; + + /** + * Creates a new GetQaQuestionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.GetQaQuestionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetQaQuestionRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.GetQaQuestionRequest} GetQaQuestionRequest instance + */ + GetQaQuestionRequest.create = function create(properties) { + return new GetQaQuestionRequest(properties); + }; + + /** + * Encodes the specified GetQaQuestionRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetQaQuestionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.GetQaQuestionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetQaQuestionRequest} message GetQaQuestionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetQaQuestionRequest.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 GetQaQuestionRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetQaQuestionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.GetQaQuestionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetQaQuestionRequest} message GetQaQuestionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetQaQuestionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetQaQuestionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.GetQaQuestionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.GetQaQuestionRequest} GetQaQuestionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetQaQuestionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.GetQaQuestionRequest(); + 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 GetQaQuestionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.GetQaQuestionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.GetQaQuestionRequest} GetQaQuestionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetQaQuestionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetQaQuestionRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.GetQaQuestionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetQaQuestionRequest.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 GetQaQuestionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.GetQaQuestionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.GetQaQuestionRequest} GetQaQuestionRequest + */ + GetQaQuestionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.GetQaQuestionRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.GetQaQuestionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetQaQuestionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.GetQaQuestionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.GetQaQuestionRequest} message GetQaQuestionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetQaQuestionRequest.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 GetQaQuestionRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.GetQaQuestionRequest + * @instance + * @returns {Object.} JSON object + */ + GetQaQuestionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetQaQuestionRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.GetQaQuestionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetQaQuestionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.GetQaQuestionRequest"; + }; + + return GetQaQuestionRequest; + })(); + + v1.ListQaQuestionsRequest = (function() { + + /** + * Properties of a ListQaQuestionsRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IListQaQuestionsRequest + * @property {string|null} [parent] ListQaQuestionsRequest parent + * @property {number|null} [pageSize] ListQaQuestionsRequest pageSize + * @property {string|null} [pageToken] ListQaQuestionsRequest pageToken + */ + + /** + * Constructs a new ListQaQuestionsRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ListQaQuestionsRequest. + * @implements IListQaQuestionsRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IListQaQuestionsRequest=} [properties] Properties to set + */ + function ListQaQuestionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListQaQuestionsRequest parent. + * @member {string} parent + * @memberof google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest + * @instance + */ + ListQaQuestionsRequest.prototype.parent = ""; + + /** + * ListQaQuestionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest + * @instance + */ + ListQaQuestionsRequest.prototype.pageSize = 0; + + /** + * ListQaQuestionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest + * @instance + */ + ListQaQuestionsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListQaQuestionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListQaQuestionsRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest} ListQaQuestionsRequest instance + */ + ListQaQuestionsRequest.create = function create(properties) { + return new ListQaQuestionsRequest(properties); + }; + + /** + * Encodes the specified ListQaQuestionsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListQaQuestionsRequest} message ListQaQuestionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListQaQuestionsRequest.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 ListQaQuestionsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListQaQuestionsRequest} message ListQaQuestionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListQaQuestionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListQaQuestionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest} ListQaQuestionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListQaQuestionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest(); + 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 ListQaQuestionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest} ListQaQuestionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListQaQuestionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListQaQuestionsRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListQaQuestionsRequest.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 ListQaQuestionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest} ListQaQuestionsRequest + */ + ListQaQuestionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest(); + 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 ListQaQuestionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest} message ListQaQuestionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListQaQuestionsRequest.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 ListQaQuestionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListQaQuestionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListQaQuestionsRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListQaQuestionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest"; + }; + + return ListQaQuestionsRequest; + })(); + + v1.ListQaQuestionsResponse = (function() { + + /** + * Properties of a ListQaQuestionsResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IListQaQuestionsResponse + * @property {Array.|null} [qaQuestions] ListQaQuestionsResponse qaQuestions + * @property {string|null} [nextPageToken] ListQaQuestionsResponse nextPageToken + */ + + /** + * Constructs a new ListQaQuestionsResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ListQaQuestionsResponse. + * @implements IListQaQuestionsResponse + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IListQaQuestionsResponse=} [properties] Properties to set + */ + function ListQaQuestionsResponse(properties) { + this.qaQuestions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListQaQuestionsResponse qaQuestions. + * @member {Array.} qaQuestions + * @memberof google.cloud.contactcenterinsights.v1.ListQaQuestionsResponse + * @instance + */ + ListQaQuestionsResponse.prototype.qaQuestions = $util.emptyArray; + + /** + * ListQaQuestionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.contactcenterinsights.v1.ListQaQuestionsResponse + * @instance + */ + ListQaQuestionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListQaQuestionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ListQaQuestionsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListQaQuestionsResponse=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ListQaQuestionsResponse} ListQaQuestionsResponse instance + */ + ListQaQuestionsResponse.create = function create(properties) { + return new ListQaQuestionsResponse(properties); + }; + + /** + * Encodes the specified ListQaQuestionsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListQaQuestionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ListQaQuestionsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListQaQuestionsResponse} message ListQaQuestionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListQaQuestionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.qaQuestions != null && message.qaQuestions.length) + for (var i = 0; i < message.qaQuestions.length; ++i) + $root.google.cloud.contactcenterinsights.v1.QaQuestion.encode(message.qaQuestions[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 ListQaQuestionsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListQaQuestionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListQaQuestionsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListQaQuestionsResponse} message ListQaQuestionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListQaQuestionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListQaQuestionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ListQaQuestionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ListQaQuestionsResponse} ListQaQuestionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListQaQuestionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListQaQuestionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.qaQuestions && message.qaQuestions.length)) + message.qaQuestions = []; + message.qaQuestions.push($root.google.cloud.contactcenterinsights.v1.QaQuestion.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListQaQuestionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListQaQuestionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ListQaQuestionsResponse} ListQaQuestionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListQaQuestionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListQaQuestionsResponse message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ListQaQuestionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListQaQuestionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.qaQuestions != null && message.hasOwnProperty("qaQuestions")) { + if (!Array.isArray(message.qaQuestions)) + return "qaQuestions: array expected"; + for (var i = 0; i < message.qaQuestions.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.QaQuestion.verify(message.qaQuestions[i]); + if (error) + return "qaQuestions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListQaQuestionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ListQaQuestionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ListQaQuestionsResponse} ListQaQuestionsResponse + */ + ListQaQuestionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListQaQuestionsResponse) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ListQaQuestionsResponse(); + if (object.qaQuestions) { + if (!Array.isArray(object.qaQuestions)) + throw TypeError(".google.cloud.contactcenterinsights.v1.ListQaQuestionsResponse.qaQuestions: array expected"); + message.qaQuestions = []; + for (var i = 0; i < object.qaQuestions.length; ++i) { + if (typeof object.qaQuestions[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ListQaQuestionsResponse.qaQuestions: object expected"); + message.qaQuestions[i] = $root.google.cloud.contactcenterinsights.v1.QaQuestion.fromObject(object.qaQuestions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListQaQuestionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ListQaQuestionsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.ListQaQuestionsResponse} message ListQaQuestionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListQaQuestionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.qaQuestions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.qaQuestions && message.qaQuestions.length) { + object.qaQuestions = []; + for (var j = 0; j < message.qaQuestions.length; ++j) + object.qaQuestions[j] = $root.google.cloud.contactcenterinsights.v1.QaQuestion.toObject(message.qaQuestions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListQaQuestionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ListQaQuestionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListQaQuestionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListQaQuestionsResponse + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ListQaQuestionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListQaQuestionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListQaQuestionsResponse"; + }; + + return ListQaQuestionsResponse; + })(); + + v1.UpdateQaQuestionRequest = (function() { + + /** + * Properties of an UpdateQaQuestionRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IUpdateQaQuestionRequest + * @property {google.cloud.contactcenterinsights.v1.IQaQuestion|null} [qaQuestion] UpdateQaQuestionRequest qaQuestion + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateQaQuestionRequest updateMask + */ + + /** + * Constructs a new UpdateQaQuestionRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an UpdateQaQuestionRequest. + * @implements IUpdateQaQuestionRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IUpdateQaQuestionRequest=} [properties] Properties to set + */ + function UpdateQaQuestionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateQaQuestionRequest qaQuestion. + * @member {google.cloud.contactcenterinsights.v1.IQaQuestion|null|undefined} qaQuestion + * @memberof google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest + * @instance + */ + UpdateQaQuestionRequest.prototype.qaQuestion = null; + + /** + * UpdateQaQuestionRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest + * @instance + */ + UpdateQaQuestionRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateQaQuestionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUpdateQaQuestionRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest} UpdateQaQuestionRequest instance + */ + UpdateQaQuestionRequest.create = function create(properties) { + return new UpdateQaQuestionRequest(properties); + }; + + /** + * Encodes the specified UpdateQaQuestionRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUpdateQaQuestionRequest} message UpdateQaQuestionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateQaQuestionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.qaQuestion != null && Object.hasOwnProperty.call(message, "qaQuestion")) + $root.google.cloud.contactcenterinsights.v1.QaQuestion.encode(message.qaQuestion, 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 UpdateQaQuestionRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUpdateQaQuestionRequest} message UpdateQaQuestionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateQaQuestionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateQaQuestionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest} UpdateQaQuestionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateQaQuestionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.qaQuestion = $root.google.cloud.contactcenterinsights.v1.QaQuestion.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 UpdateQaQuestionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest} UpdateQaQuestionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateQaQuestionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateQaQuestionRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateQaQuestionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.qaQuestion != null && message.hasOwnProperty("qaQuestion")) { + var error = $root.google.cloud.contactcenterinsights.v1.QaQuestion.verify(message.qaQuestion); + if (error) + return "qaQuestion." + 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 UpdateQaQuestionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest} UpdateQaQuestionRequest + */ + UpdateQaQuestionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest(); + if (object.qaQuestion != null) { + if (typeof object.qaQuestion !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest.qaQuestion: object expected"); + message.qaQuestion = $root.google.cloud.contactcenterinsights.v1.QaQuestion.fromObject(object.qaQuestion); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateQaQuestionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest} message UpdateQaQuestionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateQaQuestionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.qaQuestion = null; + object.updateMask = null; + } + if (message.qaQuestion != null && message.hasOwnProperty("qaQuestion")) + object.qaQuestion = $root.google.cloud.contactcenterinsights.v1.QaQuestion.toObject(message.qaQuestion, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateQaQuestionRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateQaQuestionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateQaQuestionRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateQaQuestionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest"; + }; + + return UpdateQaQuestionRequest; + })(); + + v1.DeleteQaQuestionRequest = (function() { + + /** + * Properties of a DeleteQaQuestionRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IDeleteQaQuestionRequest + * @property {string|null} [name] DeleteQaQuestionRequest name + */ + + /** + * Constructs a new DeleteQaQuestionRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a DeleteQaQuestionRequest. + * @implements IDeleteQaQuestionRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IDeleteQaQuestionRequest=} [properties] Properties to set + */ + function DeleteQaQuestionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteQaQuestionRequest name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest + * @instance + */ + DeleteQaQuestionRequest.prototype.name = ""; + + /** + * Creates a new DeleteQaQuestionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeleteQaQuestionRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest} DeleteQaQuestionRequest instance + */ + DeleteQaQuestionRequest.create = function create(properties) { + return new DeleteQaQuestionRequest(properties); + }; + + /** + * Encodes the specified DeleteQaQuestionRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeleteQaQuestionRequest} message DeleteQaQuestionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteQaQuestionRequest.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 DeleteQaQuestionRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeleteQaQuestionRequest} message DeleteQaQuestionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteQaQuestionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteQaQuestionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest} DeleteQaQuestionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteQaQuestionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest(); + 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 DeleteQaQuestionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest} DeleteQaQuestionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteQaQuestionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteQaQuestionRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteQaQuestionRequest.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 DeleteQaQuestionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest} DeleteQaQuestionRequest + */ + DeleteQaQuestionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteQaQuestionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest} message DeleteQaQuestionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteQaQuestionRequest.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 DeleteQaQuestionRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteQaQuestionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteQaQuestionRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteQaQuestionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest"; + }; + + return DeleteQaQuestionRequest; + })(); + + v1.CreateQaScorecardRequest = (function() { + + /** + * Properties of a CreateQaScorecardRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface ICreateQaScorecardRequest + * @property {string|null} [parent] CreateQaScorecardRequest parent + * @property {google.cloud.contactcenterinsights.v1.IQaScorecard|null} [qaScorecard] CreateQaScorecardRequest qaScorecard + * @property {string|null} [qaScorecardId] CreateQaScorecardRequest qaScorecardId + */ + + /** + * Constructs a new CreateQaScorecardRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a CreateQaScorecardRequest. + * @implements ICreateQaScorecardRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.ICreateQaScorecardRequest=} [properties] Properties to set + */ + function CreateQaScorecardRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateQaScorecardRequest parent. + * @member {string} parent + * @memberof google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest + * @instance + */ + CreateQaScorecardRequest.prototype.parent = ""; + + /** + * CreateQaScorecardRequest qaScorecard. + * @member {google.cloud.contactcenterinsights.v1.IQaScorecard|null|undefined} qaScorecard + * @memberof google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest + * @instance + */ + CreateQaScorecardRequest.prototype.qaScorecard = null; + + /** + * CreateQaScorecardRequest qaScorecardId. + * @member {string} qaScorecardId + * @memberof google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest + * @instance + */ + CreateQaScorecardRequest.prototype.qaScorecardId = ""; + + /** + * Creates a new CreateQaScorecardRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreateQaScorecardRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest} CreateQaScorecardRequest instance + */ + CreateQaScorecardRequest.create = function create(properties) { + return new CreateQaScorecardRequest(properties); + }; + + /** + * Encodes the specified CreateQaScorecardRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreateQaScorecardRequest} message CreateQaScorecardRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateQaScorecardRequest.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.qaScorecard != null && Object.hasOwnProperty.call(message, "qaScorecard")) + $root.google.cloud.contactcenterinsights.v1.QaScorecard.encode(message.qaScorecard, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.qaScorecardId != null && Object.hasOwnProperty.call(message, "qaScorecardId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.qaScorecardId); + return writer; + }; + + /** + * Encodes the specified CreateQaScorecardRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreateQaScorecardRequest} message CreateQaScorecardRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateQaScorecardRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateQaScorecardRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest} CreateQaScorecardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateQaScorecardRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.qaScorecard = $root.google.cloud.contactcenterinsights.v1.QaScorecard.decode(reader, reader.uint32()); + break; + } + case 3: { + message.qaScorecardId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateQaScorecardRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest} CreateQaScorecardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateQaScorecardRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateQaScorecardRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateQaScorecardRequest.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.qaScorecard != null && message.hasOwnProperty("qaScorecard")) { + var error = $root.google.cloud.contactcenterinsights.v1.QaScorecard.verify(message.qaScorecard); + if (error) + return "qaScorecard." + error; + } + if (message.qaScorecardId != null && message.hasOwnProperty("qaScorecardId")) + if (!$util.isString(message.qaScorecardId)) + return "qaScorecardId: string expected"; + return null; + }; + + /** + * Creates a CreateQaScorecardRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest} CreateQaScorecardRequest + */ + CreateQaScorecardRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.qaScorecard != null) { + if (typeof object.qaScorecard !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest.qaScorecard: object expected"); + message.qaScorecard = $root.google.cloud.contactcenterinsights.v1.QaScorecard.fromObject(object.qaScorecard); + } + if (object.qaScorecardId != null) + message.qaScorecardId = String(object.qaScorecardId); + return message; + }; + + /** + * Creates a plain object from a CreateQaScorecardRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest} message CreateQaScorecardRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateQaScorecardRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.qaScorecard = null; + object.qaScorecardId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.qaScorecard != null && message.hasOwnProperty("qaScorecard")) + object.qaScorecard = $root.google.cloud.contactcenterinsights.v1.QaScorecard.toObject(message.qaScorecard, options); + if (message.qaScorecardId != null && message.hasOwnProperty("qaScorecardId")) + object.qaScorecardId = message.qaScorecardId; + return object; + }; + + /** + * Converts this CreateQaScorecardRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest + * @instance + * @returns {Object.} JSON object + */ + CreateQaScorecardRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateQaScorecardRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateQaScorecardRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest"; + }; + + return CreateQaScorecardRequest; + })(); + + v1.GetQaScorecardRequest = (function() { + + /** + * Properties of a GetQaScorecardRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IGetQaScorecardRequest + * @property {string|null} [name] GetQaScorecardRequest name + */ + + /** + * Constructs a new GetQaScorecardRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a GetQaScorecardRequest. + * @implements IGetQaScorecardRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IGetQaScorecardRequest=} [properties] Properties to set + */ + function GetQaScorecardRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetQaScorecardRequest name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.GetQaScorecardRequest + * @instance + */ + GetQaScorecardRequest.prototype.name = ""; + + /** + * Creates a new GetQaScorecardRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.GetQaScorecardRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetQaScorecardRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.GetQaScorecardRequest} GetQaScorecardRequest instance + */ + GetQaScorecardRequest.create = function create(properties) { + return new GetQaScorecardRequest(properties); + }; + + /** + * Encodes the specified GetQaScorecardRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetQaScorecardRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.GetQaScorecardRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetQaScorecardRequest} message GetQaScorecardRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetQaScorecardRequest.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 GetQaScorecardRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetQaScorecardRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.GetQaScorecardRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetQaScorecardRequest} message GetQaScorecardRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetQaScorecardRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetQaScorecardRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.GetQaScorecardRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.GetQaScorecardRequest} GetQaScorecardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetQaScorecardRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.GetQaScorecardRequest(); + 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 GetQaScorecardRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.GetQaScorecardRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.GetQaScorecardRequest} GetQaScorecardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetQaScorecardRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetQaScorecardRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.GetQaScorecardRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetQaScorecardRequest.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 GetQaScorecardRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.GetQaScorecardRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.GetQaScorecardRequest} GetQaScorecardRequest + */ + GetQaScorecardRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.GetQaScorecardRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.GetQaScorecardRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetQaScorecardRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.GetQaScorecardRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.GetQaScorecardRequest} message GetQaScorecardRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetQaScorecardRequest.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 GetQaScorecardRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.GetQaScorecardRequest + * @instance + * @returns {Object.} JSON object + */ + GetQaScorecardRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetQaScorecardRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.GetQaScorecardRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetQaScorecardRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.GetQaScorecardRequest"; + }; + + return GetQaScorecardRequest; + })(); + + v1.UpdateQaScorecardRequest = (function() { + + /** + * Properties of an UpdateQaScorecardRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IUpdateQaScorecardRequest + * @property {google.cloud.contactcenterinsights.v1.IQaScorecard|null} [qaScorecard] UpdateQaScorecardRequest qaScorecard + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateQaScorecardRequest updateMask + */ + + /** + * Constructs a new UpdateQaScorecardRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an UpdateQaScorecardRequest. + * @implements IUpdateQaScorecardRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IUpdateQaScorecardRequest=} [properties] Properties to set + */ + function UpdateQaScorecardRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateQaScorecardRequest qaScorecard. + * @member {google.cloud.contactcenterinsights.v1.IQaScorecard|null|undefined} qaScorecard + * @memberof google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest + * @instance + */ + UpdateQaScorecardRequest.prototype.qaScorecard = null; + + /** + * UpdateQaScorecardRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest + * @instance + */ + UpdateQaScorecardRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateQaScorecardRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUpdateQaScorecardRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest} UpdateQaScorecardRequest instance + */ + UpdateQaScorecardRequest.create = function create(properties) { + return new UpdateQaScorecardRequest(properties); + }; + + /** + * Encodes the specified UpdateQaScorecardRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUpdateQaScorecardRequest} message UpdateQaScorecardRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateQaScorecardRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.qaScorecard != null && Object.hasOwnProperty.call(message, "qaScorecard")) + $root.google.cloud.contactcenterinsights.v1.QaScorecard.encode(message.qaScorecard, 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 UpdateQaScorecardRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUpdateQaScorecardRequest} message UpdateQaScorecardRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateQaScorecardRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateQaScorecardRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest} UpdateQaScorecardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateQaScorecardRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.qaScorecard = $root.google.cloud.contactcenterinsights.v1.QaScorecard.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 UpdateQaScorecardRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest} UpdateQaScorecardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateQaScorecardRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateQaScorecardRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateQaScorecardRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.qaScorecard != null && message.hasOwnProperty("qaScorecard")) { + var error = $root.google.cloud.contactcenterinsights.v1.QaScorecard.verify(message.qaScorecard); + if (error) + return "qaScorecard." + 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 UpdateQaScorecardRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest} UpdateQaScorecardRequest + */ + UpdateQaScorecardRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest(); + if (object.qaScorecard != null) { + if (typeof object.qaScorecard !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest.qaScorecard: object expected"); + message.qaScorecard = $root.google.cloud.contactcenterinsights.v1.QaScorecard.fromObject(object.qaScorecard); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateQaScorecardRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest} message UpdateQaScorecardRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateQaScorecardRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.qaScorecard = null; + object.updateMask = null; + } + if (message.qaScorecard != null && message.hasOwnProperty("qaScorecard")) + object.qaScorecard = $root.google.cloud.contactcenterinsights.v1.QaScorecard.toObject(message.qaScorecard, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateQaScorecardRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateQaScorecardRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateQaScorecardRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateQaScorecardRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest"; + }; + + return UpdateQaScorecardRequest; + })(); + + v1.DeleteQaScorecardRequest = (function() { + + /** + * Properties of a DeleteQaScorecardRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IDeleteQaScorecardRequest + * @property {string|null} [name] DeleteQaScorecardRequest name + * @property {boolean|null} [force] DeleteQaScorecardRequest force + */ + + /** + * Constructs a new DeleteQaScorecardRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a DeleteQaScorecardRequest. + * @implements IDeleteQaScorecardRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRequest=} [properties] Properties to set + */ + function DeleteQaScorecardRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteQaScorecardRequest name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest + * @instance + */ + DeleteQaScorecardRequest.prototype.name = ""; + + /** + * DeleteQaScorecardRequest force. + * @member {boolean} force + * @memberof google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest + * @instance + */ + DeleteQaScorecardRequest.prototype.force = false; + + /** + * Creates a new DeleteQaScorecardRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest} DeleteQaScorecardRequest instance + */ + DeleteQaScorecardRequest.create = function create(properties) { + return new DeleteQaScorecardRequest(properties); + }; + + /** + * Encodes the specified DeleteQaScorecardRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRequest} message DeleteQaScorecardRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteQaScorecardRequest.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 DeleteQaScorecardRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRequest} message DeleteQaScorecardRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteQaScorecardRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteQaScorecardRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest} DeleteQaScorecardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteQaScorecardRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest(); + 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 DeleteQaScorecardRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest} DeleteQaScorecardRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteQaScorecardRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteQaScorecardRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteQaScorecardRequest.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 DeleteQaScorecardRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest} DeleteQaScorecardRequest + */ + DeleteQaScorecardRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest(); + 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 DeleteQaScorecardRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest} message DeleteQaScorecardRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteQaScorecardRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.force = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + return object; + }; + + /** + * Converts this DeleteQaScorecardRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteQaScorecardRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteQaScorecardRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteQaScorecardRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest"; + }; + + return DeleteQaScorecardRequest; + })(); + + v1.CreateQaScorecardRevisionRequest = (function() { + + /** + * Properties of a CreateQaScorecardRevisionRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface ICreateQaScorecardRevisionRequest + * @property {string|null} [parent] CreateQaScorecardRevisionRequest parent + * @property {google.cloud.contactcenterinsights.v1.IQaScorecardRevision|null} [qaScorecardRevision] CreateQaScorecardRevisionRequest qaScorecardRevision + * @property {string|null} [qaScorecardRevisionId] CreateQaScorecardRevisionRequest qaScorecardRevisionId + */ + + /** + * Constructs a new CreateQaScorecardRevisionRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a CreateQaScorecardRevisionRequest. + * @implements ICreateQaScorecardRevisionRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.ICreateQaScorecardRevisionRequest=} [properties] Properties to set + */ + function CreateQaScorecardRevisionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateQaScorecardRevisionRequest parent. + * @member {string} parent + * @memberof google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest + * @instance + */ + CreateQaScorecardRevisionRequest.prototype.parent = ""; + + /** + * CreateQaScorecardRevisionRequest qaScorecardRevision. + * @member {google.cloud.contactcenterinsights.v1.IQaScorecardRevision|null|undefined} qaScorecardRevision + * @memberof google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest + * @instance + */ + CreateQaScorecardRevisionRequest.prototype.qaScorecardRevision = null; + + /** + * CreateQaScorecardRevisionRequest qaScorecardRevisionId. + * @member {string} qaScorecardRevisionId + * @memberof google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest + * @instance + */ + CreateQaScorecardRevisionRequest.prototype.qaScorecardRevisionId = ""; + + /** + * Creates a new CreateQaScorecardRevisionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreateQaScorecardRevisionRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest} CreateQaScorecardRevisionRequest instance + */ + CreateQaScorecardRevisionRequest.create = function create(properties) { + return new CreateQaScorecardRevisionRequest(properties); + }; + + /** + * Encodes the specified CreateQaScorecardRevisionRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreateQaScorecardRevisionRequest} message CreateQaScorecardRevisionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateQaScorecardRevisionRequest.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.qaScorecardRevision != null && Object.hasOwnProperty.call(message, "qaScorecardRevision")) + $root.google.cloud.contactcenterinsights.v1.QaScorecardRevision.encode(message.qaScorecardRevision, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.qaScorecardRevisionId != null && Object.hasOwnProperty.call(message, "qaScorecardRevisionId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.qaScorecardRevisionId); + return writer; + }; + + /** + * Encodes the specified CreateQaScorecardRevisionRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreateQaScorecardRevisionRequest} message CreateQaScorecardRevisionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateQaScorecardRevisionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateQaScorecardRevisionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest} CreateQaScorecardRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateQaScorecardRevisionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.qaScorecardRevision = $root.google.cloud.contactcenterinsights.v1.QaScorecardRevision.decode(reader, reader.uint32()); + break; + } + case 3: { + message.qaScorecardRevisionId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateQaScorecardRevisionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest} CreateQaScorecardRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateQaScorecardRevisionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateQaScorecardRevisionRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateQaScorecardRevisionRequest.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.qaScorecardRevision != null && message.hasOwnProperty("qaScorecardRevision")) { + var error = $root.google.cloud.contactcenterinsights.v1.QaScorecardRevision.verify(message.qaScorecardRevision); + if (error) + return "qaScorecardRevision." + error; + } + if (message.qaScorecardRevisionId != null && message.hasOwnProperty("qaScorecardRevisionId")) + if (!$util.isString(message.qaScorecardRevisionId)) + return "qaScorecardRevisionId: string expected"; + return null; + }; + + /** + * Creates a CreateQaScorecardRevisionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest} CreateQaScorecardRevisionRequest + */ + CreateQaScorecardRevisionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.qaScorecardRevision != null) { + if (typeof object.qaScorecardRevision !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest.qaScorecardRevision: object expected"); + message.qaScorecardRevision = $root.google.cloud.contactcenterinsights.v1.QaScorecardRevision.fromObject(object.qaScorecardRevision); + } + if (object.qaScorecardRevisionId != null) + message.qaScorecardRevisionId = String(object.qaScorecardRevisionId); + return message; + }; + + /** + * Creates a plain object from a CreateQaScorecardRevisionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest} message CreateQaScorecardRevisionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateQaScorecardRevisionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.qaScorecardRevision = null; + object.qaScorecardRevisionId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.qaScorecardRevision != null && message.hasOwnProperty("qaScorecardRevision")) + object.qaScorecardRevision = $root.google.cloud.contactcenterinsights.v1.QaScorecardRevision.toObject(message.qaScorecardRevision, options); + if (message.qaScorecardRevisionId != null && message.hasOwnProperty("qaScorecardRevisionId")) + object.qaScorecardRevisionId = message.qaScorecardRevisionId; + return object; + }; + + /** + * Converts this CreateQaScorecardRevisionRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest + * @instance + * @returns {Object.} JSON object + */ + CreateQaScorecardRevisionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateQaScorecardRevisionRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateQaScorecardRevisionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest"; + }; + + return CreateQaScorecardRevisionRequest; + })(); + + v1.GetQaScorecardRevisionRequest = (function() { + + /** + * Properties of a GetQaScorecardRevisionRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IGetQaScorecardRevisionRequest + * @property {string|null} [name] GetQaScorecardRevisionRequest name + */ + + /** + * Constructs a new GetQaScorecardRevisionRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a GetQaScorecardRevisionRequest. + * @implements IGetQaScorecardRevisionRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IGetQaScorecardRevisionRequest=} [properties] Properties to set + */ + function GetQaScorecardRevisionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetQaScorecardRevisionRequest name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest + * @instance + */ + GetQaScorecardRevisionRequest.prototype.name = ""; + + /** + * Creates a new GetQaScorecardRevisionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetQaScorecardRevisionRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest} GetQaScorecardRevisionRequest instance + */ + GetQaScorecardRevisionRequest.create = function create(properties) { + return new GetQaScorecardRevisionRequest(properties); + }; + + /** + * Encodes the specified GetQaScorecardRevisionRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetQaScorecardRevisionRequest} message GetQaScorecardRevisionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetQaScorecardRevisionRequest.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 GetQaScorecardRevisionRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetQaScorecardRevisionRequest} message GetQaScorecardRevisionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetQaScorecardRevisionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetQaScorecardRevisionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest} GetQaScorecardRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetQaScorecardRevisionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest(); + 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 GetQaScorecardRevisionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest} GetQaScorecardRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetQaScorecardRevisionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetQaScorecardRevisionRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetQaScorecardRevisionRequest.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 GetQaScorecardRevisionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest} GetQaScorecardRevisionRequest + */ + GetQaScorecardRevisionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetQaScorecardRevisionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest} message GetQaScorecardRevisionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetQaScorecardRevisionRequest.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 GetQaScorecardRevisionRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest + * @instance + * @returns {Object.} JSON object + */ + GetQaScorecardRevisionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetQaScorecardRevisionRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetQaScorecardRevisionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest"; + }; + + return GetQaScorecardRevisionRequest; + })(); + + v1.TuneQaScorecardRevisionRequest = (function() { + + /** + * Properties of a TuneQaScorecardRevisionRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface ITuneQaScorecardRevisionRequest + * @property {string|null} [parent] TuneQaScorecardRevisionRequest parent + * @property {string|null} [filter] TuneQaScorecardRevisionRequest filter + * @property {boolean|null} [validateOnly] TuneQaScorecardRevisionRequest validateOnly + */ + + /** + * Constructs a new TuneQaScorecardRevisionRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a TuneQaScorecardRevisionRequest. + * @implements ITuneQaScorecardRevisionRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionRequest=} [properties] Properties to set + */ + function TuneQaScorecardRevisionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TuneQaScorecardRevisionRequest parent. + * @member {string} parent + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest + * @instance + */ + TuneQaScorecardRevisionRequest.prototype.parent = ""; + + /** + * TuneQaScorecardRevisionRequest filter. + * @member {string} filter + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest + * @instance + */ + TuneQaScorecardRevisionRequest.prototype.filter = ""; + + /** + * TuneQaScorecardRevisionRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest + * @instance + */ + TuneQaScorecardRevisionRequest.prototype.validateOnly = false; + + /** + * Creates a new TuneQaScorecardRevisionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest} TuneQaScorecardRevisionRequest instance + */ + TuneQaScorecardRevisionRequest.create = function create(properties) { + return new TuneQaScorecardRevisionRequest(properties); + }; + + /** + * Encodes the specified TuneQaScorecardRevisionRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionRequest} message TuneQaScorecardRevisionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TuneQaScorecardRevisionRequest.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.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified TuneQaScorecardRevisionRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionRequest} message TuneQaScorecardRevisionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TuneQaScorecardRevisionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TuneQaScorecardRevisionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest} TuneQaScorecardRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TuneQaScorecardRevisionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest(); + 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.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TuneQaScorecardRevisionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest} TuneQaScorecardRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TuneQaScorecardRevisionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TuneQaScorecardRevisionRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TuneQaScorecardRevisionRequest.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.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a TuneQaScorecardRevisionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest} TuneQaScorecardRevisionRequest + */ + TuneQaScorecardRevisionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a TuneQaScorecardRevisionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest} message TuneQaScorecardRevisionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TuneQaScorecardRevisionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.filter = ""; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this TuneQaScorecardRevisionRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest + * @instance + * @returns {Object.} JSON object + */ + TuneQaScorecardRevisionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TuneQaScorecardRevisionRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TuneQaScorecardRevisionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest"; + }; + + return TuneQaScorecardRevisionRequest; + })(); + + v1.TuneQaScorecardRevisionResponse = (function() { + + /** + * Properties of a TuneQaScorecardRevisionResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface ITuneQaScorecardRevisionResponse + */ + + /** + * Constructs a new TuneQaScorecardRevisionResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a TuneQaScorecardRevisionResponse. + * @implements ITuneQaScorecardRevisionResponse + * @constructor + * @param {google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionResponse=} [properties] Properties to set + */ + function TuneQaScorecardRevisionResponse(properties) { + if (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 TuneQaScorecardRevisionResponse instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionResponse=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionResponse} TuneQaScorecardRevisionResponse instance + */ + TuneQaScorecardRevisionResponse.create = function create(properties) { + return new TuneQaScorecardRevisionResponse(properties); + }; + + /** + * Encodes the specified TuneQaScorecardRevisionResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionResponse} message TuneQaScorecardRevisionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TuneQaScorecardRevisionResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified TuneQaScorecardRevisionResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionResponse} message TuneQaScorecardRevisionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TuneQaScorecardRevisionResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TuneQaScorecardRevisionResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionResponse} TuneQaScorecardRevisionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TuneQaScorecardRevisionResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TuneQaScorecardRevisionResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionResponse} TuneQaScorecardRevisionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TuneQaScorecardRevisionResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TuneQaScorecardRevisionResponse message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TuneQaScorecardRevisionResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a TuneQaScorecardRevisionResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionResponse} TuneQaScorecardRevisionResponse + */ + TuneQaScorecardRevisionResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionResponse) + return object; + return new $root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionResponse(); + }; + + /** + * Creates a plain object from a TuneQaScorecardRevisionResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionResponse} message TuneQaScorecardRevisionResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TuneQaScorecardRevisionResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this TuneQaScorecardRevisionResponse to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionResponse + * @instance + * @returns {Object.} JSON object + */ + TuneQaScorecardRevisionResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TuneQaScorecardRevisionResponse + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TuneQaScorecardRevisionResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionResponse"; + }; + + return TuneQaScorecardRevisionResponse; + })(); + + v1.TuneQaScorecardRevisionMetadata = (function() { + + /** + * Properties of a TuneQaScorecardRevisionMetadata. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface ITuneQaScorecardRevisionMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] TuneQaScorecardRevisionMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] TuneQaScorecardRevisionMetadata endTime + * @property {google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionRequest|null} [request] TuneQaScorecardRevisionMetadata request + * @property {Array.|null} [qaQuestionDatasetValidationResults] TuneQaScorecardRevisionMetadata qaQuestionDatasetValidationResults + * @property {Array.|null} [qaQuestionDatasetTuningMetrics] TuneQaScorecardRevisionMetadata qaQuestionDatasetTuningMetrics + * @property {number|null} [tuningCompletionRatio] TuneQaScorecardRevisionMetadata tuningCompletionRatio + */ + + /** + * Constructs a new TuneQaScorecardRevisionMetadata. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a TuneQaScorecardRevisionMetadata. + * @implements ITuneQaScorecardRevisionMetadata + * @constructor + * @param {google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionMetadata=} [properties] Properties to set + */ + function TuneQaScorecardRevisionMetadata(properties) { + this.qaQuestionDatasetValidationResults = []; + this.qaQuestionDatasetTuningMetrics = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TuneQaScorecardRevisionMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata + * @instance + */ + TuneQaScorecardRevisionMetadata.prototype.createTime = null; + + /** + * TuneQaScorecardRevisionMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata + * @instance + */ + TuneQaScorecardRevisionMetadata.prototype.endTime = null; + + /** + * TuneQaScorecardRevisionMetadata request. + * @member {google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionRequest|null|undefined} request + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata + * @instance + */ + TuneQaScorecardRevisionMetadata.prototype.request = null; + + /** + * TuneQaScorecardRevisionMetadata qaQuestionDatasetValidationResults. + * @member {Array.} qaQuestionDatasetValidationResults + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata + * @instance + */ + TuneQaScorecardRevisionMetadata.prototype.qaQuestionDatasetValidationResults = $util.emptyArray; + + /** + * TuneQaScorecardRevisionMetadata qaQuestionDatasetTuningMetrics. + * @member {Array.} qaQuestionDatasetTuningMetrics + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata + * @instance + */ + TuneQaScorecardRevisionMetadata.prototype.qaQuestionDatasetTuningMetrics = $util.emptyArray; + + /** + * TuneQaScorecardRevisionMetadata tuningCompletionRatio. + * @member {number} tuningCompletionRatio + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata + * @instance + */ + TuneQaScorecardRevisionMetadata.prototype.tuningCompletionRatio = 0; + + /** + * Creates a new TuneQaScorecardRevisionMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionMetadata=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata} TuneQaScorecardRevisionMetadata instance + */ + TuneQaScorecardRevisionMetadata.create = function create(properties) { + return new TuneQaScorecardRevisionMetadata(properties); + }; + + /** + * Encodes the specified TuneQaScorecardRevisionMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionMetadata} message TuneQaScorecardRevisionMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TuneQaScorecardRevisionMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.request != null && Object.hasOwnProperty.call(message, "request")) + $root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest.encode(message.request, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.qaQuestionDatasetValidationResults != null && message.qaQuestionDatasetValidationResults.length) + for (var i = 0; i < message.qaQuestionDatasetValidationResults.length; ++i) + $root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult.encode(message.qaQuestionDatasetValidationResults[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.qaQuestionDatasetTuningMetrics != null && message.qaQuestionDatasetTuningMetrics.length) + for (var i = 0; i < message.qaQuestionDatasetTuningMetrics.length; ++i) + $root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.encode(message.qaQuestionDatasetTuningMetrics[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.tuningCompletionRatio != null && Object.hasOwnProperty.call(message, "tuningCompletionRatio")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.tuningCompletionRatio); + return writer; + }; + + /** + * Encodes the specified TuneQaScorecardRevisionMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionMetadata} message TuneQaScorecardRevisionMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TuneQaScorecardRevisionMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TuneQaScorecardRevisionMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata} TuneQaScorecardRevisionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TuneQaScorecardRevisionMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.request = $root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.qaQuestionDatasetValidationResults && message.qaQuestionDatasetValidationResults.length)) + message.qaQuestionDatasetValidationResults = []; + message.qaQuestionDatasetValidationResults.push($root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.qaQuestionDatasetTuningMetrics && message.qaQuestionDatasetTuningMetrics.length)) + message.qaQuestionDatasetTuningMetrics = []; + message.qaQuestionDatasetTuningMetrics.push($root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.decode(reader, reader.uint32())); + break; + } + case 6: { + message.tuningCompletionRatio = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TuneQaScorecardRevisionMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata} TuneQaScorecardRevisionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TuneQaScorecardRevisionMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TuneQaScorecardRevisionMetadata message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TuneQaScorecardRevisionMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.request != null && message.hasOwnProperty("request")) { + var error = $root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest.verify(message.request); + if (error) + return "request." + error; + } + if (message.qaQuestionDatasetValidationResults != null && message.hasOwnProperty("qaQuestionDatasetValidationResults")) { + if (!Array.isArray(message.qaQuestionDatasetValidationResults)) + return "qaQuestionDatasetValidationResults: array expected"; + for (var i = 0; i < message.qaQuestionDatasetValidationResults.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult.verify(message.qaQuestionDatasetValidationResults[i]); + if (error) + return "qaQuestionDatasetValidationResults." + error; + } + } + if (message.qaQuestionDatasetTuningMetrics != null && message.hasOwnProperty("qaQuestionDatasetTuningMetrics")) { + if (!Array.isArray(message.qaQuestionDatasetTuningMetrics)) + return "qaQuestionDatasetTuningMetrics: array expected"; + for (var i = 0; i < message.qaQuestionDatasetTuningMetrics.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.verify(message.qaQuestionDatasetTuningMetrics[i]); + if (error) + return "qaQuestionDatasetTuningMetrics." + error; + } + } + if (message.tuningCompletionRatio != null && message.hasOwnProperty("tuningCompletionRatio")) + if (typeof message.tuningCompletionRatio !== "number") + return "tuningCompletionRatio: number expected"; + return null; + }; + + /** + * Creates a TuneQaScorecardRevisionMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata} TuneQaScorecardRevisionMetadata + */ + TuneQaScorecardRevisionMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.request != null) { + if (typeof object.request !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.request: object expected"); + message.request = $root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest.fromObject(object.request); + } + if (object.qaQuestionDatasetValidationResults) { + if (!Array.isArray(object.qaQuestionDatasetValidationResults)) + throw TypeError(".google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.qaQuestionDatasetValidationResults: array expected"); + message.qaQuestionDatasetValidationResults = []; + for (var i = 0; i < object.qaQuestionDatasetValidationResults.length; ++i) { + if (typeof object.qaQuestionDatasetValidationResults[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.qaQuestionDatasetValidationResults: object expected"); + message.qaQuestionDatasetValidationResults[i] = $root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult.fromObject(object.qaQuestionDatasetValidationResults[i]); + } + } + if (object.qaQuestionDatasetTuningMetrics) { + if (!Array.isArray(object.qaQuestionDatasetTuningMetrics)) + throw TypeError(".google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.qaQuestionDatasetTuningMetrics: array expected"); + message.qaQuestionDatasetTuningMetrics = []; + for (var i = 0; i < object.qaQuestionDatasetTuningMetrics.length; ++i) { + if (typeof object.qaQuestionDatasetTuningMetrics[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.qaQuestionDatasetTuningMetrics: object expected"); + message.qaQuestionDatasetTuningMetrics[i] = $root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.fromObject(object.qaQuestionDatasetTuningMetrics[i]); + } + } + if (object.tuningCompletionRatio != null) + message.tuningCompletionRatio = Number(object.tuningCompletionRatio); + return message; + }; + + /** + * Creates a plain object from a TuneQaScorecardRevisionMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata} message TuneQaScorecardRevisionMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TuneQaScorecardRevisionMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.qaQuestionDatasetValidationResults = []; + object.qaQuestionDatasetTuningMetrics = []; + } + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.request = null; + object.tuningCompletionRatio = 0; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.request != null && message.hasOwnProperty("request")) + object.request = $root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest.toObject(message.request, options); + if (message.qaQuestionDatasetValidationResults && message.qaQuestionDatasetValidationResults.length) { + object.qaQuestionDatasetValidationResults = []; + for (var j = 0; j < message.qaQuestionDatasetValidationResults.length; ++j) + object.qaQuestionDatasetValidationResults[j] = $root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult.toObject(message.qaQuestionDatasetValidationResults[j], options); + } + if (message.qaQuestionDatasetTuningMetrics && message.qaQuestionDatasetTuningMetrics.length) { + object.qaQuestionDatasetTuningMetrics = []; + for (var j = 0; j < message.qaQuestionDatasetTuningMetrics.length; ++j) + object.qaQuestionDatasetTuningMetrics[j] = $root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.toObject(message.qaQuestionDatasetTuningMetrics[j], options); + } + if (message.tuningCompletionRatio != null && message.hasOwnProperty("tuningCompletionRatio")) + object.tuningCompletionRatio = options.json && !isFinite(message.tuningCompletionRatio) ? String(message.tuningCompletionRatio) : message.tuningCompletionRatio; + return object; + }; + + /** + * Converts this TuneQaScorecardRevisionMetadata to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata + * @instance + * @returns {Object.} JSON object + */ + TuneQaScorecardRevisionMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TuneQaScorecardRevisionMetadata + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TuneQaScorecardRevisionMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata"; + }; + + TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult = (function() { + + /** + * Properties of a QaQuestionDatasetValidationResult. + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata + * @interface IQaQuestionDatasetValidationResult + * @property {string|null} [question] QaQuestionDatasetValidationResult question + * @property {Array.|null} [datasetValidationWarnings] QaQuestionDatasetValidationResult datasetValidationWarnings + * @property {number|null} [validFeedbackLabelsCount] QaQuestionDatasetValidationResult validFeedbackLabelsCount + */ + + /** + * Constructs a new QaQuestionDatasetValidationResult. + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata + * @classdesc Represents a QaQuestionDatasetValidationResult. + * @implements IQaQuestionDatasetValidationResult + * @constructor + * @param {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.IQaQuestionDatasetValidationResult=} [properties] Properties to set + */ + function QaQuestionDatasetValidationResult(properties) { + this.datasetValidationWarnings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QaQuestionDatasetValidationResult question. + * @member {string} question + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult + * @instance + */ + QaQuestionDatasetValidationResult.prototype.question = ""; + + /** + * QaQuestionDatasetValidationResult datasetValidationWarnings. + * @member {Array.} datasetValidationWarnings + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult + * @instance + */ + QaQuestionDatasetValidationResult.prototype.datasetValidationWarnings = $util.emptyArray; + + /** + * QaQuestionDatasetValidationResult validFeedbackLabelsCount. + * @member {number} validFeedbackLabelsCount + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult + * @instance + */ + QaQuestionDatasetValidationResult.prototype.validFeedbackLabelsCount = 0; + + /** + * Creates a new QaQuestionDatasetValidationResult instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult + * @static + * @param {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.IQaQuestionDatasetValidationResult=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult} QaQuestionDatasetValidationResult instance + */ + QaQuestionDatasetValidationResult.create = function create(properties) { + return new QaQuestionDatasetValidationResult(properties); + }; + + /** + * Encodes the specified QaQuestionDatasetValidationResult message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult + * @static + * @param {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.IQaQuestionDatasetValidationResult} message QaQuestionDatasetValidationResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QaQuestionDatasetValidationResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.question != null && Object.hasOwnProperty.call(message, "question")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.question); + if (message.datasetValidationWarnings != null && message.datasetValidationWarnings.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.datasetValidationWarnings.length; ++i) + writer.int32(message.datasetValidationWarnings[i]); + writer.ldelim(); + } + if (message.validFeedbackLabelsCount != null && Object.hasOwnProperty.call(message, "validFeedbackLabelsCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.validFeedbackLabelsCount); + return writer; + }; + + /** + * Encodes the specified QaQuestionDatasetValidationResult message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult + * @static + * @param {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.IQaQuestionDatasetValidationResult} message QaQuestionDatasetValidationResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QaQuestionDatasetValidationResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QaQuestionDatasetValidationResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult} QaQuestionDatasetValidationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QaQuestionDatasetValidationResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.question = reader.string(); + break; + } + case 2: { + if (!(message.datasetValidationWarnings && message.datasetValidationWarnings.length)) + message.datasetValidationWarnings = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.datasetValidationWarnings.push(reader.int32()); + } else + message.datasetValidationWarnings.push(reader.int32()); + break; + } + case 3: { + message.validFeedbackLabelsCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QaQuestionDatasetValidationResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult} QaQuestionDatasetValidationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QaQuestionDatasetValidationResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QaQuestionDatasetValidationResult message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QaQuestionDatasetValidationResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.question != null && message.hasOwnProperty("question")) + if (!$util.isString(message.question)) + return "question: string expected"; + if (message.datasetValidationWarnings != null && message.hasOwnProperty("datasetValidationWarnings")) { + if (!Array.isArray(message.datasetValidationWarnings)) + return "datasetValidationWarnings: array expected"; + for (var i = 0; i < message.datasetValidationWarnings.length; ++i) + switch (message.datasetValidationWarnings[i]) { + default: + return "datasetValidationWarnings: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + } + if (message.validFeedbackLabelsCount != null && message.hasOwnProperty("validFeedbackLabelsCount")) + if (!$util.isInteger(message.validFeedbackLabelsCount)) + return "validFeedbackLabelsCount: integer expected"; + return null; + }; + + /** + * Creates a QaQuestionDatasetValidationResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult} QaQuestionDatasetValidationResult + */ + QaQuestionDatasetValidationResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult(); + if (object.question != null) + message.question = String(object.question); + if (object.datasetValidationWarnings) { + if (!Array.isArray(object.datasetValidationWarnings)) + throw TypeError(".google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult.datasetValidationWarnings: array expected"); + message.datasetValidationWarnings = []; + for (var i = 0; i < object.datasetValidationWarnings.length; ++i) + switch (object.datasetValidationWarnings[i]) { + default: + if (typeof object.datasetValidationWarnings[i] === "number") { + message.datasetValidationWarnings[i] = object.datasetValidationWarnings[i]; + break; + } + case "DATASET_VALIDATION_WARNING_UNSPECIFIED": + case 0: + message.datasetValidationWarnings[i] = 0; + break; + case "TOO_MANY_INVALID_FEEDBACK_LABELS": + case 1: + message.datasetValidationWarnings[i] = 1; + break; + case "INSUFFICIENT_FEEDBACK_LABELS": + case 2: + message.datasetValidationWarnings[i] = 2; + break; + case "INSUFFICIENT_FEEDBACK_LABELS_PER_ANSWER": + case 3: + message.datasetValidationWarnings[i] = 3; + break; + case "ALL_FEEDBACK_LABELS_HAVE_THE_SAME_ANSWER": + case 4: + message.datasetValidationWarnings[i] = 4; + break; + } + } + if (object.validFeedbackLabelsCount != null) + message.validFeedbackLabelsCount = object.validFeedbackLabelsCount | 0; + return message; + }; + + /** + * Creates a plain object from a QaQuestionDatasetValidationResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult + * @static + * @param {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult} message QaQuestionDatasetValidationResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QaQuestionDatasetValidationResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.datasetValidationWarnings = []; + if (options.defaults) { + object.question = ""; + object.validFeedbackLabelsCount = 0; + } + if (message.question != null && message.hasOwnProperty("question")) + object.question = message.question; + if (message.datasetValidationWarnings && message.datasetValidationWarnings.length) { + object.datasetValidationWarnings = []; + for (var j = 0; j < message.datasetValidationWarnings.length; ++j) + object.datasetValidationWarnings[j] = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.DatasetValidationWarning[message.datasetValidationWarnings[j]] === undefined ? message.datasetValidationWarnings[j] : $root.google.cloud.contactcenterinsights.v1.DatasetValidationWarning[message.datasetValidationWarnings[j]] : message.datasetValidationWarnings[j]; + } + if (message.validFeedbackLabelsCount != null && message.hasOwnProperty("validFeedbackLabelsCount")) + object.validFeedbackLabelsCount = message.validFeedbackLabelsCount; + return object; + }; + + /** + * Converts this QaQuestionDatasetValidationResult to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult + * @instance + * @returns {Object.} JSON object + */ + QaQuestionDatasetValidationResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QaQuestionDatasetValidationResult + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QaQuestionDatasetValidationResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetValidationResult"; + }; + + return QaQuestionDatasetValidationResult; + })(); + + TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics = (function() { + + /** + * Properties of a QaQuestionDatasetTuningMetrics. + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata + * @interface IQaQuestionDatasetTuningMetrics + * @property {string|null} [question] QaQuestionDatasetTuningMetrics question + * @property {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.IMetrics|null} [metrics] QaQuestionDatasetTuningMetrics metrics + */ + + /** + * Constructs a new QaQuestionDatasetTuningMetrics. + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata + * @classdesc Represents a QaQuestionDatasetTuningMetrics. + * @implements IQaQuestionDatasetTuningMetrics + * @constructor + * @param {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.IQaQuestionDatasetTuningMetrics=} [properties] Properties to set + */ + function QaQuestionDatasetTuningMetrics(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QaQuestionDatasetTuningMetrics question. + * @member {string} question + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics + * @instance + */ + QaQuestionDatasetTuningMetrics.prototype.question = ""; + + /** + * QaQuestionDatasetTuningMetrics metrics. + * @member {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.IMetrics|null|undefined} metrics + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics + * @instance + */ + QaQuestionDatasetTuningMetrics.prototype.metrics = null; + + /** + * Creates a new QaQuestionDatasetTuningMetrics instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics + * @static + * @param {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.IQaQuestionDatasetTuningMetrics=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics} QaQuestionDatasetTuningMetrics instance + */ + QaQuestionDatasetTuningMetrics.create = function create(properties) { + return new QaQuestionDatasetTuningMetrics(properties); + }; + + /** + * Encodes the specified QaQuestionDatasetTuningMetrics message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics + * @static + * @param {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.IQaQuestionDatasetTuningMetrics} message QaQuestionDatasetTuningMetrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QaQuestionDatasetTuningMetrics.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.question != null && Object.hasOwnProperty.call(message, "question")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.question); + if (message.metrics != null && Object.hasOwnProperty.call(message, "metrics")) + $root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.Metrics.encode(message.metrics, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QaQuestionDatasetTuningMetrics message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics + * @static + * @param {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.IQaQuestionDatasetTuningMetrics} message QaQuestionDatasetTuningMetrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QaQuestionDatasetTuningMetrics.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QaQuestionDatasetTuningMetrics message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics} QaQuestionDatasetTuningMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QaQuestionDatasetTuningMetrics.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.question = reader.string(); + break; + } + case 2: { + message.metrics = $root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.Metrics.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QaQuestionDatasetTuningMetrics message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics} QaQuestionDatasetTuningMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QaQuestionDatasetTuningMetrics.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QaQuestionDatasetTuningMetrics message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QaQuestionDatasetTuningMetrics.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.question != null && message.hasOwnProperty("question")) + if (!$util.isString(message.question)) + return "question: string expected"; + if (message.metrics != null && message.hasOwnProperty("metrics")) { + var error = $root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.Metrics.verify(message.metrics); + if (error) + return "metrics." + error; + } + return null; + }; + + /** + * Creates a QaQuestionDatasetTuningMetrics message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics} QaQuestionDatasetTuningMetrics + */ + QaQuestionDatasetTuningMetrics.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics(); + if (object.question != null) + message.question = String(object.question); + if (object.metrics != null) { + if (typeof object.metrics !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.metrics: object expected"); + message.metrics = $root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.Metrics.fromObject(object.metrics); + } + return message; + }; + + /** + * Creates a plain object from a QaQuestionDatasetTuningMetrics message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics + * @static + * @param {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics} message QaQuestionDatasetTuningMetrics + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QaQuestionDatasetTuningMetrics.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.question = ""; + object.metrics = null; + } + if (message.question != null && message.hasOwnProperty("question")) + object.question = message.question; + if (message.metrics != null && message.hasOwnProperty("metrics")) + object.metrics = $root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.Metrics.toObject(message.metrics, options); + return object; + }; + + /** + * Converts this QaQuestionDatasetTuningMetrics to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics + * @instance + * @returns {Object.} JSON object + */ + QaQuestionDatasetTuningMetrics.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QaQuestionDatasetTuningMetrics + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QaQuestionDatasetTuningMetrics.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics"; + }; + + QaQuestionDatasetTuningMetrics.Metrics = (function() { + + /** + * Properties of a Metrics. + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics + * @interface IMetrics + * @property {number|null} [accuracy] Metrics accuracy + */ + + /** + * Constructs a new Metrics. + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics + * @classdesc Represents a Metrics. + * @implements IMetrics + * @constructor + * @param {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.IMetrics=} [properties] Properties to set + */ + function Metrics(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Metrics accuracy. + * @member {number} accuracy + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.Metrics + * @instance + */ + Metrics.prototype.accuracy = 0; + + /** + * Creates a new Metrics instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.Metrics + * @static + * @param {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.IMetrics=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.Metrics} Metrics instance + */ + Metrics.create = function create(properties) { + return new Metrics(properties); + }; + + /** + * Encodes the specified Metrics message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.Metrics.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.Metrics + * @static + * @param {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.IMetrics} message Metrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metrics.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.accuracy != null && Object.hasOwnProperty.call(message, "accuracy")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.accuracy); + return writer; + }; + + /** + * Encodes the specified Metrics message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.Metrics.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.Metrics + * @static + * @param {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.IMetrics} message Metrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metrics.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Metrics message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.Metrics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.Metrics} Metrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metrics.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.Metrics(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.accuracy = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Metrics message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.Metrics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.Metrics} Metrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metrics.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Metrics message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.Metrics + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metrics.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.accuracy != null && message.hasOwnProperty("accuracy")) + if (typeof message.accuracy !== "number") + return "accuracy: number expected"; + return null; + }; + + /** + * Creates a Metrics message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.Metrics + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.Metrics} Metrics + */ + Metrics.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.Metrics) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.Metrics(); + if (object.accuracy != null) + message.accuracy = Number(object.accuracy); + return message; + }; + + /** + * Creates a plain object from a Metrics message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.Metrics + * @static + * @param {google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.Metrics} message Metrics + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metrics.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.accuracy = 0; + if (message.accuracy != null && message.hasOwnProperty("accuracy")) + object.accuracy = options.json && !isFinite(message.accuracy) ? String(message.accuracy) : message.accuracy; + return object; + }; + + /** + * Converts this Metrics to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.Metrics + * @instance + * @returns {Object.} JSON object + */ + Metrics.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Metrics + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.Metrics + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Metrics.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata.QaQuestionDatasetTuningMetrics.Metrics"; + }; + + return Metrics; + })(); + + return QaQuestionDatasetTuningMetrics; + })(); + + return TuneQaScorecardRevisionMetadata; + })(); + + v1.DeployQaScorecardRevisionRequest = (function() { + + /** + * Properties of a DeployQaScorecardRevisionRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IDeployQaScorecardRevisionRequest + * @property {string|null} [name] DeployQaScorecardRevisionRequest name + */ + + /** + * Constructs a new DeployQaScorecardRevisionRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a DeployQaScorecardRevisionRequest. + * @implements IDeployQaScorecardRevisionRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IDeployQaScorecardRevisionRequest=} [properties] Properties to set + */ + function DeployQaScorecardRevisionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeployQaScorecardRevisionRequest name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest + * @instance + */ + DeployQaScorecardRevisionRequest.prototype.name = ""; + + /** + * Creates a new DeployQaScorecardRevisionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeployQaScorecardRevisionRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest} DeployQaScorecardRevisionRequest instance + */ + DeployQaScorecardRevisionRequest.create = function create(properties) { + return new DeployQaScorecardRevisionRequest(properties); + }; + + /** + * Encodes the specified DeployQaScorecardRevisionRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeployQaScorecardRevisionRequest} message DeployQaScorecardRevisionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeployQaScorecardRevisionRequest.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 DeployQaScorecardRevisionRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeployQaScorecardRevisionRequest} message DeployQaScorecardRevisionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeployQaScorecardRevisionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeployQaScorecardRevisionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest} DeployQaScorecardRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeployQaScorecardRevisionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest(); + 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 DeployQaScorecardRevisionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest} DeployQaScorecardRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeployQaScorecardRevisionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeployQaScorecardRevisionRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeployQaScorecardRevisionRequest.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 DeployQaScorecardRevisionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest} DeployQaScorecardRevisionRequest + */ + DeployQaScorecardRevisionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeployQaScorecardRevisionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest} message DeployQaScorecardRevisionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeployQaScorecardRevisionRequest.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 DeployQaScorecardRevisionRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest + * @instance + * @returns {Object.} JSON object + */ + DeployQaScorecardRevisionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeployQaScorecardRevisionRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeployQaScorecardRevisionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest"; + }; + + return DeployQaScorecardRevisionRequest; + })(); + + v1.UndeployQaScorecardRevisionRequest = (function() { + + /** + * Properties of an UndeployQaScorecardRevisionRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IUndeployQaScorecardRevisionRequest + * @property {string|null} [name] UndeployQaScorecardRevisionRequest name + */ + + /** + * Constructs a new UndeployQaScorecardRevisionRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an UndeployQaScorecardRevisionRequest. + * @implements IUndeployQaScorecardRevisionRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IUndeployQaScorecardRevisionRequest=} [properties] Properties to set + */ + function UndeployQaScorecardRevisionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UndeployQaScorecardRevisionRequest name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest + * @instance + */ + UndeployQaScorecardRevisionRequest.prototype.name = ""; + + /** + * Creates a new UndeployQaScorecardRevisionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUndeployQaScorecardRevisionRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest} UndeployQaScorecardRevisionRequest instance + */ + UndeployQaScorecardRevisionRequest.create = function create(properties) { + return new UndeployQaScorecardRevisionRequest(properties); + }; + + /** + * Encodes the specified UndeployQaScorecardRevisionRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUndeployQaScorecardRevisionRequest} message UndeployQaScorecardRevisionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UndeployQaScorecardRevisionRequest.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 UndeployQaScorecardRevisionRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUndeployQaScorecardRevisionRequest} message UndeployQaScorecardRevisionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UndeployQaScorecardRevisionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UndeployQaScorecardRevisionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest} UndeployQaScorecardRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UndeployQaScorecardRevisionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest(); + 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 an UndeployQaScorecardRevisionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest} UndeployQaScorecardRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UndeployQaScorecardRevisionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UndeployQaScorecardRevisionRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UndeployQaScorecardRevisionRequest.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 an UndeployQaScorecardRevisionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest} UndeployQaScorecardRevisionRequest + */ + UndeployQaScorecardRevisionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from an UndeployQaScorecardRevisionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest} message UndeployQaScorecardRevisionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UndeployQaScorecardRevisionRequest.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 UndeployQaScorecardRevisionRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest + * @instance + * @returns {Object.} JSON object + */ + UndeployQaScorecardRevisionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UndeployQaScorecardRevisionRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UndeployQaScorecardRevisionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest"; + }; + + return UndeployQaScorecardRevisionRequest; + })(); + + v1.DeleteQaScorecardRevisionRequest = (function() { + + /** + * Properties of a DeleteQaScorecardRevisionRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IDeleteQaScorecardRevisionRequest + * @property {string|null} [name] DeleteQaScorecardRevisionRequest name + * @property {boolean|null} [force] DeleteQaScorecardRevisionRequest force + */ + + /** + * Constructs a new DeleteQaScorecardRevisionRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a DeleteQaScorecardRevisionRequest. + * @implements IDeleteQaScorecardRevisionRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRevisionRequest=} [properties] Properties to set + */ + function DeleteQaScorecardRevisionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteQaScorecardRevisionRequest name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest + * @instance + */ + DeleteQaScorecardRevisionRequest.prototype.name = ""; + + /** + * DeleteQaScorecardRevisionRequest force. + * @member {boolean} force + * @memberof google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest + * @instance + */ + DeleteQaScorecardRevisionRequest.prototype.force = false; + + /** + * Creates a new DeleteQaScorecardRevisionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRevisionRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest} DeleteQaScorecardRevisionRequest instance + */ + DeleteQaScorecardRevisionRequest.create = function create(properties) { + return new DeleteQaScorecardRevisionRequest(properties); + }; + + /** + * Encodes the specified DeleteQaScorecardRevisionRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRevisionRequest} message DeleteQaScorecardRevisionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteQaScorecardRevisionRequest.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 DeleteQaScorecardRevisionRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRevisionRequest} message DeleteQaScorecardRevisionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteQaScorecardRevisionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteQaScorecardRevisionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest} DeleteQaScorecardRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteQaScorecardRevisionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest(); + 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 DeleteQaScorecardRevisionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest} DeleteQaScorecardRevisionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteQaScorecardRevisionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteQaScorecardRevisionRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteQaScorecardRevisionRequest.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 DeleteQaScorecardRevisionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest} DeleteQaScorecardRevisionRequest + */ + DeleteQaScorecardRevisionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest(); + 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 DeleteQaScorecardRevisionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest} message DeleteQaScorecardRevisionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteQaScorecardRevisionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.force = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + return object; + }; + + /** + * Converts this DeleteQaScorecardRevisionRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteQaScorecardRevisionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteQaScorecardRevisionRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteQaScorecardRevisionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest"; + }; + + return DeleteQaScorecardRevisionRequest; + })(); + + v1.ListQaScorecardsRequest = (function() { + + /** + * Properties of a ListQaScorecardsRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IListQaScorecardsRequest + * @property {string|null} [parent] ListQaScorecardsRequest parent + * @property {number|null} [pageSize] ListQaScorecardsRequest pageSize + * @property {string|null} [pageToken] ListQaScorecardsRequest pageToken + */ + + /** + * Constructs a new ListQaScorecardsRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ListQaScorecardsRequest. + * @implements IListQaScorecardsRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IListQaScorecardsRequest=} [properties] Properties to set + */ + function ListQaScorecardsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListQaScorecardsRequest parent. + * @member {string} parent + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest + * @instance + */ + ListQaScorecardsRequest.prototype.parent = ""; + + /** + * ListQaScorecardsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest + * @instance + */ + ListQaScorecardsRequest.prototype.pageSize = 0; + + /** + * ListQaScorecardsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest + * @instance + */ + ListQaScorecardsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListQaScorecardsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListQaScorecardsRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest} ListQaScorecardsRequest instance + */ + ListQaScorecardsRequest.create = function create(properties) { + return new ListQaScorecardsRequest(properties); + }; + + /** + * Encodes the specified ListQaScorecardsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListQaScorecardsRequest} message ListQaScorecardsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListQaScorecardsRequest.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 ListQaScorecardsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListQaScorecardsRequest} message ListQaScorecardsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListQaScorecardsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListQaScorecardsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest} ListQaScorecardsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListQaScorecardsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest(); + 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 ListQaScorecardsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest} ListQaScorecardsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListQaScorecardsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListQaScorecardsRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListQaScorecardsRequest.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 ListQaScorecardsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest} ListQaScorecardsRequest + */ + ListQaScorecardsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest(); + 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 ListQaScorecardsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest} message ListQaScorecardsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListQaScorecardsRequest.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 ListQaScorecardsRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest + * @instance + * @returns {Object.} JSON object + */ + ListQaScorecardsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListQaScorecardsRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListQaScorecardsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest"; + }; + + return ListQaScorecardsRequest; + })(); + + v1.ListQaScorecardsResponse = (function() { + + /** + * Properties of a ListQaScorecardsResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IListQaScorecardsResponse + * @property {Array.|null} [qaScorecards] ListQaScorecardsResponse qaScorecards + * @property {string|null} [nextPageToken] ListQaScorecardsResponse nextPageToken + */ + + /** + * Constructs a new ListQaScorecardsResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ListQaScorecardsResponse. + * @implements IListQaScorecardsResponse + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IListQaScorecardsResponse=} [properties] Properties to set + */ + function ListQaScorecardsResponse(properties) { + this.qaScorecards = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListQaScorecardsResponse qaScorecards. + * @member {Array.} qaScorecards + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardsResponse + * @instance + */ + ListQaScorecardsResponse.prototype.qaScorecards = $util.emptyArray; + + /** + * ListQaScorecardsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardsResponse + * @instance + */ + ListQaScorecardsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListQaScorecardsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListQaScorecardsResponse=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ListQaScorecardsResponse} ListQaScorecardsResponse instance + */ + ListQaScorecardsResponse.create = function create(properties) { + return new ListQaScorecardsResponse(properties); + }; + + /** + * Encodes the specified ListQaScorecardsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListQaScorecardsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListQaScorecardsResponse} message ListQaScorecardsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListQaScorecardsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.qaScorecards != null && message.qaScorecards.length) + for (var i = 0; i < message.qaScorecards.length; ++i) + $root.google.cloud.contactcenterinsights.v1.QaScorecard.encode(message.qaScorecards[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 ListQaScorecardsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListQaScorecardsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListQaScorecardsResponse} message ListQaScorecardsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListQaScorecardsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListQaScorecardsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ListQaScorecardsResponse} ListQaScorecardsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListQaScorecardsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListQaScorecardsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.qaScorecards && message.qaScorecards.length)) + message.qaScorecards = []; + message.qaScorecards.push($root.google.cloud.contactcenterinsights.v1.QaScorecard.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListQaScorecardsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ListQaScorecardsResponse} ListQaScorecardsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListQaScorecardsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListQaScorecardsResponse message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListQaScorecardsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.qaScorecards != null && message.hasOwnProperty("qaScorecards")) { + if (!Array.isArray(message.qaScorecards)) + return "qaScorecards: array expected"; + for (var i = 0; i < message.qaScorecards.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.QaScorecard.verify(message.qaScorecards[i]); + if (error) + return "qaScorecards." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListQaScorecardsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ListQaScorecardsResponse} ListQaScorecardsResponse + */ + ListQaScorecardsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListQaScorecardsResponse) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ListQaScorecardsResponse(); + if (object.qaScorecards) { + if (!Array.isArray(object.qaScorecards)) + throw TypeError(".google.cloud.contactcenterinsights.v1.ListQaScorecardsResponse.qaScorecards: array expected"); + message.qaScorecards = []; + for (var i = 0; i < object.qaScorecards.length; ++i) { + if (typeof object.qaScorecards[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ListQaScorecardsResponse.qaScorecards: object expected"); + message.qaScorecards[i] = $root.google.cloud.contactcenterinsights.v1.QaScorecard.fromObject(object.qaScorecards[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListQaScorecardsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.ListQaScorecardsResponse} message ListQaScorecardsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListQaScorecardsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.qaScorecards = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.qaScorecards && message.qaScorecards.length) { + object.qaScorecards = []; + for (var j = 0; j < message.qaScorecards.length; ++j) + object.qaScorecards[j] = $root.google.cloud.contactcenterinsights.v1.QaScorecard.toObject(message.qaScorecards[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListQaScorecardsResponse to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardsResponse + * @instance + * @returns {Object.} JSON object + */ + ListQaScorecardsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListQaScorecardsResponse + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListQaScorecardsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListQaScorecardsResponse"; + }; + + return ListQaScorecardsResponse; + })(); + + v1.ListQaScorecardRevisionsRequest = (function() { + + /** + * Properties of a ListQaScorecardRevisionsRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IListQaScorecardRevisionsRequest + * @property {string|null} [parent] ListQaScorecardRevisionsRequest parent + * @property {number|null} [pageSize] ListQaScorecardRevisionsRequest pageSize + * @property {string|null} [pageToken] ListQaScorecardRevisionsRequest pageToken + * @property {string|null} [filter] ListQaScorecardRevisionsRequest filter + */ + + /** + * Constructs a new ListQaScorecardRevisionsRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ListQaScorecardRevisionsRequest. + * @implements IListQaScorecardRevisionsRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsRequest=} [properties] Properties to set + */ + function ListQaScorecardRevisionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListQaScorecardRevisionsRequest parent. + * @member {string} parent + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest + * @instance + */ + ListQaScorecardRevisionsRequest.prototype.parent = ""; + + /** + * ListQaScorecardRevisionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest + * @instance + */ + ListQaScorecardRevisionsRequest.prototype.pageSize = 0; + + /** + * ListQaScorecardRevisionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest + * @instance + */ + ListQaScorecardRevisionsRequest.prototype.pageToken = ""; + + /** + * ListQaScorecardRevisionsRequest filter. + * @member {string} filter + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest + * @instance + */ + ListQaScorecardRevisionsRequest.prototype.filter = ""; + + /** + * Creates a new ListQaScorecardRevisionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest} ListQaScorecardRevisionsRequest instance + */ + ListQaScorecardRevisionsRequest.create = function create(properties) { + return new ListQaScorecardRevisionsRequest(properties); + }; + + /** + * Encodes the specified ListQaScorecardRevisionsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsRequest} message ListQaScorecardRevisionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListQaScorecardRevisionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListQaScorecardRevisionsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsRequest} message ListQaScorecardRevisionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListQaScorecardRevisionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListQaScorecardRevisionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest} ListQaScorecardRevisionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListQaScorecardRevisionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest(); + 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; + } + case 4: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListQaScorecardRevisionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest} ListQaScorecardRevisionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListQaScorecardRevisionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListQaScorecardRevisionsRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListQaScorecardRevisionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListQaScorecardRevisionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest} ListQaScorecardRevisionsRequest + */ + ListQaScorecardRevisionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListQaScorecardRevisionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest} message ListQaScorecardRevisionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListQaScorecardRevisionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListQaScorecardRevisionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListQaScorecardRevisionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListQaScorecardRevisionsRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListQaScorecardRevisionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest"; + }; + + return ListQaScorecardRevisionsRequest; + })(); + + v1.ListQaScorecardRevisionsResponse = (function() { + + /** + * Properties of a ListQaScorecardRevisionsResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IListQaScorecardRevisionsResponse + * @property {Array.|null} [qaScorecardRevisions] ListQaScorecardRevisionsResponse qaScorecardRevisions + * @property {string|null} [nextPageToken] ListQaScorecardRevisionsResponse nextPageToken + */ + + /** + * Constructs a new ListQaScorecardRevisionsResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ListQaScorecardRevisionsResponse. + * @implements IListQaScorecardRevisionsResponse + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsResponse=} [properties] Properties to set + */ + function ListQaScorecardRevisionsResponse(properties) { + this.qaScorecardRevisions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListQaScorecardRevisionsResponse qaScorecardRevisions. + * @member {Array.} qaScorecardRevisions + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsResponse + * @instance + */ + ListQaScorecardRevisionsResponse.prototype.qaScorecardRevisions = $util.emptyArray; + + /** + * ListQaScorecardRevisionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsResponse + * @instance + */ + ListQaScorecardRevisionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListQaScorecardRevisionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsResponse=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsResponse} ListQaScorecardRevisionsResponse instance + */ + ListQaScorecardRevisionsResponse.create = function create(properties) { + return new ListQaScorecardRevisionsResponse(properties); + }; + + /** + * Encodes the specified ListQaScorecardRevisionsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsResponse} message ListQaScorecardRevisionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListQaScorecardRevisionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.qaScorecardRevisions != null && message.qaScorecardRevisions.length) + for (var i = 0; i < message.qaScorecardRevisions.length; ++i) + $root.google.cloud.contactcenterinsights.v1.QaScorecardRevision.encode(message.qaScorecardRevisions[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 ListQaScorecardRevisionsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsResponse} message ListQaScorecardRevisionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListQaScorecardRevisionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListQaScorecardRevisionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsResponse} ListQaScorecardRevisionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListQaScorecardRevisionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.qaScorecardRevisions && message.qaScorecardRevisions.length)) + message.qaScorecardRevisions = []; + message.qaScorecardRevisions.push($root.google.cloud.contactcenterinsights.v1.QaScorecardRevision.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListQaScorecardRevisionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsResponse} ListQaScorecardRevisionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListQaScorecardRevisionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListQaScorecardRevisionsResponse message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListQaScorecardRevisionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.qaScorecardRevisions != null && message.hasOwnProperty("qaScorecardRevisions")) { + if (!Array.isArray(message.qaScorecardRevisions)) + return "qaScorecardRevisions: array expected"; + for (var i = 0; i < message.qaScorecardRevisions.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.QaScorecardRevision.verify(message.qaScorecardRevisions[i]); + if (error) + return "qaScorecardRevisions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListQaScorecardRevisionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsResponse} ListQaScorecardRevisionsResponse + */ + ListQaScorecardRevisionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsResponse) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsResponse(); + if (object.qaScorecardRevisions) { + if (!Array.isArray(object.qaScorecardRevisions)) + throw TypeError(".google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsResponse.qaScorecardRevisions: array expected"); + message.qaScorecardRevisions = []; + for (var i = 0; i < object.qaScorecardRevisions.length; ++i) { + if (typeof object.qaScorecardRevisions[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsResponse.qaScorecardRevisions: object expected"); + message.qaScorecardRevisions[i] = $root.google.cloud.contactcenterinsights.v1.QaScorecardRevision.fromObject(object.qaScorecardRevisions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListQaScorecardRevisionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsResponse} message ListQaScorecardRevisionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListQaScorecardRevisionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.qaScorecardRevisions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.qaScorecardRevisions && message.qaScorecardRevisions.length) { + object.qaScorecardRevisions = []; + for (var j = 0; j < message.qaScorecardRevisions.length; ++j) + object.qaScorecardRevisions[j] = $root.google.cloud.contactcenterinsights.v1.QaScorecardRevision.toObject(message.qaScorecardRevisions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListQaScorecardRevisionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListQaScorecardRevisionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListQaScorecardRevisionsResponse + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListQaScorecardRevisionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsResponse"; + }; + + return ListQaScorecardRevisionsResponse; + })(); + + v1.CreateFeedbackLabelRequest = (function() { + + /** + * Properties of a CreateFeedbackLabelRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface ICreateFeedbackLabelRequest + * @property {string|null} [parent] CreateFeedbackLabelRequest parent + * @property {string|null} [feedbackLabelId] CreateFeedbackLabelRequest feedbackLabelId + * @property {google.cloud.contactcenterinsights.v1.IFeedbackLabel|null} [feedbackLabel] CreateFeedbackLabelRequest feedbackLabel + */ + + /** + * Constructs a new CreateFeedbackLabelRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a CreateFeedbackLabelRequest. + * @implements ICreateFeedbackLabelRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.ICreateFeedbackLabelRequest=} [properties] Properties to set + */ + function CreateFeedbackLabelRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateFeedbackLabelRequest parent. + * @member {string} parent + * @memberof google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest + * @instance + */ + CreateFeedbackLabelRequest.prototype.parent = ""; + + /** + * CreateFeedbackLabelRequest feedbackLabelId. + * @member {string} feedbackLabelId + * @memberof google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest + * @instance + */ + CreateFeedbackLabelRequest.prototype.feedbackLabelId = ""; + + /** + * CreateFeedbackLabelRequest feedbackLabel. + * @member {google.cloud.contactcenterinsights.v1.IFeedbackLabel|null|undefined} feedbackLabel + * @memberof google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest + * @instance + */ + CreateFeedbackLabelRequest.prototype.feedbackLabel = null; + + /** + * Creates a new CreateFeedbackLabelRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreateFeedbackLabelRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest} CreateFeedbackLabelRequest instance + */ + CreateFeedbackLabelRequest.create = function create(properties) { + return new CreateFeedbackLabelRequest(properties); + }; + + /** + * Encodes the specified CreateFeedbackLabelRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreateFeedbackLabelRequest} message CreateFeedbackLabelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateFeedbackLabelRequest.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.feedbackLabelId != null && Object.hasOwnProperty.call(message, "feedbackLabelId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.feedbackLabelId); + if (message.feedbackLabel != null && Object.hasOwnProperty.call(message, "feedbackLabel")) + $root.google.cloud.contactcenterinsights.v1.FeedbackLabel.encode(message.feedbackLabel, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateFeedbackLabelRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreateFeedbackLabelRequest} message CreateFeedbackLabelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateFeedbackLabelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateFeedbackLabelRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest} CreateFeedbackLabelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateFeedbackLabelRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.feedbackLabelId = reader.string(); + break; + } + case 3: { + message.feedbackLabel = $root.google.cloud.contactcenterinsights.v1.FeedbackLabel.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateFeedbackLabelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest} CreateFeedbackLabelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateFeedbackLabelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateFeedbackLabelRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateFeedbackLabelRequest.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.feedbackLabelId != null && message.hasOwnProperty("feedbackLabelId")) + if (!$util.isString(message.feedbackLabelId)) + return "feedbackLabelId: string expected"; + if (message.feedbackLabel != null && message.hasOwnProperty("feedbackLabel")) { + var error = $root.google.cloud.contactcenterinsights.v1.FeedbackLabel.verify(message.feedbackLabel); + if (error) + return "feedbackLabel." + error; + } + return null; + }; + + /** + * Creates a CreateFeedbackLabelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest} CreateFeedbackLabelRequest + */ + CreateFeedbackLabelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.feedbackLabelId != null) + message.feedbackLabelId = String(object.feedbackLabelId); + if (object.feedbackLabel != null) { + if (typeof object.feedbackLabel !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest.feedbackLabel: object expected"); + message.feedbackLabel = $root.google.cloud.contactcenterinsights.v1.FeedbackLabel.fromObject(object.feedbackLabel); + } + return message; + }; + + /** + * Creates a plain object from a CreateFeedbackLabelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest} message CreateFeedbackLabelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateFeedbackLabelRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.feedbackLabelId = ""; + object.feedbackLabel = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.feedbackLabelId != null && message.hasOwnProperty("feedbackLabelId")) + object.feedbackLabelId = message.feedbackLabelId; + if (message.feedbackLabel != null && message.hasOwnProperty("feedbackLabel")) + object.feedbackLabel = $root.google.cloud.contactcenterinsights.v1.FeedbackLabel.toObject(message.feedbackLabel, options); + return object; + }; + + /** + * Converts this CreateFeedbackLabelRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest + * @instance + * @returns {Object.} JSON object + */ + CreateFeedbackLabelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateFeedbackLabelRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateFeedbackLabelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest"; + }; + + return CreateFeedbackLabelRequest; + })(); + + v1.ListFeedbackLabelsRequest = (function() { + + /** + * Properties of a ListFeedbackLabelsRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IListFeedbackLabelsRequest + * @property {string|null} [parent] ListFeedbackLabelsRequest parent + * @property {string|null} [filter] ListFeedbackLabelsRequest filter + * @property {number|null} [pageSize] ListFeedbackLabelsRequest pageSize + * @property {string|null} [pageToken] ListFeedbackLabelsRequest pageToken + */ + + /** + * Constructs a new ListFeedbackLabelsRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ListFeedbackLabelsRequest. + * @implements IListFeedbackLabelsRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IListFeedbackLabelsRequest=} [properties] Properties to set + */ + function ListFeedbackLabelsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListFeedbackLabelsRequest parent. + * @member {string} parent + * @memberof google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest + * @instance + */ + ListFeedbackLabelsRequest.prototype.parent = ""; + + /** + * ListFeedbackLabelsRequest filter. + * @member {string} filter + * @memberof google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest + * @instance + */ + ListFeedbackLabelsRequest.prototype.filter = ""; + + /** + * ListFeedbackLabelsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest + * @instance + */ + ListFeedbackLabelsRequest.prototype.pageSize = 0; + + /** + * ListFeedbackLabelsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest + * @instance + */ + ListFeedbackLabelsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListFeedbackLabelsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListFeedbackLabelsRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest} ListFeedbackLabelsRequest instance + */ + ListFeedbackLabelsRequest.create = function create(properties) { + return new ListFeedbackLabelsRequest(properties); + }; + + /** + * Encodes the specified ListFeedbackLabelsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListFeedbackLabelsRequest} message ListFeedbackLabelsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFeedbackLabelsRequest.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 ListFeedbackLabelsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListFeedbackLabelsRequest} message ListFeedbackLabelsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFeedbackLabelsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListFeedbackLabelsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest} ListFeedbackLabelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFeedbackLabelsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest(); + 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; + }; + + /** + * Decodes a ListFeedbackLabelsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest} ListFeedbackLabelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFeedbackLabelsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListFeedbackLabelsRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListFeedbackLabelsRequest.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; + }; + + /** + * Creates a ListFeedbackLabelsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest} ListFeedbackLabelsRequest + */ + ListFeedbackLabelsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListFeedbackLabelsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest} message ListFeedbackLabelsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListFeedbackLabelsRequest.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; + }; + + /** + * Converts this ListFeedbackLabelsRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest + * @instance + * @returns {Object.} JSON object + */ + ListFeedbackLabelsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListFeedbackLabelsRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListFeedbackLabelsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest"; + }; + + return ListFeedbackLabelsRequest; + })(); + + v1.ListFeedbackLabelsResponse = (function() { + + /** + * Properties of a ListFeedbackLabelsResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IListFeedbackLabelsResponse + * @property {Array.|null} [feedbackLabels] ListFeedbackLabelsResponse feedbackLabels + * @property {string|null} [nextPageToken] ListFeedbackLabelsResponse nextPageToken + */ + + /** + * Constructs a new ListFeedbackLabelsResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ListFeedbackLabelsResponse. + * @implements IListFeedbackLabelsResponse + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IListFeedbackLabelsResponse=} [properties] Properties to set + */ + function ListFeedbackLabelsResponse(properties) { + this.feedbackLabels = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListFeedbackLabelsResponse feedbackLabels. + * @member {Array.} feedbackLabels + * @memberof google.cloud.contactcenterinsights.v1.ListFeedbackLabelsResponse + * @instance + */ + ListFeedbackLabelsResponse.prototype.feedbackLabels = $util.emptyArray; + + /** + * ListFeedbackLabelsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.contactcenterinsights.v1.ListFeedbackLabelsResponse + * @instance + */ + ListFeedbackLabelsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListFeedbackLabelsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ListFeedbackLabelsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListFeedbackLabelsResponse=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ListFeedbackLabelsResponse} ListFeedbackLabelsResponse instance + */ + ListFeedbackLabelsResponse.create = function create(properties) { + return new ListFeedbackLabelsResponse(properties); + }; + + /** + * Encodes the specified ListFeedbackLabelsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListFeedbackLabelsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ListFeedbackLabelsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListFeedbackLabelsResponse} message ListFeedbackLabelsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFeedbackLabelsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.feedbackLabels != null && message.feedbackLabels.length) + for (var i = 0; i < message.feedbackLabels.length; ++i) + $root.google.cloud.contactcenterinsights.v1.FeedbackLabel.encode(message.feedbackLabels[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 ListFeedbackLabelsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListFeedbackLabelsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListFeedbackLabelsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListFeedbackLabelsResponse} message ListFeedbackLabelsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFeedbackLabelsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListFeedbackLabelsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ListFeedbackLabelsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ListFeedbackLabelsResponse} ListFeedbackLabelsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFeedbackLabelsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListFeedbackLabelsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.feedbackLabels && message.feedbackLabels.length)) + message.feedbackLabels = []; + message.feedbackLabels.push($root.google.cloud.contactcenterinsights.v1.FeedbackLabel.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListFeedbackLabelsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListFeedbackLabelsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ListFeedbackLabelsResponse} ListFeedbackLabelsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFeedbackLabelsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListFeedbackLabelsResponse message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ListFeedbackLabelsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListFeedbackLabelsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.feedbackLabels != null && message.hasOwnProperty("feedbackLabels")) { + if (!Array.isArray(message.feedbackLabels)) + return "feedbackLabels: array expected"; + for (var i = 0; i < message.feedbackLabels.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.FeedbackLabel.verify(message.feedbackLabels[i]); + if (error) + return "feedbackLabels." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListFeedbackLabelsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ListFeedbackLabelsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ListFeedbackLabelsResponse} ListFeedbackLabelsResponse + */ + ListFeedbackLabelsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListFeedbackLabelsResponse) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ListFeedbackLabelsResponse(); + if (object.feedbackLabels) { + if (!Array.isArray(object.feedbackLabels)) + throw TypeError(".google.cloud.contactcenterinsights.v1.ListFeedbackLabelsResponse.feedbackLabels: array expected"); + message.feedbackLabels = []; + for (var i = 0; i < object.feedbackLabels.length; ++i) { + if (typeof object.feedbackLabels[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ListFeedbackLabelsResponse.feedbackLabels: object expected"); + message.feedbackLabels[i] = $root.google.cloud.contactcenterinsights.v1.FeedbackLabel.fromObject(object.feedbackLabels[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListFeedbackLabelsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ListFeedbackLabelsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.ListFeedbackLabelsResponse} message ListFeedbackLabelsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListFeedbackLabelsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.feedbackLabels = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.feedbackLabels && message.feedbackLabels.length) { + object.feedbackLabels = []; + for (var j = 0; j < message.feedbackLabels.length; ++j) + object.feedbackLabels[j] = $root.google.cloud.contactcenterinsights.v1.FeedbackLabel.toObject(message.feedbackLabels[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListFeedbackLabelsResponse to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ListFeedbackLabelsResponse + * @instance + * @returns {Object.} JSON object + */ + ListFeedbackLabelsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListFeedbackLabelsResponse + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ListFeedbackLabelsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListFeedbackLabelsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListFeedbackLabelsResponse"; + }; + + return ListFeedbackLabelsResponse; + })(); + + v1.GetFeedbackLabelRequest = (function() { + + /** + * Properties of a GetFeedbackLabelRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IGetFeedbackLabelRequest + * @property {string|null} [name] GetFeedbackLabelRequest name + */ + + /** + * Constructs a new GetFeedbackLabelRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a GetFeedbackLabelRequest. + * @implements IGetFeedbackLabelRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IGetFeedbackLabelRequest=} [properties] Properties to set + */ + function GetFeedbackLabelRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetFeedbackLabelRequest name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest + * @instance + */ + GetFeedbackLabelRequest.prototype.name = ""; + + /** + * Creates a new GetFeedbackLabelRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetFeedbackLabelRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest} GetFeedbackLabelRequest instance + */ + GetFeedbackLabelRequest.create = function create(properties) { + return new GetFeedbackLabelRequest(properties); + }; + + /** + * Encodes the specified GetFeedbackLabelRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetFeedbackLabelRequest} message GetFeedbackLabelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetFeedbackLabelRequest.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 GetFeedbackLabelRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetFeedbackLabelRequest} message GetFeedbackLabelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetFeedbackLabelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetFeedbackLabelRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest} GetFeedbackLabelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetFeedbackLabelRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest(); + 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 GetFeedbackLabelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest} GetFeedbackLabelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetFeedbackLabelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetFeedbackLabelRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetFeedbackLabelRequest.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 GetFeedbackLabelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest} GetFeedbackLabelRequest + */ + GetFeedbackLabelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetFeedbackLabelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest} message GetFeedbackLabelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetFeedbackLabelRequest.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 GetFeedbackLabelRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest + * @instance + * @returns {Object.} JSON object + */ + GetFeedbackLabelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetFeedbackLabelRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetFeedbackLabelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest"; + }; + + return GetFeedbackLabelRequest; + })(); + + v1.UpdateFeedbackLabelRequest = (function() { + + /** + * Properties of an UpdateFeedbackLabelRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IUpdateFeedbackLabelRequest + * @property {google.cloud.contactcenterinsights.v1.IFeedbackLabel|null} [feedbackLabel] UpdateFeedbackLabelRequest feedbackLabel + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateFeedbackLabelRequest updateMask + */ + + /** + * Constructs a new UpdateFeedbackLabelRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an UpdateFeedbackLabelRequest. + * @implements IUpdateFeedbackLabelRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IUpdateFeedbackLabelRequest=} [properties] Properties to set + */ + function UpdateFeedbackLabelRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateFeedbackLabelRequest feedbackLabel. + * @member {google.cloud.contactcenterinsights.v1.IFeedbackLabel|null|undefined} feedbackLabel + * @memberof google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest + * @instance + */ + UpdateFeedbackLabelRequest.prototype.feedbackLabel = null; + + /** + * UpdateFeedbackLabelRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest + * @instance + */ + UpdateFeedbackLabelRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateFeedbackLabelRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUpdateFeedbackLabelRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest} UpdateFeedbackLabelRequest instance + */ + UpdateFeedbackLabelRequest.create = function create(properties) { + return new UpdateFeedbackLabelRequest(properties); + }; + + /** + * Encodes the specified UpdateFeedbackLabelRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUpdateFeedbackLabelRequest} message UpdateFeedbackLabelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateFeedbackLabelRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.feedbackLabel != null && Object.hasOwnProperty.call(message, "feedbackLabel")) + $root.google.cloud.contactcenterinsights.v1.FeedbackLabel.encode(message.feedbackLabel, 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 UpdateFeedbackLabelRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUpdateFeedbackLabelRequest} message UpdateFeedbackLabelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateFeedbackLabelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateFeedbackLabelRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest} UpdateFeedbackLabelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateFeedbackLabelRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.feedbackLabel = $root.google.cloud.contactcenterinsights.v1.FeedbackLabel.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 UpdateFeedbackLabelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest} UpdateFeedbackLabelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateFeedbackLabelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateFeedbackLabelRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateFeedbackLabelRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.feedbackLabel != null && message.hasOwnProperty("feedbackLabel")) { + var error = $root.google.cloud.contactcenterinsights.v1.FeedbackLabel.verify(message.feedbackLabel); + if (error) + return "feedbackLabel." + 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 UpdateFeedbackLabelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest} UpdateFeedbackLabelRequest + */ + UpdateFeedbackLabelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest(); + if (object.feedbackLabel != null) { + if (typeof object.feedbackLabel !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest.feedbackLabel: object expected"); + message.feedbackLabel = $root.google.cloud.contactcenterinsights.v1.FeedbackLabel.fromObject(object.feedbackLabel); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateFeedbackLabelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest} message UpdateFeedbackLabelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateFeedbackLabelRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.feedbackLabel = null; + object.updateMask = null; + } + if (message.feedbackLabel != null && message.hasOwnProperty("feedbackLabel")) + object.feedbackLabel = $root.google.cloud.contactcenterinsights.v1.FeedbackLabel.toObject(message.feedbackLabel, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateFeedbackLabelRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateFeedbackLabelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateFeedbackLabelRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateFeedbackLabelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest"; + }; + + return UpdateFeedbackLabelRequest; + })(); + + v1.DeleteFeedbackLabelRequest = (function() { + + /** + * Properties of a DeleteFeedbackLabelRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IDeleteFeedbackLabelRequest + * @property {string|null} [name] DeleteFeedbackLabelRequest name + */ + + /** + * Constructs a new DeleteFeedbackLabelRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a DeleteFeedbackLabelRequest. + * @implements IDeleteFeedbackLabelRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IDeleteFeedbackLabelRequest=} [properties] Properties to set + */ + function DeleteFeedbackLabelRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteFeedbackLabelRequest name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest + * @instance + */ + DeleteFeedbackLabelRequest.prototype.name = ""; + + /** + * Creates a new DeleteFeedbackLabelRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeleteFeedbackLabelRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest} DeleteFeedbackLabelRequest instance + */ + DeleteFeedbackLabelRequest.create = function create(properties) { + return new DeleteFeedbackLabelRequest(properties); + }; + + /** + * Encodes the specified DeleteFeedbackLabelRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeleteFeedbackLabelRequest} message DeleteFeedbackLabelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteFeedbackLabelRequest.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 DeleteFeedbackLabelRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeleteFeedbackLabelRequest} message DeleteFeedbackLabelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteFeedbackLabelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteFeedbackLabelRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest} DeleteFeedbackLabelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteFeedbackLabelRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest(); + 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 DeleteFeedbackLabelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest} DeleteFeedbackLabelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteFeedbackLabelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteFeedbackLabelRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteFeedbackLabelRequest.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 DeleteFeedbackLabelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest} DeleteFeedbackLabelRequest + */ + DeleteFeedbackLabelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteFeedbackLabelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest} message DeleteFeedbackLabelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteFeedbackLabelRequest.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 DeleteFeedbackLabelRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteFeedbackLabelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteFeedbackLabelRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteFeedbackLabelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest"; + }; + + return DeleteFeedbackLabelRequest; + })(); + + v1.ListAllFeedbackLabelsRequest = (function() { + + /** + * Properties of a ListAllFeedbackLabelsRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IListAllFeedbackLabelsRequest + * @property {string|null} [parent] ListAllFeedbackLabelsRequest parent + * @property {number|null} [pageSize] ListAllFeedbackLabelsRequest pageSize + * @property {string|null} [pageToken] ListAllFeedbackLabelsRequest pageToken + * @property {string|null} [filter] ListAllFeedbackLabelsRequest filter + */ + + /** + * Constructs a new ListAllFeedbackLabelsRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ListAllFeedbackLabelsRequest. + * @implements IListAllFeedbackLabelsRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsRequest=} [properties] Properties to set + */ + function ListAllFeedbackLabelsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAllFeedbackLabelsRequest parent. + * @member {string} parent + * @memberof google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest + * @instance + */ + ListAllFeedbackLabelsRequest.prototype.parent = ""; + + /** + * ListAllFeedbackLabelsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest + * @instance + */ + ListAllFeedbackLabelsRequest.prototype.pageSize = 0; + + /** + * ListAllFeedbackLabelsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest + * @instance + */ + ListAllFeedbackLabelsRequest.prototype.pageToken = ""; + + /** + * ListAllFeedbackLabelsRequest filter. + * @member {string} filter + * @memberof google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest + * @instance + */ + ListAllFeedbackLabelsRequest.prototype.filter = ""; + + /** + * Creates a new ListAllFeedbackLabelsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest} ListAllFeedbackLabelsRequest instance + */ + ListAllFeedbackLabelsRequest.create = function create(properties) { + return new ListAllFeedbackLabelsRequest(properties); + }; + + /** + * Encodes the specified ListAllFeedbackLabelsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsRequest} message ListAllFeedbackLabelsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAllFeedbackLabelsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListAllFeedbackLabelsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsRequest} message ListAllFeedbackLabelsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAllFeedbackLabelsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAllFeedbackLabelsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest} ListAllFeedbackLabelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAllFeedbackLabelsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest(); + 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; + } + case 4: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAllFeedbackLabelsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest} ListAllFeedbackLabelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAllFeedbackLabelsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAllFeedbackLabelsRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAllFeedbackLabelsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListAllFeedbackLabelsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest} ListAllFeedbackLabelsRequest + */ + ListAllFeedbackLabelsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListAllFeedbackLabelsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest} message ListAllFeedbackLabelsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAllFeedbackLabelsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListAllFeedbackLabelsRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest + * @instance + * @returns {Object.} JSON object + */ + ListAllFeedbackLabelsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAllFeedbackLabelsRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAllFeedbackLabelsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest"; + }; + + return ListAllFeedbackLabelsRequest; + })(); + + v1.ListAllFeedbackLabelsResponse = (function() { + + /** + * Properties of a ListAllFeedbackLabelsResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IListAllFeedbackLabelsResponse + * @property {Array.|null} [feedbackLabels] ListAllFeedbackLabelsResponse feedbackLabels + * @property {string|null} [nextPageToken] ListAllFeedbackLabelsResponse nextPageToken + */ + + /** + * Constructs a new ListAllFeedbackLabelsResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ListAllFeedbackLabelsResponse. + * @implements IListAllFeedbackLabelsResponse + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsResponse=} [properties] Properties to set + */ + function ListAllFeedbackLabelsResponse(properties) { + this.feedbackLabels = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAllFeedbackLabelsResponse feedbackLabels. + * @member {Array.} feedbackLabels + * @memberof google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsResponse + * @instance + */ + ListAllFeedbackLabelsResponse.prototype.feedbackLabels = $util.emptyArray; + + /** + * ListAllFeedbackLabelsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsResponse + * @instance + */ + ListAllFeedbackLabelsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListAllFeedbackLabelsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsResponse=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsResponse} ListAllFeedbackLabelsResponse instance + */ + ListAllFeedbackLabelsResponse.create = function create(properties) { + return new ListAllFeedbackLabelsResponse(properties); + }; + + /** + * Encodes the specified ListAllFeedbackLabelsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsResponse} message ListAllFeedbackLabelsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAllFeedbackLabelsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.feedbackLabels != null && message.feedbackLabels.length) + for (var i = 0; i < message.feedbackLabels.length; ++i) + $root.google.cloud.contactcenterinsights.v1.FeedbackLabel.encode(message.feedbackLabels[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 ListAllFeedbackLabelsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsResponse} message ListAllFeedbackLabelsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAllFeedbackLabelsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAllFeedbackLabelsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsResponse} ListAllFeedbackLabelsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAllFeedbackLabelsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.feedbackLabels && message.feedbackLabels.length)) + message.feedbackLabels = []; + message.feedbackLabels.push($root.google.cloud.contactcenterinsights.v1.FeedbackLabel.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAllFeedbackLabelsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsResponse} ListAllFeedbackLabelsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAllFeedbackLabelsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAllFeedbackLabelsResponse message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAllFeedbackLabelsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.feedbackLabels != null && message.hasOwnProperty("feedbackLabels")) { + if (!Array.isArray(message.feedbackLabels)) + return "feedbackLabels: array expected"; + for (var i = 0; i < message.feedbackLabels.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.FeedbackLabel.verify(message.feedbackLabels[i]); + if (error) + return "feedbackLabels." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListAllFeedbackLabelsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsResponse} ListAllFeedbackLabelsResponse + */ + ListAllFeedbackLabelsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsResponse) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsResponse(); + if (object.feedbackLabels) { + if (!Array.isArray(object.feedbackLabels)) + throw TypeError(".google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsResponse.feedbackLabels: array expected"); + message.feedbackLabels = []; + for (var i = 0; i < object.feedbackLabels.length; ++i) { + if (typeof object.feedbackLabels[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsResponse.feedbackLabels: object expected"); + message.feedbackLabels[i] = $root.google.cloud.contactcenterinsights.v1.FeedbackLabel.fromObject(object.feedbackLabels[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListAllFeedbackLabelsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsResponse} message ListAllFeedbackLabelsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAllFeedbackLabelsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.feedbackLabels = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.feedbackLabels && message.feedbackLabels.length) { + object.feedbackLabels = []; + for (var j = 0; j < message.feedbackLabels.length; ++j) + object.feedbackLabels[j] = $root.google.cloud.contactcenterinsights.v1.FeedbackLabel.toObject(message.feedbackLabels[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListAllFeedbackLabelsResponse to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsResponse + * @instance + * @returns {Object.} JSON object + */ + ListAllFeedbackLabelsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAllFeedbackLabelsResponse + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAllFeedbackLabelsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsResponse"; + }; + + return ListAllFeedbackLabelsResponse; + })(); + + v1.BulkUploadFeedbackLabelsRequest = (function() { + + /** + * Properties of a BulkUploadFeedbackLabelsRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IBulkUploadFeedbackLabelsRequest + * @property {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.IGcsSource|null} [gcsSource] BulkUploadFeedbackLabelsRequest gcsSource + * @property {string|null} [parent] BulkUploadFeedbackLabelsRequest parent + * @property {boolean|null} [validateOnly] BulkUploadFeedbackLabelsRequest validateOnly + */ + + /** + * Constructs a new BulkUploadFeedbackLabelsRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a BulkUploadFeedbackLabelsRequest. + * @implements IBulkUploadFeedbackLabelsRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsRequest=} [properties] Properties to set + */ + function BulkUploadFeedbackLabelsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BulkUploadFeedbackLabelsRequest gcsSource. + * @member {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.IGcsSource|null|undefined} gcsSource + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest + * @instance + */ + BulkUploadFeedbackLabelsRequest.prototype.gcsSource = null; + + /** + * BulkUploadFeedbackLabelsRequest parent. + * @member {string} parent + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest + * @instance + */ + BulkUploadFeedbackLabelsRequest.prototype.parent = ""; + + /** + * BulkUploadFeedbackLabelsRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest + * @instance + */ + BulkUploadFeedbackLabelsRequest.prototype.validateOnly = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BulkUploadFeedbackLabelsRequest source. + * @member {"gcsSource"|undefined} source + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest + * @instance + */ + Object.defineProperty(BulkUploadFeedbackLabelsRequest.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["gcsSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BulkUploadFeedbackLabelsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest} BulkUploadFeedbackLabelsRequest instance + */ + BulkUploadFeedbackLabelsRequest.create = function create(properties) { + return new BulkUploadFeedbackLabelsRequest(properties); + }; + + /** + * Encodes the specified BulkUploadFeedbackLabelsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsRequest} message BulkUploadFeedbackLabelsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BulkUploadFeedbackLabelsRequest.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.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) + $root.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource.encode(message.gcsSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified BulkUploadFeedbackLabelsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsRequest} message BulkUploadFeedbackLabelsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BulkUploadFeedbackLabelsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BulkUploadFeedbackLabelsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest} BulkUploadFeedbackLabelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BulkUploadFeedbackLabelsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.gcsSource = $root.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource.decode(reader, reader.uint32()); + break; + } + case 1: { + message.parent = reader.string(); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BulkUploadFeedbackLabelsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest} BulkUploadFeedbackLabelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BulkUploadFeedbackLabelsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BulkUploadFeedbackLabelsRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BulkUploadFeedbackLabelsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + properties.source = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource.verify(message.gcsSource); + if (error) + return "gcsSource." + error; + } + } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a BulkUploadFeedbackLabelsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest} BulkUploadFeedbackLabelsRequest + */ + BulkUploadFeedbackLabelsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest(); + if (object.gcsSource != null) { + if (typeof object.gcsSource !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.gcsSource: object expected"); + message.gcsSource = $root.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource.fromObject(object.gcsSource); + } + if (object.parent != null) + message.parent = String(object.parent); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a BulkUploadFeedbackLabelsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest} message BulkUploadFeedbackLabelsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BulkUploadFeedbackLabelsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + object.gcsSource = $root.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource.toObject(message.gcsSource, options); + if (options.oneofs) + object.source = "gcsSource"; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this BulkUploadFeedbackLabelsRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest + * @instance + * @returns {Object.} JSON object + */ + BulkUploadFeedbackLabelsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BulkUploadFeedbackLabelsRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BulkUploadFeedbackLabelsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest"; + }; + + BulkUploadFeedbackLabelsRequest.GcsSource = (function() { + + /** + * Properties of a GcsSource. + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest + * @interface IGcsSource + * @property {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource.Format|null} [format] GcsSource format + * @property {string|null} [objectUri] GcsSource objectUri + */ + + /** + * Constructs a new GcsSource. + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest + * @classdesc Represents a GcsSource. + * @implements IGcsSource + * @constructor + * @param {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.IGcsSource=} [properties] Properties to set + */ + function GcsSource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GcsSource format. + * @member {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource.Format} format + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource + * @instance + */ + GcsSource.prototype.format = 0; + + /** + * GcsSource objectUri. + * @member {string} objectUri + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource + * @instance + */ + GcsSource.prototype.objectUri = ""; + + /** + * Creates a new GcsSource instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource + * @static + * @param {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.IGcsSource=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource} GcsSource instance + */ + GcsSource.create = function create(properties) { + return new GcsSource(properties); + }; + + /** + * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource + * @static + * @param {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.IGcsSource} message GcsSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); + if (message.objectUri != null && Object.hasOwnProperty.call(message, "objectUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.objectUri); + return writer; + }; + + /** + * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource + * @static + * @param {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.IGcsSource} message GcsSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GcsSource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource} GcsSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsSource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.format = reader.int32(); + break; + } + case 2: { + message.objectUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GcsSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource} GcsSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GcsSource message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcsSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.format != null && message.hasOwnProperty("format")) + switch (message.format) { + default: + return "format: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.objectUri != null && message.hasOwnProperty("objectUri")) + if (!$util.isString(message.objectUri)) + return "objectUri: string expected"; + return null; + }; + + /** + * Creates a GcsSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource} GcsSource + */ + GcsSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource(); + switch (object.format) { + default: + if (typeof object.format === "number") { + message.format = object.format; + break; + } + break; + case "FORMAT_UNSPECIFIED": + case 0: + message.format = 0; + break; + case "CSV": + case 1: + message.format = 1; + break; + case "JSON": + case 2: + message.format = 2; + break; + } + if (object.objectUri != null) + message.objectUri = String(object.objectUri); + return message; + }; + + /** + * Creates a plain object from a GcsSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource + * @static + * @param {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource} message GcsSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcsSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; + object.objectUri = ""; + } + if (message.format != null && message.hasOwnProperty("format")) + object.format = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource.Format[message.format] === undefined ? message.format : $root.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource.Format[message.format] : message.format; + if (message.objectUri != null && message.hasOwnProperty("objectUri")) + object.objectUri = message.objectUri; + return object; + }; + + /** + * Converts this GcsSource to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource + * @instance + * @returns {Object.} JSON object + */ + GcsSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GcsSource + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GcsSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource"; + }; + + /** + * Format enum. + * @name google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource.Format + * @enum {number} + * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value + * @property {number} CSV=1 CSV value + * @property {number} JSON=2 JSON value + */ + GcsSource.Format = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "CSV"] = 1; + values[valuesById[2] = "JSON"] = 2; + return values; + })(); + + return GcsSource; + })(); + + return BulkUploadFeedbackLabelsRequest; + })(); + + v1.BulkUploadFeedbackLabelsResponse = (function() { + + /** + * Properties of a BulkUploadFeedbackLabelsResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IBulkUploadFeedbackLabelsResponse + */ + + /** + * Constructs a new BulkUploadFeedbackLabelsResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a BulkUploadFeedbackLabelsResponse. + * @implements IBulkUploadFeedbackLabelsResponse + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsResponse=} [properties] Properties to set + */ + function BulkUploadFeedbackLabelsResponse(properties) { + if (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 BulkUploadFeedbackLabelsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsResponse=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsResponse} BulkUploadFeedbackLabelsResponse instance + */ + BulkUploadFeedbackLabelsResponse.create = function create(properties) { + return new BulkUploadFeedbackLabelsResponse(properties); + }; + + /** + * Encodes the specified BulkUploadFeedbackLabelsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsResponse} message BulkUploadFeedbackLabelsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BulkUploadFeedbackLabelsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified BulkUploadFeedbackLabelsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsResponse} message BulkUploadFeedbackLabelsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BulkUploadFeedbackLabelsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BulkUploadFeedbackLabelsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsResponse} BulkUploadFeedbackLabelsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BulkUploadFeedbackLabelsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BulkUploadFeedbackLabelsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsResponse} BulkUploadFeedbackLabelsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BulkUploadFeedbackLabelsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BulkUploadFeedbackLabelsResponse message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BulkUploadFeedbackLabelsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a BulkUploadFeedbackLabelsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsResponse} BulkUploadFeedbackLabelsResponse + */ + BulkUploadFeedbackLabelsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsResponse) + return object; + return new $root.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsResponse(); + }; + + /** + * Creates a plain object from a BulkUploadFeedbackLabelsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsResponse} message BulkUploadFeedbackLabelsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BulkUploadFeedbackLabelsResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this BulkUploadFeedbackLabelsResponse to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsResponse + * @instance + * @returns {Object.} JSON object + */ + BulkUploadFeedbackLabelsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BulkUploadFeedbackLabelsResponse + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BulkUploadFeedbackLabelsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsResponse"; + }; + + return BulkUploadFeedbackLabelsResponse; + })(); + + v1.BulkUploadFeedbackLabelsMetadata = (function() { + + /** + * Properties of a BulkUploadFeedbackLabelsMetadata. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IBulkUploadFeedbackLabelsMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] BulkUploadFeedbackLabelsMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] BulkUploadFeedbackLabelsMetadata endTime + * @property {google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsRequest|null} [request] BulkUploadFeedbackLabelsMetadata request + * @property {Array.|null} [partialErrors] BulkUploadFeedbackLabelsMetadata partialErrors + * @property {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.IUploadStats|null} [uploadStats] BulkUploadFeedbackLabelsMetadata uploadStats + */ + + /** + * Constructs a new BulkUploadFeedbackLabelsMetadata. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a BulkUploadFeedbackLabelsMetadata. + * @implements IBulkUploadFeedbackLabelsMetadata + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsMetadata=} [properties] Properties to set + */ + function BulkUploadFeedbackLabelsMetadata(properties) { + this.partialErrors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BulkUploadFeedbackLabelsMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata + * @instance + */ + BulkUploadFeedbackLabelsMetadata.prototype.createTime = null; + + /** + * BulkUploadFeedbackLabelsMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata + * @instance + */ + BulkUploadFeedbackLabelsMetadata.prototype.endTime = null; + + /** + * BulkUploadFeedbackLabelsMetadata request. + * @member {google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsRequest|null|undefined} request + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata + * @instance + */ + BulkUploadFeedbackLabelsMetadata.prototype.request = null; + + /** + * BulkUploadFeedbackLabelsMetadata partialErrors. + * @member {Array.} partialErrors + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata + * @instance + */ + BulkUploadFeedbackLabelsMetadata.prototype.partialErrors = $util.emptyArray; + + /** + * BulkUploadFeedbackLabelsMetadata uploadStats. + * @member {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.IUploadStats|null|undefined} uploadStats + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata + * @instance + */ + BulkUploadFeedbackLabelsMetadata.prototype.uploadStats = null; + + /** + * Creates a new BulkUploadFeedbackLabelsMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsMetadata=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata} BulkUploadFeedbackLabelsMetadata instance + */ + BulkUploadFeedbackLabelsMetadata.create = function create(properties) { + return new BulkUploadFeedbackLabelsMetadata(properties); + }; + + /** + * Encodes the specified BulkUploadFeedbackLabelsMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsMetadata} message BulkUploadFeedbackLabelsMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BulkUploadFeedbackLabelsMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.request != null && Object.hasOwnProperty.call(message, "request")) + $root.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.encode(message.request, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.partialErrors != null && message.partialErrors.length) + for (var i = 0; i < message.partialErrors.length; ++i) + $root.google.rpc.Status.encode(message.partialErrors[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.uploadStats != null && Object.hasOwnProperty.call(message, "uploadStats")) + $root.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.UploadStats.encode(message.uploadStats, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BulkUploadFeedbackLabelsMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsMetadata} message BulkUploadFeedbackLabelsMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BulkUploadFeedbackLabelsMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BulkUploadFeedbackLabelsMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata} BulkUploadFeedbackLabelsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BulkUploadFeedbackLabelsMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.request = $root.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.partialErrors && message.partialErrors.length)) + message.partialErrors = []; + message.partialErrors.push($root.google.rpc.Status.decode(reader, reader.uint32())); + break; + } + case 5: { + message.uploadStats = $root.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.UploadStats.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BulkUploadFeedbackLabelsMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata} BulkUploadFeedbackLabelsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BulkUploadFeedbackLabelsMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BulkUploadFeedbackLabelsMetadata message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BulkUploadFeedbackLabelsMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.request != null && message.hasOwnProperty("request")) { + var error = $root.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.verify(message.request); + if (error) + return "request." + error; + } + if (message.partialErrors != null && message.hasOwnProperty("partialErrors")) { + if (!Array.isArray(message.partialErrors)) + return "partialErrors: array expected"; + for (var i = 0; i < message.partialErrors.length; ++i) { + var error = $root.google.rpc.Status.verify(message.partialErrors[i]); + if (error) + return "partialErrors." + error; + } + } + if (message.uploadStats != null && message.hasOwnProperty("uploadStats")) { + var error = $root.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.UploadStats.verify(message.uploadStats); + if (error) + return "uploadStats." + error; + } + return null; + }; + + /** + * Creates a BulkUploadFeedbackLabelsMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata} BulkUploadFeedbackLabelsMetadata + */ + BulkUploadFeedbackLabelsMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.request != null) { + if (typeof object.request !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.request: object expected"); + message.request = $root.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.fromObject(object.request); + } + if (object.partialErrors) { + if (!Array.isArray(object.partialErrors)) + throw TypeError(".google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.partialErrors: array expected"); + message.partialErrors = []; + for (var i = 0; i < object.partialErrors.length; ++i) { + if (typeof object.partialErrors[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.partialErrors: object expected"); + message.partialErrors[i] = $root.google.rpc.Status.fromObject(object.partialErrors[i]); + } + } + if (object.uploadStats != null) { + if (typeof object.uploadStats !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.uploadStats: object expected"); + message.uploadStats = $root.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.UploadStats.fromObject(object.uploadStats); + } + return message; + }; + + /** + * Creates a plain object from a BulkUploadFeedbackLabelsMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata} message BulkUploadFeedbackLabelsMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BulkUploadFeedbackLabelsMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.partialErrors = []; + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.request = null; + object.uploadStats = null; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.request != null && message.hasOwnProperty("request")) + object.request = $root.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.toObject(message.request, options); + if (message.partialErrors && message.partialErrors.length) { + object.partialErrors = []; + for (var j = 0; j < message.partialErrors.length; ++j) + object.partialErrors[j] = $root.google.rpc.Status.toObject(message.partialErrors[j], options); + } + if (message.uploadStats != null && message.hasOwnProperty("uploadStats")) + object.uploadStats = $root.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.UploadStats.toObject(message.uploadStats, options); + return object; + }; + + /** + * Converts this BulkUploadFeedbackLabelsMetadata to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata + * @instance + * @returns {Object.} JSON object + */ + BulkUploadFeedbackLabelsMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BulkUploadFeedbackLabelsMetadata + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BulkUploadFeedbackLabelsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata"; + }; + + BulkUploadFeedbackLabelsMetadata.UploadStats = (function() { + + /** + * Properties of an UploadStats. + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata + * @interface IUploadStats + * @property {number|null} [processedObjectCount] UploadStats processedObjectCount + * @property {number|null} [failedValidationCount] UploadStats failedValidationCount + * @property {number|null} [successfulUploadCount] UploadStats successfulUploadCount + */ + + /** + * Constructs a new UploadStats. + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata + * @classdesc Represents an UploadStats. + * @implements IUploadStats + * @constructor + * @param {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.IUploadStats=} [properties] Properties to set + */ + function UploadStats(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UploadStats processedObjectCount. + * @member {number} processedObjectCount + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.UploadStats + * @instance + */ + UploadStats.prototype.processedObjectCount = 0; + + /** + * UploadStats failedValidationCount. + * @member {number} failedValidationCount + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.UploadStats + * @instance + */ + UploadStats.prototype.failedValidationCount = 0; + + /** + * UploadStats successfulUploadCount. + * @member {number} successfulUploadCount + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.UploadStats + * @instance + */ + UploadStats.prototype.successfulUploadCount = 0; + + /** + * Creates a new UploadStats instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.UploadStats + * @static + * @param {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.IUploadStats=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.UploadStats} UploadStats instance + */ + UploadStats.create = function create(properties) { + return new UploadStats(properties); + }; + + /** + * Encodes the specified UploadStats message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.UploadStats.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.UploadStats + * @static + * @param {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.IUploadStats} message UploadStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UploadStats.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.processedObjectCount != null && Object.hasOwnProperty.call(message, "processedObjectCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.processedObjectCount); + if (message.failedValidationCount != null && Object.hasOwnProperty.call(message, "failedValidationCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.failedValidationCount); + if (message.successfulUploadCount != null && Object.hasOwnProperty.call(message, "successfulUploadCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.successfulUploadCount); + return writer; + }; + + /** + * Encodes the specified UploadStats message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.UploadStats.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.UploadStats + * @static + * @param {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.IUploadStats} message UploadStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UploadStats.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UploadStats message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.UploadStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.UploadStats} UploadStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UploadStats.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.UploadStats(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.processedObjectCount = reader.int32(); + break; + } + case 2: { + message.failedValidationCount = reader.int32(); + break; + } + case 3: { + message.successfulUploadCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UploadStats message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.UploadStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.UploadStats} UploadStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UploadStats.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UploadStats message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.UploadStats + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UploadStats.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.processedObjectCount != null && message.hasOwnProperty("processedObjectCount")) + if (!$util.isInteger(message.processedObjectCount)) + return "processedObjectCount: integer expected"; + if (message.failedValidationCount != null && message.hasOwnProperty("failedValidationCount")) + if (!$util.isInteger(message.failedValidationCount)) + return "failedValidationCount: integer expected"; + if (message.successfulUploadCount != null && message.hasOwnProperty("successfulUploadCount")) + if (!$util.isInteger(message.successfulUploadCount)) + return "successfulUploadCount: integer expected"; + return null; + }; + + /** + * Creates an UploadStats message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.UploadStats + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.UploadStats} UploadStats + */ + UploadStats.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.UploadStats) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.UploadStats(); + if (object.processedObjectCount != null) + message.processedObjectCount = object.processedObjectCount | 0; + if (object.failedValidationCount != null) + message.failedValidationCount = object.failedValidationCount | 0; + if (object.successfulUploadCount != null) + message.successfulUploadCount = object.successfulUploadCount | 0; + return message; + }; + + /** + * Creates a plain object from an UploadStats message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.UploadStats + * @static + * @param {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.UploadStats} message UploadStats + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UploadStats.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.processedObjectCount = 0; + object.failedValidationCount = 0; + object.successfulUploadCount = 0; + } + if (message.processedObjectCount != null && message.hasOwnProperty("processedObjectCount")) + object.processedObjectCount = message.processedObjectCount; + if (message.failedValidationCount != null && message.hasOwnProperty("failedValidationCount")) + object.failedValidationCount = message.failedValidationCount; + if (message.successfulUploadCount != null && message.hasOwnProperty("successfulUploadCount")) + object.successfulUploadCount = message.successfulUploadCount; + return object; + }; + + /** + * Converts this UploadStats to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.UploadStats + * @instance + * @returns {Object.} JSON object + */ + UploadStats.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UploadStats + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.UploadStats + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UploadStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata.UploadStats"; + }; + + return UploadStats; + })(); + + return BulkUploadFeedbackLabelsMetadata; + })(); + + v1.BulkDownloadFeedbackLabelsRequest = (function() { + + /** + * Properties of a BulkDownloadFeedbackLabelsRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IBulkDownloadFeedbackLabelsRequest + * @property {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.IGcsDestination|null} [gcsDestination] BulkDownloadFeedbackLabelsRequest gcsDestination + * @property {string|null} [parent] BulkDownloadFeedbackLabelsRequest parent + * @property {string|null} [filter] BulkDownloadFeedbackLabelsRequest filter + * @property {number|null} [maxDownloadCount] BulkDownloadFeedbackLabelsRequest maxDownloadCount + * @property {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.FeedbackLabelType|null} [feedbackLabelType] BulkDownloadFeedbackLabelsRequest feedbackLabelType + * @property {string|null} [conversationFilter] BulkDownloadFeedbackLabelsRequest conversationFilter + * @property {Array.|null} [templateQaScorecardId] BulkDownloadFeedbackLabelsRequest templateQaScorecardId + */ + + /** + * Constructs a new BulkDownloadFeedbackLabelsRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a BulkDownloadFeedbackLabelsRequest. + * @implements IBulkDownloadFeedbackLabelsRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsRequest=} [properties] Properties to set + */ + function BulkDownloadFeedbackLabelsRequest(properties) { + this.templateQaScorecardId = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BulkDownloadFeedbackLabelsRequest gcsDestination. + * @member {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.IGcsDestination|null|undefined} gcsDestination + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest + * @instance + */ + BulkDownloadFeedbackLabelsRequest.prototype.gcsDestination = null; + + /** + * BulkDownloadFeedbackLabelsRequest parent. + * @member {string} parent + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest + * @instance + */ + BulkDownloadFeedbackLabelsRequest.prototype.parent = ""; + + /** + * BulkDownloadFeedbackLabelsRequest filter. + * @member {string} filter + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest + * @instance + */ + BulkDownloadFeedbackLabelsRequest.prototype.filter = ""; + + /** + * BulkDownloadFeedbackLabelsRequest maxDownloadCount. + * @member {number} maxDownloadCount + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest + * @instance + */ + BulkDownloadFeedbackLabelsRequest.prototype.maxDownloadCount = 0; + + /** + * BulkDownloadFeedbackLabelsRequest feedbackLabelType. + * @member {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.FeedbackLabelType} feedbackLabelType + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest + * @instance + */ + BulkDownloadFeedbackLabelsRequest.prototype.feedbackLabelType = 0; + + /** + * BulkDownloadFeedbackLabelsRequest conversationFilter. + * @member {string} conversationFilter + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest + * @instance + */ + BulkDownloadFeedbackLabelsRequest.prototype.conversationFilter = ""; + + /** + * BulkDownloadFeedbackLabelsRequest templateQaScorecardId. + * @member {Array.} templateQaScorecardId + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest + * @instance + */ + BulkDownloadFeedbackLabelsRequest.prototype.templateQaScorecardId = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BulkDownloadFeedbackLabelsRequest destination. + * @member {"gcsDestination"|undefined} destination + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest + * @instance + */ + Object.defineProperty(BulkDownloadFeedbackLabelsRequest.prototype, "destination", { + get: $util.oneOfGetter($oneOfFields = ["gcsDestination"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BulkDownloadFeedbackLabelsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest} BulkDownloadFeedbackLabelsRequest instance + */ + BulkDownloadFeedbackLabelsRequest.create = function create(properties) { + return new BulkDownloadFeedbackLabelsRequest(properties); + }; + + /** + * Encodes the specified BulkDownloadFeedbackLabelsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsRequest} message BulkDownloadFeedbackLabelsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BulkDownloadFeedbackLabelsRequest.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.gcsDestination != null && Object.hasOwnProperty.call(message, "gcsDestination")) + $root.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination.encode(message.gcsDestination, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.maxDownloadCount != null && Object.hasOwnProperty.call(message, "maxDownloadCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.maxDownloadCount); + if (message.feedbackLabelType != null && Object.hasOwnProperty.call(message, "feedbackLabelType")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.feedbackLabelType); + if (message.conversationFilter != null && Object.hasOwnProperty.call(message, "conversationFilter")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.conversationFilter); + if (message.templateQaScorecardId != null && message.templateQaScorecardId.length) + for (var i = 0; i < message.templateQaScorecardId.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.templateQaScorecardId[i]); + return writer; + }; + + /** + * Encodes the specified BulkDownloadFeedbackLabelsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsRequest} message BulkDownloadFeedbackLabelsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BulkDownloadFeedbackLabelsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BulkDownloadFeedbackLabelsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest} BulkDownloadFeedbackLabelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BulkDownloadFeedbackLabelsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.gcsDestination = $root.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination.decode(reader, reader.uint32()); + break; + } + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.filter = reader.string(); + break; + } + case 4: { + message.maxDownloadCount = reader.int32(); + break; + } + case 5: { + message.feedbackLabelType = reader.int32(); + break; + } + case 6: { + message.conversationFilter = reader.string(); + break; + } + case 7: { + if (!(message.templateQaScorecardId && message.templateQaScorecardId.length)) + message.templateQaScorecardId = []; + message.templateQaScorecardId.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BulkDownloadFeedbackLabelsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest} BulkDownloadFeedbackLabelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BulkDownloadFeedbackLabelsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BulkDownloadFeedbackLabelsRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BulkDownloadFeedbackLabelsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { + properties.destination = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination.verify(message.gcsDestination); + if (error) + return "gcsDestination." + error; + } + } + 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.maxDownloadCount != null && message.hasOwnProperty("maxDownloadCount")) + if (!$util.isInteger(message.maxDownloadCount)) + return "maxDownloadCount: integer expected"; + if (message.feedbackLabelType != null && message.hasOwnProperty("feedbackLabelType")) + switch (message.feedbackLabelType) { + default: + return "feedbackLabelType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.conversationFilter != null && message.hasOwnProperty("conversationFilter")) + if (!$util.isString(message.conversationFilter)) + return "conversationFilter: string expected"; + if (message.templateQaScorecardId != null && message.hasOwnProperty("templateQaScorecardId")) { + if (!Array.isArray(message.templateQaScorecardId)) + return "templateQaScorecardId: array expected"; + for (var i = 0; i < message.templateQaScorecardId.length; ++i) + if (!$util.isString(message.templateQaScorecardId[i])) + return "templateQaScorecardId: string[] expected"; + } + return null; + }; + + /** + * Creates a BulkDownloadFeedbackLabelsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest} BulkDownloadFeedbackLabelsRequest + */ + BulkDownloadFeedbackLabelsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest(); + if (object.gcsDestination != null) { + if (typeof object.gcsDestination !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.gcsDestination: object expected"); + message.gcsDestination = $root.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination.fromObject(object.gcsDestination); + } + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + if (object.maxDownloadCount != null) + message.maxDownloadCount = object.maxDownloadCount | 0; + switch (object.feedbackLabelType) { + default: + if (typeof object.feedbackLabelType === "number") { + message.feedbackLabelType = object.feedbackLabelType; + break; + } + break; + case "FEEDBACK_LABEL_TYPE_UNSPECIFIED": + case 0: + message.feedbackLabelType = 0; + break; + case "QUALITY_AI": + case 1: + message.feedbackLabelType = 1; + break; + case "TOPIC_MODELING": + case 2: + message.feedbackLabelType = 2; + break; + } + if (object.conversationFilter != null) + message.conversationFilter = String(object.conversationFilter); + if (object.templateQaScorecardId) { + if (!Array.isArray(object.templateQaScorecardId)) + throw TypeError(".google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.templateQaScorecardId: array expected"); + message.templateQaScorecardId = []; + for (var i = 0; i < object.templateQaScorecardId.length; ++i) + message.templateQaScorecardId[i] = String(object.templateQaScorecardId[i]); + } + return message; + }; + + /** + * Creates a plain object from a BulkDownloadFeedbackLabelsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest} message BulkDownloadFeedbackLabelsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BulkDownloadFeedbackLabelsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.templateQaScorecardId = []; + if (options.defaults) { + object.parent = ""; + object.filter = ""; + object.maxDownloadCount = 0; + object.feedbackLabelType = options.enums === String ? "FEEDBACK_LABEL_TYPE_UNSPECIFIED" : 0; + object.conversationFilter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { + object.gcsDestination = $root.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination.toObject(message.gcsDestination, options); + if (options.oneofs) + object.destination = "gcsDestination"; + } + if (message.maxDownloadCount != null && message.hasOwnProperty("maxDownloadCount")) + object.maxDownloadCount = message.maxDownloadCount; + if (message.feedbackLabelType != null && message.hasOwnProperty("feedbackLabelType")) + object.feedbackLabelType = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.FeedbackLabelType[message.feedbackLabelType] === undefined ? message.feedbackLabelType : $root.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.FeedbackLabelType[message.feedbackLabelType] : message.feedbackLabelType; + if (message.conversationFilter != null && message.hasOwnProperty("conversationFilter")) + object.conversationFilter = message.conversationFilter; + if (message.templateQaScorecardId && message.templateQaScorecardId.length) { + object.templateQaScorecardId = []; + for (var j = 0; j < message.templateQaScorecardId.length; ++j) + object.templateQaScorecardId[j] = message.templateQaScorecardId[j]; + } + return object; + }; + + /** + * Converts this BulkDownloadFeedbackLabelsRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest + * @instance + * @returns {Object.} JSON object + */ + BulkDownloadFeedbackLabelsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BulkDownloadFeedbackLabelsRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BulkDownloadFeedbackLabelsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest"; + }; + + BulkDownloadFeedbackLabelsRequest.GcsDestination = (function() { + + /** + * Properties of a GcsDestination. + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest + * @interface IGcsDestination + * @property {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination.Format|null} [format] GcsDestination format + * @property {string|null} [objectUri] GcsDestination objectUri + * @property {boolean|null} [addWhitespace] GcsDestination addWhitespace + * @property {boolean|null} [alwaysPrintEmptyFields] GcsDestination alwaysPrintEmptyFields + * @property {number|Long|null} [recordsPerFileCount] GcsDestination recordsPerFileCount + */ + + /** + * Constructs a new GcsDestination. + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest + * @classdesc Represents a GcsDestination. + * @implements IGcsDestination + * @constructor + * @param {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.IGcsDestination=} [properties] Properties to set + */ + function GcsDestination(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GcsDestination format. + * @member {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination.Format} format + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination + * @instance + */ + GcsDestination.prototype.format = 0; + + /** + * GcsDestination objectUri. + * @member {string} objectUri + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination + * @instance + */ + GcsDestination.prototype.objectUri = ""; + + /** + * GcsDestination addWhitespace. + * @member {boolean} addWhitespace + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination + * @instance + */ + GcsDestination.prototype.addWhitespace = false; + + /** + * GcsDestination alwaysPrintEmptyFields. + * @member {boolean} alwaysPrintEmptyFields + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination + * @instance + */ + GcsDestination.prototype.alwaysPrintEmptyFields = false; + + /** + * GcsDestination recordsPerFileCount. + * @member {number|Long} recordsPerFileCount + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination + * @instance + */ + GcsDestination.prototype.recordsPerFileCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new GcsDestination instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination + * @static + * @param {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.IGcsDestination=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination} GcsDestination instance + */ + GcsDestination.create = function create(properties) { + return new GcsDestination(properties); + }; + + /** + * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination + * @static + * @param {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.IGcsDestination} message GcsDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsDestination.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); + if (message.objectUri != null && Object.hasOwnProperty.call(message, "objectUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.objectUri); + if (message.addWhitespace != null && Object.hasOwnProperty.call(message, "addWhitespace")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.addWhitespace); + if (message.alwaysPrintEmptyFields != null && Object.hasOwnProperty.call(message, "alwaysPrintEmptyFields")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.alwaysPrintEmptyFields); + if (message.recordsPerFileCount != null && Object.hasOwnProperty.call(message, "recordsPerFileCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.recordsPerFileCount); + return writer; + }; + + /** + * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination + * @static + * @param {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.IGcsDestination} message GcsDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsDestination.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GcsDestination message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination} GcsDestination + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.format = reader.int32(); + break; + } + case 2: { + message.objectUri = reader.string(); + break; + } + case 3: { + message.addWhitespace = reader.bool(); + break; + } + case 4: { + message.alwaysPrintEmptyFields = reader.bool(); + break; + } + case 5: { + message.recordsPerFileCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GcsDestination message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination} GcsDestination + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GcsDestination message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination + * @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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.format != null && message.hasOwnProperty("format")) + switch (message.format) { + default: + return "format: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.objectUri != null && message.hasOwnProperty("objectUri")) + if (!$util.isString(message.objectUri)) + return "objectUri: string expected"; + if (message.addWhitespace != null && message.hasOwnProperty("addWhitespace")) + if (typeof message.addWhitespace !== "boolean") + return "addWhitespace: boolean expected"; + if (message.alwaysPrintEmptyFields != null && message.hasOwnProperty("alwaysPrintEmptyFields")) + if (typeof message.alwaysPrintEmptyFields !== "boolean") + return "alwaysPrintEmptyFields: boolean expected"; + if (message.recordsPerFileCount != null && message.hasOwnProperty("recordsPerFileCount")) + if (!$util.isInteger(message.recordsPerFileCount) && !(message.recordsPerFileCount && $util.isInteger(message.recordsPerFileCount.low) && $util.isInteger(message.recordsPerFileCount.high))) + return "recordsPerFileCount: integer|Long expected"; + return null; + }; + + /** + * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination} GcsDestination + */ + GcsDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination(); + switch (object.format) { + default: + if (typeof object.format === "number") { + message.format = object.format; + break; + } + break; + case "FORMAT_UNSPECIFIED": + case 0: + message.format = 0; + break; + case "CSV": + case 1: + message.format = 1; + break; + case "JSON": + case 2: + message.format = 2; + break; + } + if (object.objectUri != null) + message.objectUri = String(object.objectUri); + if (object.addWhitespace != null) + message.addWhitespace = Boolean(object.addWhitespace); + if (object.alwaysPrintEmptyFields != null) + message.alwaysPrintEmptyFields = Boolean(object.alwaysPrintEmptyFields); + if (object.recordsPerFileCount != null) + if ($util.Long) + (message.recordsPerFileCount = $util.Long.fromValue(object.recordsPerFileCount)).unsigned = false; + else if (typeof object.recordsPerFileCount === "string") + message.recordsPerFileCount = parseInt(object.recordsPerFileCount, 10); + else if (typeof object.recordsPerFileCount === "number") + message.recordsPerFileCount = object.recordsPerFileCount; + else if (typeof object.recordsPerFileCount === "object") + message.recordsPerFileCount = new $util.LongBits(object.recordsPerFileCount.low >>> 0, object.recordsPerFileCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a GcsDestination message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination + * @static + * @param {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination} message GcsDestination + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcsDestination.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; + object.objectUri = ""; + object.addWhitespace = false; + object.alwaysPrintEmptyFields = false; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.recordsPerFileCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.recordsPerFileCount = options.longs === String ? "0" : 0; + } + if (message.format != null && message.hasOwnProperty("format")) + object.format = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination.Format[message.format] === undefined ? message.format : $root.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination.Format[message.format] : message.format; + if (message.objectUri != null && message.hasOwnProperty("objectUri")) + object.objectUri = message.objectUri; + if (message.addWhitespace != null && message.hasOwnProperty("addWhitespace")) + object.addWhitespace = message.addWhitespace; + if (message.alwaysPrintEmptyFields != null && message.hasOwnProperty("alwaysPrintEmptyFields")) + object.alwaysPrintEmptyFields = message.alwaysPrintEmptyFields; + if (message.recordsPerFileCount != null && message.hasOwnProperty("recordsPerFileCount")) + if (typeof message.recordsPerFileCount === "number") + object.recordsPerFileCount = options.longs === String ? String(message.recordsPerFileCount) : message.recordsPerFileCount; + else + object.recordsPerFileCount = options.longs === String ? $util.Long.prototype.toString.call(message.recordsPerFileCount) : options.longs === Number ? new $util.LongBits(message.recordsPerFileCount.low >>> 0, message.recordsPerFileCount.high >>> 0).toNumber() : message.recordsPerFileCount; + return object; + }; + + /** + * Converts this GcsDestination to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination + * @instance + * @returns {Object.} JSON object + */ + GcsDestination.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GcsDestination + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GcsDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination"; + }; + + /** + * Format enum. + * @name google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination.Format + * @enum {number} + * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value + * @property {number} CSV=1 CSV value + * @property {number} JSON=2 JSON value + */ + GcsDestination.Format = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "CSV"] = 1; + values[valuesById[2] = "JSON"] = 2; + return values; + })(); + + return GcsDestination; + })(); + + /** + * FeedbackLabelType enum. + * @name google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.FeedbackLabelType + * @enum {number} + * @property {number} FEEDBACK_LABEL_TYPE_UNSPECIFIED=0 FEEDBACK_LABEL_TYPE_UNSPECIFIED value + * @property {number} QUALITY_AI=1 QUALITY_AI value + * @property {number} TOPIC_MODELING=2 TOPIC_MODELING value + */ + BulkDownloadFeedbackLabelsRequest.FeedbackLabelType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FEEDBACK_LABEL_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "QUALITY_AI"] = 1; + values[valuesById[2] = "TOPIC_MODELING"] = 2; + return values; + })(); + + return BulkDownloadFeedbackLabelsRequest; + })(); + + v1.BulkDownloadFeedbackLabelsResponse = (function() { + + /** + * Properties of a BulkDownloadFeedbackLabelsResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IBulkDownloadFeedbackLabelsResponse + */ + + /** + * Constructs a new BulkDownloadFeedbackLabelsResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a BulkDownloadFeedbackLabelsResponse. + * @implements IBulkDownloadFeedbackLabelsResponse + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsResponse=} [properties] Properties to set + */ + function BulkDownloadFeedbackLabelsResponse(properties) { + if (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 BulkDownloadFeedbackLabelsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsResponse=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsResponse} BulkDownloadFeedbackLabelsResponse instance + */ + BulkDownloadFeedbackLabelsResponse.create = function create(properties) { + return new BulkDownloadFeedbackLabelsResponse(properties); + }; + + /** + * Encodes the specified BulkDownloadFeedbackLabelsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsResponse} message BulkDownloadFeedbackLabelsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BulkDownloadFeedbackLabelsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified BulkDownloadFeedbackLabelsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsResponse} message BulkDownloadFeedbackLabelsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BulkDownloadFeedbackLabelsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BulkDownloadFeedbackLabelsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsResponse} BulkDownloadFeedbackLabelsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BulkDownloadFeedbackLabelsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BulkDownloadFeedbackLabelsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsResponse} BulkDownloadFeedbackLabelsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BulkDownloadFeedbackLabelsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BulkDownloadFeedbackLabelsResponse message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BulkDownloadFeedbackLabelsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a BulkDownloadFeedbackLabelsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsResponse} BulkDownloadFeedbackLabelsResponse + */ + BulkDownloadFeedbackLabelsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsResponse) + return object; + return new $root.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsResponse(); + }; + + /** + * Creates a plain object from a BulkDownloadFeedbackLabelsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsResponse} message BulkDownloadFeedbackLabelsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BulkDownloadFeedbackLabelsResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this BulkDownloadFeedbackLabelsResponse to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsResponse + * @instance + * @returns {Object.} JSON object + */ + BulkDownloadFeedbackLabelsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BulkDownloadFeedbackLabelsResponse + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BulkDownloadFeedbackLabelsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsResponse"; + }; + + return BulkDownloadFeedbackLabelsResponse; + })(); + + v1.BulkDownloadFeedbackLabelsMetadata = (function() { + + /** + * Properties of a BulkDownloadFeedbackLabelsMetadata. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IBulkDownloadFeedbackLabelsMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] BulkDownloadFeedbackLabelsMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] BulkDownloadFeedbackLabelsMetadata endTime + * @property {google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsRequest|null} [request] BulkDownloadFeedbackLabelsMetadata request + * @property {Array.|null} [partialErrors] BulkDownloadFeedbackLabelsMetadata partialErrors + * @property {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.IDownloadStats|null} [downloadStats] BulkDownloadFeedbackLabelsMetadata downloadStats + */ + + /** + * Constructs a new BulkDownloadFeedbackLabelsMetadata. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a BulkDownloadFeedbackLabelsMetadata. + * @implements IBulkDownloadFeedbackLabelsMetadata + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsMetadata=} [properties] Properties to set + */ + function BulkDownloadFeedbackLabelsMetadata(properties) { + this.partialErrors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BulkDownloadFeedbackLabelsMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata + * @instance + */ + BulkDownloadFeedbackLabelsMetadata.prototype.createTime = null; + + /** + * BulkDownloadFeedbackLabelsMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata + * @instance + */ + BulkDownloadFeedbackLabelsMetadata.prototype.endTime = null; + + /** + * BulkDownloadFeedbackLabelsMetadata request. + * @member {google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsRequest|null|undefined} request + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata + * @instance + */ + BulkDownloadFeedbackLabelsMetadata.prototype.request = null; + + /** + * BulkDownloadFeedbackLabelsMetadata partialErrors. + * @member {Array.} partialErrors + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata + * @instance + */ + BulkDownloadFeedbackLabelsMetadata.prototype.partialErrors = $util.emptyArray; + + /** + * BulkDownloadFeedbackLabelsMetadata downloadStats. + * @member {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.IDownloadStats|null|undefined} downloadStats + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata + * @instance + */ + BulkDownloadFeedbackLabelsMetadata.prototype.downloadStats = null; + + /** + * Creates a new BulkDownloadFeedbackLabelsMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsMetadata=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata} BulkDownloadFeedbackLabelsMetadata instance + */ + BulkDownloadFeedbackLabelsMetadata.create = function create(properties) { + return new BulkDownloadFeedbackLabelsMetadata(properties); + }; + + /** + * Encodes the specified BulkDownloadFeedbackLabelsMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsMetadata} message BulkDownloadFeedbackLabelsMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BulkDownloadFeedbackLabelsMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.request != null && Object.hasOwnProperty.call(message, "request")) + $root.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.encode(message.request, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.partialErrors != null && message.partialErrors.length) + for (var i = 0; i < message.partialErrors.length; ++i) + $root.google.rpc.Status.encode(message.partialErrors[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.downloadStats != null && Object.hasOwnProperty.call(message, "downloadStats")) + $root.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats.encode(message.downloadStats, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BulkDownloadFeedbackLabelsMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsMetadata} message BulkDownloadFeedbackLabelsMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BulkDownloadFeedbackLabelsMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BulkDownloadFeedbackLabelsMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata} BulkDownloadFeedbackLabelsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BulkDownloadFeedbackLabelsMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.request = $root.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.partialErrors && message.partialErrors.length)) + message.partialErrors = []; + message.partialErrors.push($root.google.rpc.Status.decode(reader, reader.uint32())); + break; + } + case 5: { + message.downloadStats = $root.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BulkDownloadFeedbackLabelsMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata} BulkDownloadFeedbackLabelsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BulkDownloadFeedbackLabelsMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BulkDownloadFeedbackLabelsMetadata message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BulkDownloadFeedbackLabelsMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.request != null && message.hasOwnProperty("request")) { + var error = $root.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.verify(message.request); + if (error) + return "request." + error; + } + if (message.partialErrors != null && message.hasOwnProperty("partialErrors")) { + if (!Array.isArray(message.partialErrors)) + return "partialErrors: array expected"; + for (var i = 0; i < message.partialErrors.length; ++i) { + var error = $root.google.rpc.Status.verify(message.partialErrors[i]); + if (error) + return "partialErrors." + error; + } + } + if (message.downloadStats != null && message.hasOwnProperty("downloadStats")) { + var error = $root.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats.verify(message.downloadStats); + if (error) + return "downloadStats." + error; + } + return null; + }; + + /** + * Creates a BulkDownloadFeedbackLabelsMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata} BulkDownloadFeedbackLabelsMetadata + */ + BulkDownloadFeedbackLabelsMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.request != null) { + if (typeof object.request !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.request: object expected"); + message.request = $root.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.fromObject(object.request); + } + if (object.partialErrors) { + if (!Array.isArray(object.partialErrors)) + throw TypeError(".google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.partialErrors: array expected"); + message.partialErrors = []; + for (var i = 0; i < object.partialErrors.length; ++i) { + if (typeof object.partialErrors[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.partialErrors: object expected"); + message.partialErrors[i] = $root.google.rpc.Status.fromObject(object.partialErrors[i]); + } + } + if (object.downloadStats != null) { + if (typeof object.downloadStats !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.downloadStats: object expected"); + message.downloadStats = $root.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats.fromObject(object.downloadStats); + } + return message; + }; + + /** + * Creates a plain object from a BulkDownloadFeedbackLabelsMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata} message BulkDownloadFeedbackLabelsMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BulkDownloadFeedbackLabelsMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.partialErrors = []; + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.request = null; + object.downloadStats = null; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.request != null && message.hasOwnProperty("request")) + object.request = $root.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.toObject(message.request, options); + if (message.partialErrors && message.partialErrors.length) { + object.partialErrors = []; + for (var j = 0; j < message.partialErrors.length; ++j) + object.partialErrors[j] = $root.google.rpc.Status.toObject(message.partialErrors[j], options); + } + if (message.downloadStats != null && message.hasOwnProperty("downloadStats")) + object.downloadStats = $root.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats.toObject(message.downloadStats, options); + return object; + }; + + /** + * Converts this BulkDownloadFeedbackLabelsMetadata to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata + * @instance + * @returns {Object.} JSON object + */ + BulkDownloadFeedbackLabelsMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BulkDownloadFeedbackLabelsMetadata + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BulkDownloadFeedbackLabelsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata"; + }; + + BulkDownloadFeedbackLabelsMetadata.DownloadStats = (function() { + + /** + * Properties of a DownloadStats. + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata + * @interface IDownloadStats + * @property {number|null} [processedObjectCount] DownloadStats processedObjectCount + * @property {number|null} [successfulDownloadCount] DownloadStats successfulDownloadCount + * @property {number|null} [totalFilesWritten] DownloadStats totalFilesWritten + * @property {Array.|null} [fileNames] DownloadStats fileNames + */ + + /** + * Constructs a new DownloadStats. + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata + * @classdesc Represents a DownloadStats. + * @implements IDownloadStats + * @constructor + * @param {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.IDownloadStats=} [properties] Properties to set + */ + function DownloadStats(properties) { + this.fileNames = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DownloadStats processedObjectCount. + * @member {number} processedObjectCount + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats + * @instance + */ + DownloadStats.prototype.processedObjectCount = 0; + + /** + * DownloadStats successfulDownloadCount. + * @member {number} successfulDownloadCount + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats + * @instance + */ + DownloadStats.prototype.successfulDownloadCount = 0; + + /** + * DownloadStats totalFilesWritten. + * @member {number} totalFilesWritten + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats + * @instance + */ + DownloadStats.prototype.totalFilesWritten = 0; + + /** + * DownloadStats fileNames. + * @member {Array.} fileNames + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats + * @instance + */ + DownloadStats.prototype.fileNames = $util.emptyArray; + + /** + * Creates a new DownloadStats instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats + * @static + * @param {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.IDownloadStats=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats} DownloadStats instance + */ + DownloadStats.create = function create(properties) { + return new DownloadStats(properties); + }; + + /** + * Encodes the specified DownloadStats message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats + * @static + * @param {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.IDownloadStats} message DownloadStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DownloadStats.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.processedObjectCount != null && Object.hasOwnProperty.call(message, "processedObjectCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.processedObjectCount); + if (message.successfulDownloadCount != null && Object.hasOwnProperty.call(message, "successfulDownloadCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.successfulDownloadCount); + if (message.totalFilesWritten != null && Object.hasOwnProperty.call(message, "totalFilesWritten")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalFilesWritten); + if (message.fileNames != null && message.fileNames.length) + for (var i = 0; i < message.fileNames.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.fileNames[i]); + return writer; + }; + + /** + * Encodes the specified DownloadStats message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats + * @static + * @param {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.IDownloadStats} message DownloadStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DownloadStats.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DownloadStats message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats} DownloadStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DownloadStats.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.processedObjectCount = reader.int32(); + break; + } + case 2: { + message.successfulDownloadCount = reader.int32(); + break; + } + case 3: { + message.totalFilesWritten = reader.int32(); + break; + } + case 4: { + if (!(message.fileNames && message.fileNames.length)) + message.fileNames = []; + message.fileNames.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DownloadStats message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats} DownloadStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DownloadStats.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DownloadStats message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DownloadStats.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.processedObjectCount != null && message.hasOwnProperty("processedObjectCount")) + if (!$util.isInteger(message.processedObjectCount)) + return "processedObjectCount: integer expected"; + if (message.successfulDownloadCount != null && message.hasOwnProperty("successfulDownloadCount")) + if (!$util.isInteger(message.successfulDownloadCount)) + return "successfulDownloadCount: integer expected"; + if (message.totalFilesWritten != null && message.hasOwnProperty("totalFilesWritten")) + if (!$util.isInteger(message.totalFilesWritten)) + return "totalFilesWritten: integer expected"; + if (message.fileNames != null && message.hasOwnProperty("fileNames")) { + if (!Array.isArray(message.fileNames)) + return "fileNames: array expected"; + for (var i = 0; i < message.fileNames.length; ++i) + if (!$util.isString(message.fileNames[i])) + return "fileNames: string[] expected"; + } + return null; + }; + + /** + * Creates a DownloadStats message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats} DownloadStats + */ + DownloadStats.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats(); + if (object.processedObjectCount != null) + message.processedObjectCount = object.processedObjectCount | 0; + if (object.successfulDownloadCount != null) + message.successfulDownloadCount = object.successfulDownloadCount | 0; + if (object.totalFilesWritten != null) + message.totalFilesWritten = object.totalFilesWritten | 0; + if (object.fileNames) { + if (!Array.isArray(object.fileNames)) + throw TypeError(".google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats.fileNames: array expected"); + message.fileNames = []; + for (var i = 0; i < object.fileNames.length; ++i) + message.fileNames[i] = String(object.fileNames[i]); + } + return message; + }; + + /** + * Creates a plain object from a DownloadStats message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats + * @static + * @param {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats} message DownloadStats + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DownloadStats.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.fileNames = []; + if (options.defaults) { + object.processedObjectCount = 0; + object.successfulDownloadCount = 0; + object.totalFilesWritten = 0; + } + if (message.processedObjectCount != null && message.hasOwnProperty("processedObjectCount")) + object.processedObjectCount = message.processedObjectCount; + if (message.successfulDownloadCount != null && message.hasOwnProperty("successfulDownloadCount")) + object.successfulDownloadCount = message.successfulDownloadCount; + if (message.totalFilesWritten != null && message.hasOwnProperty("totalFilesWritten")) + object.totalFilesWritten = message.totalFilesWritten; + if (message.fileNames && message.fileNames.length) { + object.fileNames = []; + for (var j = 0; j < message.fileNames.length; ++j) + object.fileNames[j] = message.fileNames[j]; + } + return object; + }; + + /** + * Converts this DownloadStats to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats + * @instance + * @returns {Object.} JSON object + */ + DownloadStats.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DownloadStats + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DownloadStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata.DownloadStats"; + }; + + return DownloadStats; + })(); + + return BulkDownloadFeedbackLabelsMetadata; + })(); + + /** + * DatasetValidationWarning enum. + * @name google.cloud.contactcenterinsights.v1.DatasetValidationWarning + * @enum {number} + * @property {number} DATASET_VALIDATION_WARNING_UNSPECIFIED=0 DATASET_VALIDATION_WARNING_UNSPECIFIED value + * @property {number} TOO_MANY_INVALID_FEEDBACK_LABELS=1 TOO_MANY_INVALID_FEEDBACK_LABELS value + * @property {number} INSUFFICIENT_FEEDBACK_LABELS=2 INSUFFICIENT_FEEDBACK_LABELS value + * @property {number} INSUFFICIENT_FEEDBACK_LABELS_PER_ANSWER=3 INSUFFICIENT_FEEDBACK_LABELS_PER_ANSWER value + * @property {number} ALL_FEEDBACK_LABELS_HAVE_THE_SAME_ANSWER=4 ALL_FEEDBACK_LABELS_HAVE_THE_SAME_ANSWER value + */ + v1.DatasetValidationWarning = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATASET_VALIDATION_WARNING_UNSPECIFIED"] = 0; + values[valuesById[1] = "TOO_MANY_INVALID_FEEDBACK_LABELS"] = 1; + values[valuesById[2] = "INSUFFICIENT_FEEDBACK_LABELS"] = 2; + values[valuesById[3] = "INSUFFICIENT_FEEDBACK_LABELS_PER_ANSWER"] = 3; + values[valuesById[4] = "ALL_FEEDBACK_LABELS_HAVE_THE_SAME_ANSWER"] = 4; + return values; + })(); + + v1.Conversation = (function() { + + /** + * Properties of a Conversation. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IConversation + * @property {google.cloud.contactcenterinsights.v1.Conversation.ICallMetadata|null} [callMetadata] Conversation callMetadata + * @property {google.protobuf.ITimestamp|null} [expireTime] Conversation expireTime + * @property {google.protobuf.IDuration|null} [ttl] Conversation ttl + * @property {string|null} [name] Conversation name + * @property {google.cloud.contactcenterinsights.v1.IConversationDataSource|null} [dataSource] Conversation dataSource + * @property {google.protobuf.ITimestamp|null} [createTime] Conversation createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Conversation updateTime + * @property {google.protobuf.ITimestamp|null} [startTime] Conversation startTime + * @property {string|null} [languageCode] Conversation languageCode + * @property {string|null} [agentId] Conversation agentId + * @property {Object.|null} [labels] Conversation labels + * @property {google.cloud.contactcenterinsights.v1.Conversation.IQualityMetadata|null} [qualityMetadata] Conversation qualityMetadata + * @property {string|null} [metadataJson] Conversation metadataJson + * @property {google.cloud.contactcenterinsights.v1.Conversation.ITranscript|null} [transcript] Conversation transcript + * @property {google.cloud.contactcenterinsights.v1.Conversation.Medium|null} [medium] Conversation medium + * @property {google.protobuf.IDuration|null} [duration] Conversation duration + * @property {number|null} [turnCount] Conversation turnCount + * @property {google.cloud.contactcenterinsights.v1.IAnalysis|null} [latestAnalysis] Conversation latestAnalysis + * @property {google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData|null} [latestSummary] Conversation latestSummary + * @property {Array.|null} [runtimeAnnotations] Conversation runtimeAnnotations + * @property {Object.|null} [dialogflowIntents] Conversation dialogflowIntents + * @property {string|null} [obfuscatedUserId] Conversation obfuscatedUserId + */ + + /** + * Constructs a new Conversation. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a Conversation. + * @implements IConversation + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IConversation=} [properties] Properties to set + */ + function Conversation(properties) { + this.labels = {}; + this.runtimeAnnotations = []; + this.dialogflowIntents = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Conversation callMetadata. + * @member {google.cloud.contactcenterinsights.v1.Conversation.ICallMetadata|null|undefined} callMetadata + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.callMetadata = null; + + /** + * Conversation expireTime. + * @member {google.protobuf.ITimestamp|null|undefined} expireTime + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.expireTime = null; + + /** + * Conversation ttl. + * @member {google.protobuf.IDuration|null|undefined} ttl + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.ttl = null; + + /** + * Conversation name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.name = ""; + + /** + * Conversation dataSource. + * @member {google.cloud.contactcenterinsights.v1.IConversationDataSource|null|undefined} dataSource + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.dataSource = null; + + /** + * Conversation createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.createTime = null; + + /** + * Conversation updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.updateTime = null; + + /** + * Conversation startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.startTime = null; + + /** + * Conversation languageCode. + * @member {string} languageCode + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.languageCode = ""; + + /** + * Conversation agentId. + * @member {string} agentId + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.agentId = ""; + + /** + * Conversation labels. + * @member {Object.} labels + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.labels = $util.emptyObject; + + /** + * Conversation qualityMetadata. + * @member {google.cloud.contactcenterinsights.v1.Conversation.IQualityMetadata|null|undefined} qualityMetadata + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.qualityMetadata = null; + + /** + * Conversation metadataJson. + * @member {string} metadataJson + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.metadataJson = ""; + + /** + * Conversation transcript. + * @member {google.cloud.contactcenterinsights.v1.Conversation.ITranscript|null|undefined} transcript + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.transcript = null; + + /** + * Conversation medium. + * @member {google.cloud.contactcenterinsights.v1.Conversation.Medium} medium + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.medium = 0; + + /** + * Conversation duration. + * @member {google.protobuf.IDuration|null|undefined} duration + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.duration = null; + + /** + * Conversation turnCount. + * @member {number} turnCount + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.turnCount = 0; + + /** + * Conversation latestAnalysis. + * @member {google.cloud.contactcenterinsights.v1.IAnalysis|null|undefined} latestAnalysis + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.latestAnalysis = null; + + /** + * Conversation latestSummary. + * @member {google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData|null|undefined} latestSummary + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.latestSummary = null; + + /** + * Conversation runtimeAnnotations. + * @member {Array.} runtimeAnnotations + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.runtimeAnnotations = $util.emptyArray; + + /** + * Conversation dialogflowIntents. + * @member {Object.} dialogflowIntents + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.dialogflowIntents = $util.emptyObject; + + /** + * Conversation obfuscatedUserId. + * @member {string} obfuscatedUserId + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.obfuscatedUserId = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Conversation metadata. + * @member {"callMetadata"|undefined} metadata + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Object.defineProperty(Conversation.prototype, "metadata", { + get: $util.oneOfGetter($oneOfFields = ["callMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Conversation expiration. + * @member {"expireTime"|"ttl"|undefined} expiration + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Object.defineProperty(Conversation.prototype, "expiration", { + get: $util.oneOfGetter($oneOfFields = ["expireTime", "ttl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Conversation instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @static + * @param {google.cloud.contactcenterinsights.v1.IConversation=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.Conversation} Conversation instance + */ + Conversation.create = function create(properties) { + return new Conversation(properties); + }; + + /** + * Encodes the specified Conversation message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @static + * @param {google.cloud.contactcenterinsights.v1.IConversation} message Conversation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Conversation.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.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) + $root.google.cloud.contactcenterinsights.v1.ConversationDataSource.encode(message.dataSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.agentId != null && Object.hasOwnProperty.call(message, "agentId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.agentId); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.callMetadata != null && Object.hasOwnProperty.call(message, "callMetadata")) + $root.google.cloud.contactcenterinsights.v1.Conversation.CallMetadata.encode(message.callMetadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.transcript != null && Object.hasOwnProperty.call(message, "transcript")) + $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.encode(message.transcript, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.medium != null && Object.hasOwnProperty.call(message, "medium")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.medium); + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.turnCount != null && Object.hasOwnProperty.call(message, "turnCount")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.turnCount); + if (message.latestAnalysis != null && Object.hasOwnProperty.call(message, "latestAnalysis")) + $root.google.cloud.contactcenterinsights.v1.Analysis.encode(message.latestAnalysis, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.runtimeAnnotations != null && message.runtimeAnnotations.length) + for (var i = 0; i < message.runtimeAnnotations.length; ++i) + $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.encode(message.runtimeAnnotations[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.languageCode); + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.ttl != null && Object.hasOwnProperty.call(message, "ttl")) + $root.google.protobuf.Duration.encode(message.ttl, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.dialogflowIntents != null && Object.hasOwnProperty.call(message, "dialogflowIntents")) + for (var keys = Object.keys(message.dialogflowIntents), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 18, wireType 2 =*/146).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.contactcenterinsights.v1.DialogflowIntent.encode(message.dialogflowIntents[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.latestSummary != null && Object.hasOwnProperty.call(message, "latestSummary")) + $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.encode(message.latestSummary, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.obfuscatedUserId != null && Object.hasOwnProperty.call(message, "obfuscatedUserId")) + writer.uint32(/* id 21, wireType 2 =*/170).string(message.obfuscatedUserId); + if (message.qualityMetadata != null && Object.hasOwnProperty.call(message, "qualityMetadata")) + $root.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.encode(message.qualityMetadata, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.metadataJson != null && Object.hasOwnProperty.call(message, "metadataJson")) + writer.uint32(/* id 25, wireType 2 =*/202).string(message.metadataJson); + return writer; + }; + + /** + * Encodes the specified Conversation message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @static + * @param {google.cloud.contactcenterinsights.v1.IConversation} message Conversation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Conversation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Conversation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.Conversation} Conversation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Conversation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Conversation(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 7: { + message.callMetadata = $root.google.cloud.contactcenterinsights.v1.Conversation.CallMetadata.decode(reader, reader.uint32()); + break; + } + case 15: { + message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 16: { + message.ttl = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.dataSource = $root.google.cloud.contactcenterinsights.v1.ConversationDataSource.decode(reader, reader.uint32()); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 17: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 14: { + message.languageCode = reader.string(); + break; + } + case 5: { + message.agentId = reader.string(); + break; + } + case 6: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 24: { + message.qualityMetadata = $root.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.decode(reader, reader.uint32()); + break; + } + case 25: { + message.metadataJson = reader.string(); + break; + } + case 8: { + message.transcript = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.decode(reader, reader.uint32()); + break; + } + case 9: { + message.medium = reader.int32(); + break; + } + case 10: { + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 11: { + message.turnCount = reader.int32(); + break; + } + case 12: { + message.latestAnalysis = $root.google.cloud.contactcenterinsights.v1.Analysis.decode(reader, reader.uint32()); + break; + } + case 20: { + message.latestSummary = $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.decode(reader, reader.uint32()); + break; + } + case 13: { + if (!(message.runtimeAnnotations && message.runtimeAnnotations.length)) + message.runtimeAnnotations = []; + message.runtimeAnnotations.push($root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.decode(reader, reader.uint32())); + break; + } + case 18: { + if (message.dialogflowIntents === $util.emptyObject) + message.dialogflowIntents = {}; + 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.contactcenterinsights.v1.DialogflowIntent.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.dialogflowIntents[key] = value; + break; + } + case 21: { + message.obfuscatedUserId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Conversation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.Conversation} Conversation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Conversation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Conversation message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Conversation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.callMetadata != null && message.hasOwnProperty("callMetadata")) { + properties.metadata = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.Conversation.CallMetadata.verify(message.callMetadata); + if (error) + return "callMetadata." + error; + } + } + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + properties.expiration = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.expireTime); + if (error) + return "expireTime." + error; + } + } + if (message.ttl != null && message.hasOwnProperty("ttl")) { + if (properties.expiration === 1) + return "expiration: multiple values"; + properties.expiration = 1; + { + var error = $root.google.protobuf.Duration.verify(message.ttl); + if (error) + return "ttl." + error; + } + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.dataSource != null && message.hasOwnProperty("dataSource")) { + var error = $root.google.cloud.contactcenterinsights.v1.ConversationDataSource.verify(message.dataSource); + if (error) + return "dataSource." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.agentId != null && message.hasOwnProperty("agentId")) + if (!$util.isString(message.agentId)) + return "agentId: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.qualityMetadata != null && message.hasOwnProperty("qualityMetadata")) { + var error = $root.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.verify(message.qualityMetadata); + if (error) + return "qualityMetadata." + error; + } + if (message.metadataJson != null && message.hasOwnProperty("metadataJson")) + if (!$util.isString(message.metadataJson)) + return "metadataJson: string expected"; + if (message.transcript != null && message.hasOwnProperty("transcript")) { + var error = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.verify(message.transcript); + if (error) + return "transcript." + error; + } + if (message.medium != null && message.hasOwnProperty("medium")) + switch (message.medium) { + default: + return "medium: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.google.protobuf.Duration.verify(message.duration); + if (error) + return "duration." + error; + } + if (message.turnCount != null && message.hasOwnProperty("turnCount")) + if (!$util.isInteger(message.turnCount)) + return "turnCount: integer expected"; + if (message.latestAnalysis != null && message.hasOwnProperty("latestAnalysis")) { + var error = $root.google.cloud.contactcenterinsights.v1.Analysis.verify(message.latestAnalysis); + if (error) + return "latestAnalysis." + error; + } + if (message.latestSummary != null && message.hasOwnProperty("latestSummary")) { + var error = $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.verify(message.latestSummary); + if (error) + return "latestSummary." + error; + } + if (message.runtimeAnnotations != null && message.hasOwnProperty("runtimeAnnotations")) { + if (!Array.isArray(message.runtimeAnnotations)) + return "runtimeAnnotations: array expected"; + for (var i = 0; i < message.runtimeAnnotations.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.verify(message.runtimeAnnotations[i]); + if (error) + return "runtimeAnnotations." + error; + } + } + if (message.dialogflowIntents != null && message.hasOwnProperty("dialogflowIntents")) { + if (!$util.isObject(message.dialogflowIntents)) + return "dialogflowIntents: object expected"; + var key = Object.keys(message.dialogflowIntents); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.DialogflowIntent.verify(message.dialogflowIntents[key[i]]); + if (error) + return "dialogflowIntents." + error; + } + } + if (message.obfuscatedUserId != null && message.hasOwnProperty("obfuscatedUserId")) + if (!$util.isString(message.obfuscatedUserId)) + return "obfuscatedUserId: string expected"; + return null; + }; + + /** + * Creates a Conversation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.Conversation} Conversation + */ + Conversation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.Conversation) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.Conversation(); + if (object.callMetadata != null) { + if (typeof object.callMetadata !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.callMetadata: object expected"); + message.callMetadata = $root.google.cloud.contactcenterinsights.v1.Conversation.CallMetadata.fromObject(object.callMetadata); + } + if (object.expireTime != null) { + if (typeof object.expireTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.expireTime: object expected"); + message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); + } + if (object.ttl != null) { + if (typeof object.ttl !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.ttl: object expected"); + message.ttl = $root.google.protobuf.Duration.fromObject(object.ttl); + } + if (object.name != null) + message.name = String(object.name); + if (object.dataSource != null) { + if (typeof object.dataSource !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.dataSource: object expected"); + message.dataSource = $root.google.cloud.contactcenterinsights.v1.ConversationDataSource.fromObject(object.dataSource); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.agentId != null) + message.agentId = String(object.agentId); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.qualityMetadata != null) { + if (typeof object.qualityMetadata !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.qualityMetadata: object expected"); + message.qualityMetadata = $root.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.fromObject(object.qualityMetadata); + } + if (object.metadataJson != null) + message.metadataJson = String(object.metadataJson); + if (object.transcript != null) { + if (typeof object.transcript !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.transcript: object expected"); + message.transcript = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.fromObject(object.transcript); + } + switch (object.medium) { + default: + if (typeof object.medium === "number") { + message.medium = object.medium; + break; + } + break; + case "MEDIUM_UNSPECIFIED": + case 0: + message.medium = 0; + break; + case "PHONE_CALL": + case 1: + message.medium = 1; + break; + case "CHAT": + case 2: + message.medium = 2; + break; + } + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.duration: object expected"); + message.duration = $root.google.protobuf.Duration.fromObject(object.duration); + } + if (object.turnCount != null) + message.turnCount = object.turnCount | 0; + if (object.latestAnalysis != null) { + if (typeof object.latestAnalysis !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.latestAnalysis: object expected"); + message.latestAnalysis = $root.google.cloud.contactcenterinsights.v1.Analysis.fromObject(object.latestAnalysis); + } + if (object.latestSummary != null) { + if (typeof object.latestSummary !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.latestSummary: object expected"); + message.latestSummary = $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.fromObject(object.latestSummary); + } + if (object.runtimeAnnotations) { + if (!Array.isArray(object.runtimeAnnotations)) + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.runtimeAnnotations: array expected"); + message.runtimeAnnotations = []; + for (var i = 0; i < object.runtimeAnnotations.length; ++i) { + if (typeof object.runtimeAnnotations[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.runtimeAnnotations: object expected"); + message.runtimeAnnotations[i] = $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.fromObject(object.runtimeAnnotations[i]); + } + } + if (object.dialogflowIntents) { + if (typeof object.dialogflowIntents !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.dialogflowIntents: object expected"); + message.dialogflowIntents = {}; + for (var keys = Object.keys(object.dialogflowIntents), i = 0; i < keys.length; ++i) { + if (typeof object.dialogflowIntents[keys[i]] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.dialogflowIntents: object expected"); + message.dialogflowIntents[keys[i]] = $root.google.cloud.contactcenterinsights.v1.DialogflowIntent.fromObject(object.dialogflowIntents[keys[i]]); + } + } + if (object.obfuscatedUserId != null) + message.obfuscatedUserId = String(object.obfuscatedUserId); + return message; + }; + + /** + * Creates a plain object from a Conversation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation} message Conversation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Conversation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.runtimeAnnotations = []; + if (options.objects || options.defaults) { + object.labels = {}; + object.dialogflowIntents = {}; + } + if (options.defaults) { + object.name = ""; + object.dataSource = null; + object.createTime = null; + object.updateTime = null; + object.agentId = ""; + object.transcript = null; + object.medium = options.enums === String ? "MEDIUM_UNSPECIFIED" : 0; + object.duration = null; + object.turnCount = 0; + object.latestAnalysis = null; + object.languageCode = ""; + object.startTime = null; + object.latestSummary = null; + object.obfuscatedUserId = ""; + object.qualityMetadata = null; + object.metadataJson = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + object.dataSource = $root.google.cloud.contactcenterinsights.v1.ConversationDataSource.toObject(message.dataSource, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.agentId != null && message.hasOwnProperty("agentId")) + object.agentId = message.agentId; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.callMetadata != null && message.hasOwnProperty("callMetadata")) { + object.callMetadata = $root.google.cloud.contactcenterinsights.v1.Conversation.CallMetadata.toObject(message.callMetadata, options); + if (options.oneofs) + object.metadata = "callMetadata"; + } + if (message.transcript != null && message.hasOwnProperty("transcript")) + object.transcript = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.toObject(message.transcript, options); + if (message.medium != null && message.hasOwnProperty("medium")) + object.medium = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.Conversation.Medium[message.medium] === undefined ? message.medium : $root.google.cloud.contactcenterinsights.v1.Conversation.Medium[message.medium] : message.medium; + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); + if (message.turnCount != null && message.hasOwnProperty("turnCount")) + object.turnCount = message.turnCount; + if (message.latestAnalysis != null && message.hasOwnProperty("latestAnalysis")) + object.latestAnalysis = $root.google.cloud.contactcenterinsights.v1.Analysis.toObject(message.latestAnalysis, options); + if (message.runtimeAnnotations && message.runtimeAnnotations.length) { + object.runtimeAnnotations = []; + for (var j = 0; j < message.runtimeAnnotations.length; ++j) + object.runtimeAnnotations[j] = $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.toObject(message.runtimeAnnotations[j], options); + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); + if (options.oneofs) + object.expiration = "expireTime"; + } + if (message.ttl != null && message.hasOwnProperty("ttl")) { + object.ttl = $root.google.protobuf.Duration.toObject(message.ttl, options); + if (options.oneofs) + object.expiration = "ttl"; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.dialogflowIntents && (keys2 = Object.keys(message.dialogflowIntents)).length) { + object.dialogflowIntents = {}; + for (var j = 0; j < keys2.length; ++j) + object.dialogflowIntents[keys2[j]] = $root.google.cloud.contactcenterinsights.v1.DialogflowIntent.toObject(message.dialogflowIntents[keys2[j]], options); + } + if (message.latestSummary != null && message.hasOwnProperty("latestSummary")) + object.latestSummary = $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.toObject(message.latestSummary, options); + if (message.obfuscatedUserId != null && message.hasOwnProperty("obfuscatedUserId")) + object.obfuscatedUserId = message.obfuscatedUserId; + if (message.qualityMetadata != null && message.hasOwnProperty("qualityMetadata")) + object.qualityMetadata = $root.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.toObject(message.qualityMetadata, options); + if (message.metadataJson != null && message.hasOwnProperty("metadataJson")) + object.metadataJson = message.metadataJson; + return object; + }; + + /** + * Converts this Conversation to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + * @returns {Object.} JSON object + */ + Conversation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Conversation + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Conversation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Conversation"; + }; + + Conversation.CallMetadata = (function() { + + /** + * Properties of a CallMetadata. + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @interface ICallMetadata + * @property {number|null} [customerChannel] CallMetadata customerChannel + * @property {number|null} [agentChannel] CallMetadata agentChannel + */ + + /** + * Constructs a new CallMetadata. + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @classdesc Represents a CallMetadata. + * @implements ICallMetadata + * @constructor + * @param {google.cloud.contactcenterinsights.v1.Conversation.ICallMetadata=} [properties] Properties to set + */ + function CallMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CallMetadata customerChannel. + * @member {number} customerChannel + * @memberof google.cloud.contactcenterinsights.v1.Conversation.CallMetadata + * @instance + */ + CallMetadata.prototype.customerChannel = 0; + + /** + * CallMetadata agentChannel. + * @member {number} agentChannel + * @memberof google.cloud.contactcenterinsights.v1.Conversation.CallMetadata + * @instance + */ + CallMetadata.prototype.agentChannel = 0; + + /** + * Creates a new CallMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.Conversation.CallMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.ICallMetadata=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.Conversation.CallMetadata} CallMetadata instance + */ + CallMetadata.create = function create(properties) { + return new CallMetadata(properties); + }; + + /** + * Encodes the specified CallMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.CallMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.Conversation.CallMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.ICallMetadata} message CallMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CallMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.customerChannel != null && Object.hasOwnProperty.call(message, "customerChannel")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.customerChannel); + if (message.agentChannel != null && Object.hasOwnProperty.call(message, "agentChannel")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.agentChannel); + return writer; + }; + + /** + * Encodes the specified CallMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.CallMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Conversation.CallMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.ICallMetadata} message CallMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CallMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CallMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.Conversation.CallMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.Conversation.CallMetadata} CallMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CallMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Conversation.CallMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.customerChannel = reader.int32(); + break; + } + case 2: { + message.agentChannel = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CallMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Conversation.CallMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.Conversation.CallMetadata} CallMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CallMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CallMetadata message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.Conversation.CallMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CallMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.customerChannel != null && message.hasOwnProperty("customerChannel")) + if (!$util.isInteger(message.customerChannel)) + return "customerChannel: integer expected"; + if (message.agentChannel != null && message.hasOwnProperty("agentChannel")) + if (!$util.isInteger(message.agentChannel)) + return "agentChannel: integer expected"; + return null; + }; + + /** + * Creates a CallMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.Conversation.CallMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.Conversation.CallMetadata} CallMetadata + */ + CallMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.Conversation.CallMetadata) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.Conversation.CallMetadata(); + if (object.customerChannel != null) + message.customerChannel = object.customerChannel | 0; + if (object.agentChannel != null) + message.agentChannel = object.agentChannel | 0; + return message; + }; + + /** + * Creates a plain object from a CallMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.Conversation.CallMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.CallMetadata} message CallMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CallMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.customerChannel = 0; + object.agentChannel = 0; + } + if (message.customerChannel != null && message.hasOwnProperty("customerChannel")) + object.customerChannel = message.customerChannel; + if (message.agentChannel != null && message.hasOwnProperty("agentChannel")) + object.agentChannel = message.agentChannel; + return object; + }; + + /** + * Converts this CallMetadata to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.Conversation.CallMetadata + * @instance + * @returns {Object.} JSON object + */ + CallMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CallMetadata + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.Conversation.CallMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CallMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Conversation.CallMetadata"; + }; + + return CallMetadata; + })(); + + Conversation.QualityMetadata = (function() { + + /** + * Properties of a QualityMetadata. + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @interface IQualityMetadata + * @property {number|null} [customerSatisfactionRating] QualityMetadata customerSatisfactionRating + * @property {google.protobuf.IDuration|null} [waitDuration] QualityMetadata waitDuration + * @property {string|null} [menuPath] QualityMetadata menuPath + * @property {Array.|null} [agentInfo] QualityMetadata agentInfo + */ + + /** + * Constructs a new QualityMetadata. + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @classdesc Represents a QualityMetadata. + * @implements IQualityMetadata + * @constructor + * @param {google.cloud.contactcenterinsights.v1.Conversation.IQualityMetadata=} [properties] Properties to set + */ + function QualityMetadata(properties) { + this.agentInfo = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QualityMetadata customerSatisfactionRating. + * @member {number} customerSatisfactionRating + * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata + * @instance + */ + QualityMetadata.prototype.customerSatisfactionRating = 0; + + /** + * QualityMetadata waitDuration. + * @member {google.protobuf.IDuration|null|undefined} waitDuration + * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata + * @instance + */ + QualityMetadata.prototype.waitDuration = null; + + /** + * QualityMetadata menuPath. + * @member {string} menuPath + * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata + * @instance + */ + QualityMetadata.prototype.menuPath = ""; + + /** + * QualityMetadata agentInfo. + * @member {Array.} agentInfo + * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata + * @instance + */ + QualityMetadata.prototype.agentInfo = $util.emptyArray; + + /** + * Creates a new QualityMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.IQualityMetadata=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata} QualityMetadata instance + */ + QualityMetadata.create = function create(properties) { + return new QualityMetadata(properties); + }; + + /** + * Encodes the specified QualityMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.IQualityMetadata} message QualityMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QualityMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.customerSatisfactionRating != null && Object.hasOwnProperty.call(message, "customerSatisfactionRating")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.customerSatisfactionRating); + if (message.waitDuration != null && Object.hasOwnProperty.call(message, "waitDuration")) + $root.google.protobuf.Duration.encode(message.waitDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.menuPath != null && Object.hasOwnProperty.call(message, "menuPath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.menuPath); + if (message.agentInfo != null && message.agentInfo.length) + for (var i = 0; i < message.agentInfo.length; ++i) + $root.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo.encode(message.agentInfo[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QualityMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.IQualityMetadata} message QualityMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QualityMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QualityMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata} QualityMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QualityMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.customerSatisfactionRating = reader.int32(); + break; + } + case 2: { + message.waitDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 3: { + message.menuPath = reader.string(); + break; + } + case 4: { + if (!(message.agentInfo && message.agentInfo.length)) + message.agentInfo = []; + message.agentInfo.push($root.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QualityMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata} QualityMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QualityMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QualityMetadata message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QualityMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.customerSatisfactionRating != null && message.hasOwnProperty("customerSatisfactionRating")) + if (!$util.isInteger(message.customerSatisfactionRating)) + return "customerSatisfactionRating: integer expected"; + if (message.waitDuration != null && message.hasOwnProperty("waitDuration")) { + var error = $root.google.protobuf.Duration.verify(message.waitDuration); + if (error) + return "waitDuration." + error; + } + if (message.menuPath != null && message.hasOwnProperty("menuPath")) + if (!$util.isString(message.menuPath)) + return "menuPath: string expected"; + if (message.agentInfo != null && message.hasOwnProperty("agentInfo")) { + if (!Array.isArray(message.agentInfo)) + return "agentInfo: array expected"; + for (var i = 0; i < message.agentInfo.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo.verify(message.agentInfo[i]); + if (error) + return "agentInfo." + error; + } + } + return null; + }; + + /** + * Creates a QualityMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata} QualityMetadata + */ + QualityMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata(); + if (object.customerSatisfactionRating != null) + message.customerSatisfactionRating = object.customerSatisfactionRating | 0; + if (object.waitDuration != null) { + if (typeof object.waitDuration !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.waitDuration: object expected"); + message.waitDuration = $root.google.protobuf.Duration.fromObject(object.waitDuration); + } + if (object.menuPath != null) + message.menuPath = String(object.menuPath); + if (object.agentInfo) { + if (!Array.isArray(object.agentInfo)) + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.agentInfo: array expected"); + message.agentInfo = []; + for (var i = 0; i < object.agentInfo.length; ++i) { + if (typeof object.agentInfo[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.agentInfo: object expected"); + message.agentInfo[i] = $root.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo.fromObject(object.agentInfo[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a QualityMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata} message QualityMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QualityMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.agentInfo = []; + if (options.defaults) { + object.customerSatisfactionRating = 0; + object.waitDuration = null; + object.menuPath = ""; + } + if (message.customerSatisfactionRating != null && message.hasOwnProperty("customerSatisfactionRating")) + object.customerSatisfactionRating = message.customerSatisfactionRating; + if (message.waitDuration != null && message.hasOwnProperty("waitDuration")) + object.waitDuration = $root.google.protobuf.Duration.toObject(message.waitDuration, options); + if (message.menuPath != null && message.hasOwnProperty("menuPath")) + object.menuPath = message.menuPath; + if (message.agentInfo && message.agentInfo.length) { + object.agentInfo = []; + for (var j = 0; j < message.agentInfo.length; ++j) + object.agentInfo[j] = $root.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo.toObject(message.agentInfo[j], options); + } + return object; + }; + + /** + * Converts this QualityMetadata to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata + * @instance + * @returns {Object.} JSON object + */ + QualityMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QualityMetadata + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QualityMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata"; + }; + + QualityMetadata.AgentInfo = (function() { + + /** + * Properties of an AgentInfo. + * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata + * @interface IAgentInfo + * @property {string|null} [agentId] AgentInfo agentId + * @property {string|null} [displayName] AgentInfo displayName + * @property {string|null} [team] AgentInfo team + * @property {string|null} [dispositionCode] AgentInfo dispositionCode + */ + + /** + * Constructs a new AgentInfo. + * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata + * @classdesc Represents an AgentInfo. + * @implements IAgentInfo + * @constructor + * @param {google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.IAgentInfo=} [properties] Properties to set + */ + function AgentInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AgentInfo agentId. + * @member {string} agentId + * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo + * @instance + */ + AgentInfo.prototype.agentId = ""; + + /** + * AgentInfo displayName. + * @member {string} displayName + * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo + * @instance + */ + AgentInfo.prototype.displayName = ""; + + /** + * AgentInfo team. + * @member {string} team + * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo + * @instance + */ + AgentInfo.prototype.team = ""; + + /** + * AgentInfo dispositionCode. + * @member {string} dispositionCode + * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo + * @instance + */ + AgentInfo.prototype.dispositionCode = ""; + + /** + * Creates a new AgentInfo instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.IAgentInfo=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo} AgentInfo instance + */ + AgentInfo.create = function create(properties) { + return new AgentInfo(properties); + }; + + /** + * Encodes the specified AgentInfo message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.IAgentInfo} message AgentInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AgentInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.agentId != null && Object.hasOwnProperty.call(message, "agentId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.agentId); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.team != null && Object.hasOwnProperty.call(message, "team")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.team); + if (message.dispositionCode != null && Object.hasOwnProperty.call(message, "dispositionCode")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.dispositionCode); + return writer; + }; + + /** + * Encodes the specified AgentInfo message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.IAgentInfo} message AgentInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AgentInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AgentInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo} AgentInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AgentInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.agentId = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.team = reader.string(); + break; + } + case 4: { + message.dispositionCode = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AgentInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo} AgentInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AgentInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AgentInfo message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AgentInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.agentId != null && message.hasOwnProperty("agentId")) + if (!$util.isString(message.agentId)) + return "agentId: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.team != null && message.hasOwnProperty("team")) + if (!$util.isString(message.team)) + return "team: string expected"; + if (message.dispositionCode != null && message.hasOwnProperty("dispositionCode")) + if (!$util.isString(message.dispositionCode)) + return "dispositionCode: string expected"; + return null; + }; + + /** + * Creates an AgentInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo} AgentInfo + */ + AgentInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo(); + if (object.agentId != null) + message.agentId = String(object.agentId); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.team != null) + message.team = String(object.team); + if (object.dispositionCode != null) + message.dispositionCode = String(object.dispositionCode); + return message; + }; + + /** + * Creates a plain object from an AgentInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo} message AgentInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AgentInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.agentId = ""; + object.displayName = ""; + object.team = ""; + object.dispositionCode = ""; + } + if (message.agentId != null && message.hasOwnProperty("agentId")) + object.agentId = message.agentId; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.team != null && message.hasOwnProperty("team")) + object.team = message.team; + if (message.dispositionCode != null && message.hasOwnProperty("dispositionCode")) + object.dispositionCode = message.dispositionCode; + return object; + }; + + /** + * Converts this AgentInfo to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo + * @instance + * @returns {Object.} JSON object + */ + AgentInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AgentInfo + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AgentInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo"; + }; + + return AgentInfo; + })(); + + return QualityMetadata; + })(); + + Conversation.Transcript = (function() { + + /** + * Properties of a Transcript. + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @interface ITranscript + * @property {Array.|null} [transcriptSegments] Transcript transcriptSegments + */ + + /** + * Constructs a new Transcript. + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @classdesc Represents a Transcript. + * @implements ITranscript + * @constructor + * @param {google.cloud.contactcenterinsights.v1.Conversation.ITranscript=} [properties] Properties to set + */ + function Transcript(properties) { + this.transcriptSegments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Transcript transcriptSegments. + * @member {Array.} transcriptSegments + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript + * @instance + */ + Transcript.prototype.transcriptSegments = $util.emptyArray; + + /** + * Creates a new Transcript instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.ITranscript=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript} Transcript instance + */ + Transcript.create = function create(properties) { + return new Transcript(properties); + }; + + /** + * Encodes the specified Transcript message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.ITranscript} message Transcript message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Transcript.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.transcriptSegments != null && message.transcriptSegments.length) + for (var i = 0; i < message.transcriptSegments.length; ++i) + $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.encode(message.transcriptSegments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Transcript message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.ITranscript} message Transcript message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Transcript.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Transcript message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript} Transcript + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Transcript.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.transcriptSegments && message.transcriptSegments.length)) + message.transcriptSegments = []; + message.transcriptSegments.push($root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Transcript message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript} Transcript + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Transcript.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Transcript message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Transcript.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.transcriptSegments != null && message.hasOwnProperty("transcriptSegments")) { + if (!Array.isArray(message.transcriptSegments)) + return "transcriptSegments: array expected"; + for (var i = 0; i < message.transcriptSegments.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.verify(message.transcriptSegments[i]); + if (error) + return "transcriptSegments." + error; + } + } + return null; + }; + + /** + * Creates a Transcript message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript} Transcript + */ + Transcript.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript(); + if (object.transcriptSegments) { + if (!Array.isArray(object.transcriptSegments)) + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.Transcript.transcriptSegments: array expected"); + message.transcriptSegments = []; + for (var i = 0; i < object.transcriptSegments.length; ++i) { + if (typeof object.transcriptSegments[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.Transcript.transcriptSegments: object expected"); + message.transcriptSegments[i] = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.fromObject(object.transcriptSegments[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Transcript message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript} message Transcript + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Transcript.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.transcriptSegments = []; + if (message.transcriptSegments && message.transcriptSegments.length) { + object.transcriptSegments = []; + for (var j = 0; j < message.transcriptSegments.length; ++j) + object.transcriptSegments[j] = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.toObject(message.transcriptSegments[j], options); + } + return object; + }; + + /** + * Converts this Transcript to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript + * @instance + * @returns {Object.} JSON object + */ + Transcript.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Transcript + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Transcript.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Conversation.Transcript"; + }; + + Transcript.TranscriptSegment = (function() { + + /** + * Properties of a TranscriptSegment. + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript + * @interface ITranscriptSegment + * @property {google.protobuf.ITimestamp|null} [messageTime] TranscriptSegment messageTime + * @property {string|null} [text] TranscriptSegment text + * @property {number|null} [confidence] TranscriptSegment confidence + * @property {Array.|null} [words] TranscriptSegment words + * @property {string|null} [languageCode] TranscriptSegment languageCode + * @property {number|null} [channelTag] TranscriptSegment channelTag + * @property {google.cloud.contactcenterinsights.v1.IConversationParticipant|null} [segmentParticipant] TranscriptSegment segmentParticipant + * @property {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IDialogflowSegmentMetadata|null} [dialogflowSegmentMetadata] TranscriptSegment dialogflowSegmentMetadata + * @property {google.cloud.contactcenterinsights.v1.ISentimentData|null} [sentiment] TranscriptSegment sentiment + */ + + /** + * Constructs a new TranscriptSegment. + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript + * @classdesc Represents a TranscriptSegment. + * @implements ITranscriptSegment + * @constructor + * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.ITranscriptSegment=} [properties] Properties to set + */ + function TranscriptSegment(properties) { + this.words = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TranscriptSegment messageTime. + * @member {google.protobuf.ITimestamp|null|undefined} messageTime + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @instance + */ + TranscriptSegment.prototype.messageTime = null; + + /** + * TranscriptSegment text. + * @member {string} text + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @instance + */ + TranscriptSegment.prototype.text = ""; + + /** + * TranscriptSegment confidence. + * @member {number} confidence + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @instance + */ + TranscriptSegment.prototype.confidence = 0; + + /** + * TranscriptSegment words. + * @member {Array.} words + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @instance + */ + TranscriptSegment.prototype.words = $util.emptyArray; + + /** + * TranscriptSegment languageCode. + * @member {string} languageCode + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @instance + */ + TranscriptSegment.prototype.languageCode = ""; + + /** + * TranscriptSegment channelTag. + * @member {number} channelTag + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @instance + */ + TranscriptSegment.prototype.channelTag = 0; + + /** + * TranscriptSegment segmentParticipant. + * @member {google.cloud.contactcenterinsights.v1.IConversationParticipant|null|undefined} segmentParticipant + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @instance + */ + TranscriptSegment.prototype.segmentParticipant = null; + + /** + * TranscriptSegment dialogflowSegmentMetadata. + * @member {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IDialogflowSegmentMetadata|null|undefined} dialogflowSegmentMetadata + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @instance + */ + TranscriptSegment.prototype.dialogflowSegmentMetadata = null; + + /** + * TranscriptSegment sentiment. + * @member {google.cloud.contactcenterinsights.v1.ISentimentData|null|undefined} sentiment + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @instance + */ + TranscriptSegment.prototype.sentiment = null; + + /** + * Creates a new TranscriptSegment instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.ITranscriptSegment=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment} TranscriptSegment instance + */ + TranscriptSegment.create = function create(properties) { + return new TranscriptSegment(properties); + }; + + /** + * Encodes the specified TranscriptSegment message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.ITranscriptSegment} message TranscriptSegment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TranscriptSegment.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.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence); + if (message.words != null && message.words.length) + for (var i = 0; i < message.words.length; ++i) + $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo.encode(message.words[i], 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.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.channelTag); + if (message.messageTime != null && Object.hasOwnProperty.call(message, "messageTime")) + $root.google.protobuf.Timestamp.encode(message.messageTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.segmentParticipant != null && Object.hasOwnProperty.call(message, "segmentParticipant")) + $root.google.cloud.contactcenterinsights.v1.ConversationParticipant.encode(message.segmentParticipant, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.dialogflowSegmentMetadata != null && Object.hasOwnProperty.call(message, "dialogflowSegmentMetadata")) + $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata.encode(message.dialogflowSegmentMetadata, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.sentiment != null && Object.hasOwnProperty.call(message, "sentiment")) + $root.google.cloud.contactcenterinsights.v1.SentimentData.encode(message.sentiment, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TranscriptSegment message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.ITranscriptSegment} message TranscriptSegment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TranscriptSegment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TranscriptSegment message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment} TranscriptSegment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TranscriptSegment.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 6: { + message.messageTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 1: { + message.text = reader.string(); + break; + } + case 2: { + message.confidence = reader.float(); + break; + } + case 3: { + if (!(message.words && message.words.length)) + message.words = []; + message.words.push($root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo.decode(reader, reader.uint32())); + break; + } + case 4: { + message.languageCode = reader.string(); + break; + } + case 5: { + message.channelTag = reader.int32(); + break; + } + case 9: { + message.segmentParticipant = $root.google.cloud.contactcenterinsights.v1.ConversationParticipant.decode(reader, reader.uint32()); + break; + } + case 10: { + message.dialogflowSegmentMetadata = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata.decode(reader, reader.uint32()); + break; + } + case 11: { + message.sentiment = $root.google.cloud.contactcenterinsights.v1.SentimentData.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TranscriptSegment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment} TranscriptSegment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TranscriptSegment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TranscriptSegment message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TranscriptSegment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageTime != null && message.hasOwnProperty("messageTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.messageTime); + if (error) + return "messageTime." + error; + } + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + if (message.confidence != null && message.hasOwnProperty("confidence")) + if (typeof message.confidence !== "number") + return "confidence: number expected"; + if (message.words != null && message.hasOwnProperty("words")) { + if (!Array.isArray(message.words)) + return "words: array expected"; + for (var i = 0; i < message.words.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo.verify(message.words[i]); + if (error) + return "words." + error; + } + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.channelTag != null && message.hasOwnProperty("channelTag")) + if (!$util.isInteger(message.channelTag)) + return "channelTag: integer expected"; + if (message.segmentParticipant != null && message.hasOwnProperty("segmentParticipant")) { + var error = $root.google.cloud.contactcenterinsights.v1.ConversationParticipant.verify(message.segmentParticipant); + if (error) + return "segmentParticipant." + error; + } + if (message.dialogflowSegmentMetadata != null && message.hasOwnProperty("dialogflowSegmentMetadata")) { + var error = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata.verify(message.dialogflowSegmentMetadata); + if (error) + return "dialogflowSegmentMetadata." + error; + } + if (message.sentiment != null && message.hasOwnProperty("sentiment")) { + var error = $root.google.cloud.contactcenterinsights.v1.SentimentData.verify(message.sentiment); + if (error) + return "sentiment." + error; + } + return null; + }; + + /** + * Creates a TranscriptSegment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment} TranscriptSegment + */ + TranscriptSegment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment(); + if (object.messageTime != null) { + if (typeof object.messageTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.messageTime: object expected"); + message.messageTime = $root.google.protobuf.Timestamp.fromObject(object.messageTime); + } + if (object.text != null) + message.text = String(object.text); + if (object.confidence != null) + message.confidence = Number(object.confidence); + if (object.words) { + if (!Array.isArray(object.words)) + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.words: array expected"); + message.words = []; + for (var i = 0; i < object.words.length; ++i) { + if (typeof object.words[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.words: object expected"); + message.words[i] = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo.fromObject(object.words[i]); + } + } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.channelTag != null) + message.channelTag = object.channelTag | 0; + if (object.segmentParticipant != null) { + if (typeof object.segmentParticipant !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.segmentParticipant: object expected"); + message.segmentParticipant = $root.google.cloud.contactcenterinsights.v1.ConversationParticipant.fromObject(object.segmentParticipant); + } + if (object.dialogflowSegmentMetadata != null) { + if (typeof object.dialogflowSegmentMetadata !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.dialogflowSegmentMetadata: object expected"); + message.dialogflowSegmentMetadata = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata.fromObject(object.dialogflowSegmentMetadata); + } + if (object.sentiment != null) { + if (typeof object.sentiment !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.sentiment: object expected"); + message.sentiment = $root.google.cloud.contactcenterinsights.v1.SentimentData.fromObject(object.sentiment); + } + return message; + }; + + /** + * Creates a plain object from a TranscriptSegment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment} message TranscriptSegment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TranscriptSegment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.words = []; + if (options.defaults) { + object.text = ""; + object.confidence = 0; + object.languageCode = ""; + object.channelTag = 0; + object.messageTime = null; + object.segmentParticipant = null; + object.dialogflowSegmentMetadata = null; + object.sentiment = null; + } + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + if (message.confidence != null && message.hasOwnProperty("confidence")) + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; + if (message.words && message.words.length) { + object.words = []; + for (var j = 0; j < message.words.length; ++j) + object.words[j] = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo.toObject(message.words[j], options); + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.channelTag != null && message.hasOwnProperty("channelTag")) + object.channelTag = message.channelTag; + if (message.messageTime != null && message.hasOwnProperty("messageTime")) + object.messageTime = $root.google.protobuf.Timestamp.toObject(message.messageTime, options); + if (message.segmentParticipant != null && message.hasOwnProperty("segmentParticipant")) + object.segmentParticipant = $root.google.cloud.contactcenterinsights.v1.ConversationParticipant.toObject(message.segmentParticipant, options); + if (message.dialogflowSegmentMetadata != null && message.hasOwnProperty("dialogflowSegmentMetadata")) + object.dialogflowSegmentMetadata = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata.toObject(message.dialogflowSegmentMetadata, options); + if (message.sentiment != null && message.hasOwnProperty("sentiment")) + object.sentiment = $root.google.cloud.contactcenterinsights.v1.SentimentData.toObject(message.sentiment, options); + return object; + }; + + /** + * Converts this TranscriptSegment to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @instance + * @returns {Object.} JSON object + */ + TranscriptSegment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TranscriptSegment + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TranscriptSegment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment"; + }; + + TranscriptSegment.WordInfo = (function() { + + /** + * Properties of a WordInfo. + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @interface IWordInfo + * @property {google.protobuf.IDuration|null} [startOffset] WordInfo startOffset + * @property {google.protobuf.IDuration|null} [endOffset] WordInfo endOffset + * @property {string|null} [word] WordInfo word + * @property {number|null} [confidence] WordInfo confidence + */ + + /** + * Constructs a new WordInfo. + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @classdesc Represents a WordInfo. + * @implements IWordInfo + * @constructor + * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IWordInfo=} [properties] Properties to set + */ + function WordInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WordInfo startOffset. + * @member {google.protobuf.IDuration|null|undefined} startOffset + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo + * @instance + */ + WordInfo.prototype.startOffset = null; + + /** + * WordInfo endOffset. + * @member {google.protobuf.IDuration|null|undefined} endOffset + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo + * @instance + */ + WordInfo.prototype.endOffset = null; + + /** + * WordInfo word. + * @member {string} word + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo + * @instance + */ + WordInfo.prototype.word = ""; + + /** * WordInfo confidence. * @member {number} confidence * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo * @instance */ - WordInfo.prototype.confidence = 0; + WordInfo.prototype.confidence = 0; + + /** + * Creates a new WordInfo instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IWordInfo=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo} WordInfo instance + */ + WordInfo.create = function create(properties) { + return new WordInfo(properties); + }; + + /** + * Encodes the specified WordInfo message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IWordInfo} message WordInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WordInfo.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); + return writer; + }; + + /** + * Encodes the specified WordInfo message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IWordInfo} message WordInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WordInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WordInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo} WordInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WordInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.startOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 3: { + message.word = reader.string(); + break; + } + case 4: { + message.confidence = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WordInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo} WordInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WordInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WordInfo message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WordInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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.word != null && message.hasOwnProperty("word")) + if (!$util.isString(message.word)) + return "word: string expected"; + if (message.confidence != null && message.hasOwnProperty("confidence")) + if (typeof message.confidence !== "number") + return "confidence: number expected"; + return null; + }; + + /** + * Creates a WordInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo} WordInfo + */ + WordInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo(); + if (object.startOffset != null) { + if (typeof object.startOffset !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo.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.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo.endOffset: object expected"); + message.endOffset = $root.google.protobuf.Duration.fromObject(object.endOffset); + } + if (object.word != null) + message.word = String(object.word); + if (object.confidence != null) + message.confidence = Number(object.confidence); + return message; + }; + + /** + * Creates a plain object from a WordInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo} message WordInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WordInfo.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.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 WordInfo to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo + * @instance + * @returns {Object.} JSON object + */ + WordInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WordInfo + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WordInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo"; + }; + + return WordInfo; + })(); + + TranscriptSegment.DialogflowSegmentMetadata = (function() { + + /** + * Properties of a DialogflowSegmentMetadata. + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @interface IDialogflowSegmentMetadata + * @property {boolean|null} [smartReplyAllowlistCovered] DialogflowSegmentMetadata smartReplyAllowlistCovered + */ + + /** + * Constructs a new DialogflowSegmentMetadata. + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment + * @classdesc Represents a DialogflowSegmentMetadata. + * @implements IDialogflowSegmentMetadata + * @constructor + * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IDialogflowSegmentMetadata=} [properties] Properties to set + */ + function DialogflowSegmentMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DialogflowSegmentMetadata smartReplyAllowlistCovered. + * @member {boolean} smartReplyAllowlistCovered + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata + * @instance + */ + DialogflowSegmentMetadata.prototype.smartReplyAllowlistCovered = false; + + /** + * Creates a new DialogflowSegmentMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IDialogflowSegmentMetadata=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata} DialogflowSegmentMetadata instance + */ + DialogflowSegmentMetadata.create = function create(properties) { + return new DialogflowSegmentMetadata(properties); + }; + + /** + * Encodes the specified DialogflowSegmentMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IDialogflowSegmentMetadata} message DialogflowSegmentMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DialogflowSegmentMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.smartReplyAllowlistCovered != null && Object.hasOwnProperty.call(message, "smartReplyAllowlistCovered")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.smartReplyAllowlistCovered); + return writer; + }; + + /** + * Encodes the specified DialogflowSegmentMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IDialogflowSegmentMetadata} message DialogflowSegmentMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DialogflowSegmentMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DialogflowSegmentMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata} DialogflowSegmentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DialogflowSegmentMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.smartReplyAllowlistCovered = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DialogflowSegmentMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata} DialogflowSegmentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DialogflowSegmentMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DialogflowSegmentMetadata message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DialogflowSegmentMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.smartReplyAllowlistCovered != null && message.hasOwnProperty("smartReplyAllowlistCovered")) + if (typeof message.smartReplyAllowlistCovered !== "boolean") + return "smartReplyAllowlistCovered: boolean expected"; + return null; + }; + + /** + * Creates a DialogflowSegmentMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata} DialogflowSegmentMetadata + */ + DialogflowSegmentMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata(); + if (object.smartReplyAllowlistCovered != null) + message.smartReplyAllowlistCovered = Boolean(object.smartReplyAllowlistCovered); + return message; + }; + + /** + * Creates a plain object from a DialogflowSegmentMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata} message DialogflowSegmentMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DialogflowSegmentMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.smartReplyAllowlistCovered = false; + if (message.smartReplyAllowlistCovered != null && message.hasOwnProperty("smartReplyAllowlistCovered")) + object.smartReplyAllowlistCovered = message.smartReplyAllowlistCovered; + return object; + }; + + /** + * Converts this DialogflowSegmentMetadata to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata + * @instance + * @returns {Object.} JSON object + */ + DialogflowSegmentMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DialogflowSegmentMetadata + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DialogflowSegmentMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata"; + }; + + return DialogflowSegmentMetadata; + })(); + + return TranscriptSegment; + })(); + + return Transcript; + })(); + + /** + * Medium enum. + * @name google.cloud.contactcenterinsights.v1.Conversation.Medium + * @enum {number} + * @property {number} MEDIUM_UNSPECIFIED=0 MEDIUM_UNSPECIFIED value + * @property {number} PHONE_CALL=1 PHONE_CALL value + * @property {number} CHAT=2 CHAT value + */ + Conversation.Medium = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MEDIUM_UNSPECIFIED"] = 0; + values[valuesById[1] = "PHONE_CALL"] = 1; + values[valuesById[2] = "CHAT"] = 2; + return values; + })(); + + return Conversation; + })(); + + v1.Analysis = (function() { + + /** + * Properties of an Analysis. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IAnalysis + * @property {string|null} [name] Analysis name + * @property {google.protobuf.ITimestamp|null} [requestTime] Analysis requestTime + * @property {google.protobuf.ITimestamp|null} [createTime] Analysis createTime + * @property {google.cloud.contactcenterinsights.v1.IAnalysisResult|null} [analysisResult] Analysis analysisResult + * @property {google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null} [annotatorSelector] Analysis annotatorSelector + */ + + /** + * Constructs a new Analysis. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an Analysis. + * @implements IAnalysis + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IAnalysis=} [properties] Properties to set + */ + function Analysis(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Analysis name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @instance + */ + Analysis.prototype.name = ""; + + /** + * Analysis requestTime. + * @member {google.protobuf.ITimestamp|null|undefined} requestTime + * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @instance + */ + Analysis.prototype.requestTime = null; + + /** + * Analysis createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @instance + */ + Analysis.prototype.createTime = null; + + /** + * Analysis analysisResult. + * @member {google.cloud.contactcenterinsights.v1.IAnalysisResult|null|undefined} analysisResult + * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @instance + */ + Analysis.prototype.analysisResult = null; + + /** + * Analysis annotatorSelector. + * @member {google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null|undefined} annotatorSelector + * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @instance + */ + Analysis.prototype.annotatorSelector = null; + + /** + * Creates a new Analysis instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @static + * @param {google.cloud.contactcenterinsights.v1.IAnalysis=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.Analysis} Analysis instance + */ + Analysis.create = function create(properties) { + return new Analysis(properties); + }; + + /** + * Encodes the specified Analysis message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Analysis.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @static + * @param {google.cloud.contactcenterinsights.v1.IAnalysis} message Analysis message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Analysis.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.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) + $root.google.protobuf.Timestamp.encode(message.requestTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.analysisResult != null && Object.hasOwnProperty.call(message, "analysisResult")) + $root.google.cloud.contactcenterinsights.v1.AnalysisResult.encode(message.analysisResult, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.annotatorSelector != null && Object.hasOwnProperty.call(message, "annotatorSelector")) + $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.encode(message.annotatorSelector, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Analysis message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Analysis.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @static + * @param {google.cloud.contactcenterinsights.v1.IAnalysis} message Analysis message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Analysis.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Analysis message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.Analysis} Analysis + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Analysis.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Analysis(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.requestTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.analysisResult = $root.google.cloud.contactcenterinsights.v1.AnalysisResult.decode(reader, reader.uint32()); + break; + } + case 8: { + message.annotatorSelector = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Analysis message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.Analysis} Analysis + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Analysis.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Analysis message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Analysis.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.requestTime != null && message.hasOwnProperty("requestTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.requestTime); + if (error) + return "requestTime." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.analysisResult != null && message.hasOwnProperty("analysisResult")) { + var error = $root.google.cloud.contactcenterinsights.v1.AnalysisResult.verify(message.analysisResult); + if (error) + return "analysisResult." + error; + } + if (message.annotatorSelector != null && message.hasOwnProperty("annotatorSelector")) { + var error = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.verify(message.annotatorSelector); + if (error) + return "annotatorSelector." + error; + } + return null; + }; + + /** + * Creates an Analysis message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.Analysis} Analysis + */ + Analysis.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.Analysis) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.Analysis(); + if (object.name != null) + message.name = String(object.name); + if (object.requestTime != null) { + if (typeof object.requestTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Analysis.requestTime: object expected"); + message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Analysis.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.analysisResult != null) { + if (typeof object.analysisResult !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Analysis.analysisResult: object expected"); + message.analysisResult = $root.google.cloud.contactcenterinsights.v1.AnalysisResult.fromObject(object.analysisResult); + } + if (object.annotatorSelector != null) { + if (typeof object.annotatorSelector !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Analysis.annotatorSelector: object expected"); + message.annotatorSelector = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.fromObject(object.annotatorSelector); + } + return message; + }; + + /** + * Creates a plain object from an Analysis message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @static + * @param {google.cloud.contactcenterinsights.v1.Analysis} message Analysis + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Analysis.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.requestTime = null; + object.createTime = null; + object.analysisResult = null; + object.annotatorSelector = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestTime != null && message.hasOwnProperty("requestTime")) + object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.analysisResult != null && message.hasOwnProperty("analysisResult")) + object.analysisResult = $root.google.cloud.contactcenterinsights.v1.AnalysisResult.toObject(message.analysisResult, options); + if (message.annotatorSelector != null && message.hasOwnProperty("annotatorSelector")) + object.annotatorSelector = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.toObject(message.annotatorSelector, options); + return object; + }; + + /** + * Converts this Analysis to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @instance + * @returns {Object.} JSON object + */ + Analysis.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Analysis + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Analysis.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Analysis"; + }; + + return Analysis; + })(); + + v1.ConversationDataSource = (function() { + + /** + * Properties of a ConversationDataSource. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IConversationDataSource + * @property {google.cloud.contactcenterinsights.v1.IGcsSource|null} [gcsSource] ConversationDataSource gcsSource + * @property {google.cloud.contactcenterinsights.v1.IDialogflowSource|null} [dialogflowSource] ConversationDataSource dialogflowSource + */ + + /** + * Constructs a new ConversationDataSource. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ConversationDataSource. + * @implements IConversationDataSource + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IConversationDataSource=} [properties] Properties to set + */ + function ConversationDataSource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConversationDataSource gcsSource. + * @member {google.cloud.contactcenterinsights.v1.IGcsSource|null|undefined} gcsSource + * @memberof google.cloud.contactcenterinsights.v1.ConversationDataSource + * @instance + */ + ConversationDataSource.prototype.gcsSource = null; + + /** + * ConversationDataSource dialogflowSource. + * @member {google.cloud.contactcenterinsights.v1.IDialogflowSource|null|undefined} dialogflowSource + * @memberof google.cloud.contactcenterinsights.v1.ConversationDataSource + * @instance + */ + ConversationDataSource.prototype.dialogflowSource = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ConversationDataSource source. + * @member {"gcsSource"|"dialogflowSource"|undefined} source + * @memberof google.cloud.contactcenterinsights.v1.ConversationDataSource + * @instance + */ + Object.defineProperty(ConversationDataSource.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["gcsSource", "dialogflowSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ConversationDataSource instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ConversationDataSource + * @static + * @param {google.cloud.contactcenterinsights.v1.IConversationDataSource=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ConversationDataSource} ConversationDataSource instance + */ + ConversationDataSource.create = function create(properties) { + return new ConversationDataSource(properties); + }; + + /** + * Encodes the specified ConversationDataSource message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationDataSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ConversationDataSource + * @static + * @param {google.cloud.contactcenterinsights.v1.IConversationDataSource} message ConversationDataSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationDataSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) + $root.google.cloud.contactcenterinsights.v1.GcsSource.encode(message.gcsSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.dialogflowSource != null && Object.hasOwnProperty.call(message, "dialogflowSource")) + $root.google.cloud.contactcenterinsights.v1.DialogflowSource.encode(message.dialogflowSource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ConversationDataSource message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationDataSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ConversationDataSource + * @static + * @param {google.cloud.contactcenterinsights.v1.IConversationDataSource} message ConversationDataSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationDataSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConversationDataSource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ConversationDataSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ConversationDataSource} ConversationDataSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationDataSource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ConversationDataSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.gcsSource = $root.google.cloud.contactcenterinsights.v1.GcsSource.decode(reader, reader.uint32()); + break; + } + case 3: { + message.dialogflowSource = $root.google.cloud.contactcenterinsights.v1.DialogflowSource.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConversationDataSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ConversationDataSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ConversationDataSource} ConversationDataSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationDataSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConversationDataSource message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ConversationDataSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConversationDataSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + properties.source = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.GcsSource.verify(message.gcsSource); + if (error) + return "gcsSource." + error; + } + } + if (message.dialogflowSource != null && message.hasOwnProperty("dialogflowSource")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.DialogflowSource.verify(message.dialogflowSource); + if (error) + return "dialogflowSource." + error; + } + } + return null; + }; + + /** + * Creates a ConversationDataSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ConversationDataSource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ConversationDataSource} ConversationDataSource + */ + ConversationDataSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ConversationDataSource) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ConversationDataSource(); + if (object.gcsSource != null) { + if (typeof object.gcsSource !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ConversationDataSource.gcsSource: object expected"); + message.gcsSource = $root.google.cloud.contactcenterinsights.v1.GcsSource.fromObject(object.gcsSource); + } + if (object.dialogflowSource != null) { + if (typeof object.dialogflowSource !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ConversationDataSource.dialogflowSource: object expected"); + message.dialogflowSource = $root.google.cloud.contactcenterinsights.v1.DialogflowSource.fromObject(object.dialogflowSource); + } + return message; + }; + + /** + * Creates a plain object from a ConversationDataSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ConversationDataSource + * @static + * @param {google.cloud.contactcenterinsights.v1.ConversationDataSource} message ConversationDataSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConversationDataSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + object.gcsSource = $root.google.cloud.contactcenterinsights.v1.GcsSource.toObject(message.gcsSource, options); + if (options.oneofs) + object.source = "gcsSource"; + } + if (message.dialogflowSource != null && message.hasOwnProperty("dialogflowSource")) { + object.dialogflowSource = $root.google.cloud.contactcenterinsights.v1.DialogflowSource.toObject(message.dialogflowSource, options); + if (options.oneofs) + object.source = "dialogflowSource"; + } + return object; + }; + + /** + * Converts this ConversationDataSource to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ConversationDataSource + * @instance + * @returns {Object.} JSON object + */ + ConversationDataSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConversationDataSource + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ConversationDataSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConversationDataSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ConversationDataSource"; + }; + + return ConversationDataSource; + })(); + + v1.GcsSource = (function() { + + /** + * Properties of a GcsSource. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IGcsSource + * @property {string|null} [audioUri] GcsSource audioUri + * @property {string|null} [transcriptUri] GcsSource transcriptUri + */ + + /** + * Constructs a new GcsSource. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a GcsSource. + * @implements IGcsSource + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IGcsSource=} [properties] Properties to set + */ + function GcsSource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GcsSource audioUri. + * @member {string} audioUri + * @memberof google.cloud.contactcenterinsights.v1.GcsSource + * @instance + */ + GcsSource.prototype.audioUri = ""; + + /** + * GcsSource transcriptUri. + * @member {string} transcriptUri + * @memberof google.cloud.contactcenterinsights.v1.GcsSource + * @instance + */ + GcsSource.prototype.transcriptUri = ""; + + /** + * Creates a new GcsSource instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.GcsSource + * @static + * @param {google.cloud.contactcenterinsights.v1.IGcsSource=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.GcsSource} GcsSource instance + */ + GcsSource.create = function create(properties) { + return new GcsSource(properties); + }; + + /** + * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GcsSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.GcsSource + * @static + * @param {google.cloud.contactcenterinsights.v1.IGcsSource} message GcsSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsSource.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.transcriptUri != null && Object.hasOwnProperty.call(message, "transcriptUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.transcriptUri); + return writer; + }; + + /** + * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GcsSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.GcsSource + * @static + * @param {google.cloud.contactcenterinsights.v1.IGcsSource} message GcsSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GcsSource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.GcsSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.GcsSource} GcsSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsSource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.GcsSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.audioUri = reader.string(); + break; + } + case 2: { + message.transcriptUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GcsSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.GcsSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.GcsSource} GcsSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GcsSource message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.GcsSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcsSource.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.transcriptUri != null && message.hasOwnProperty("transcriptUri")) + if (!$util.isString(message.transcriptUri)) + return "transcriptUri: string expected"; + return null; + }; + + /** + * Creates a GcsSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.GcsSource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.GcsSource} GcsSource + */ + GcsSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.GcsSource) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.GcsSource(); + if (object.audioUri != null) + message.audioUri = String(object.audioUri); + if (object.transcriptUri != null) + message.transcriptUri = String(object.transcriptUri); + return message; + }; + + /** + * Creates a plain object from a GcsSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.GcsSource + * @static + * @param {google.cloud.contactcenterinsights.v1.GcsSource} message GcsSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcsSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.audioUri = ""; + object.transcriptUri = ""; + } + if (message.audioUri != null && message.hasOwnProperty("audioUri")) + object.audioUri = message.audioUri; + if (message.transcriptUri != null && message.hasOwnProperty("transcriptUri")) + object.transcriptUri = message.transcriptUri; + return object; + }; + + /** + * Converts this GcsSource to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.GcsSource + * @instance + * @returns {Object.} JSON object + */ + GcsSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GcsSource + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.GcsSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GcsSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.GcsSource"; + }; + + return GcsSource; + })(); + + v1.DialogflowSource = (function() { + + /** + * Properties of a DialogflowSource. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IDialogflowSource + * @property {string|null} [dialogflowConversation] DialogflowSource dialogflowConversation + * @property {string|null} [audioUri] DialogflowSource audioUri + */ + + /** + * Constructs a new DialogflowSource. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a DialogflowSource. + * @implements IDialogflowSource + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IDialogflowSource=} [properties] Properties to set + */ + function DialogflowSource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DialogflowSource dialogflowConversation. + * @member {string} dialogflowConversation + * @memberof google.cloud.contactcenterinsights.v1.DialogflowSource + * @instance + */ + DialogflowSource.prototype.dialogflowConversation = ""; + + /** + * DialogflowSource audioUri. + * @member {string} audioUri + * @memberof google.cloud.contactcenterinsights.v1.DialogflowSource + * @instance + */ + DialogflowSource.prototype.audioUri = ""; + + /** + * Creates a new DialogflowSource instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.DialogflowSource + * @static + * @param {google.cloud.contactcenterinsights.v1.IDialogflowSource=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.DialogflowSource} DialogflowSource instance + */ + DialogflowSource.create = function create(properties) { + return new DialogflowSource(properties); + }; + + /** + * Encodes the specified DialogflowSource message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DialogflowSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.DialogflowSource + * @static + * @param {google.cloud.contactcenterinsights.v1.IDialogflowSource} message DialogflowSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DialogflowSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dialogflowConversation != null && Object.hasOwnProperty.call(message, "dialogflowConversation")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dialogflowConversation); + if (message.audioUri != null && Object.hasOwnProperty.call(message, "audioUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.audioUri); + return writer; + }; + + /** + * Encodes the specified DialogflowSource message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DialogflowSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DialogflowSource + * @static + * @param {google.cloud.contactcenterinsights.v1.IDialogflowSource} message DialogflowSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DialogflowSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DialogflowSource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.DialogflowSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.DialogflowSource} DialogflowSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DialogflowSource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.DialogflowSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dialogflowConversation = reader.string(); + break; + } + case 3: { + message.audioUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DialogflowSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DialogflowSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.DialogflowSource} DialogflowSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DialogflowSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DialogflowSource message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.DialogflowSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DialogflowSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dialogflowConversation != null && message.hasOwnProperty("dialogflowConversation")) + if (!$util.isString(message.dialogflowConversation)) + return "dialogflowConversation: string expected"; + if (message.audioUri != null && message.hasOwnProperty("audioUri")) + if (!$util.isString(message.audioUri)) + return "audioUri: string expected"; + return null; + }; + + /** + * Creates a DialogflowSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.DialogflowSource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.DialogflowSource} DialogflowSource + */ + DialogflowSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.DialogflowSource) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.DialogflowSource(); + if (object.dialogflowConversation != null) + message.dialogflowConversation = String(object.dialogflowConversation); + if (object.audioUri != null) + message.audioUri = String(object.audioUri); + return message; + }; + + /** + * Creates a plain object from a DialogflowSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.DialogflowSource + * @static + * @param {google.cloud.contactcenterinsights.v1.DialogflowSource} message DialogflowSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DialogflowSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dialogflowConversation = ""; + object.audioUri = ""; + } + if (message.dialogflowConversation != null && message.hasOwnProperty("dialogflowConversation")) + object.dialogflowConversation = message.dialogflowConversation; + if (message.audioUri != null && message.hasOwnProperty("audioUri")) + object.audioUri = message.audioUri; + return object; + }; + + /** + * Converts this DialogflowSource to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.DialogflowSource + * @instance + * @returns {Object.} JSON object + */ + DialogflowSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DialogflowSource + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.DialogflowSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DialogflowSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.DialogflowSource"; + }; + + return DialogflowSource; + })(); + + v1.AnalysisResult = (function() { + + /** + * Properties of an AnalysisResult. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IAnalysisResult + * @property {google.cloud.contactcenterinsights.v1.AnalysisResult.ICallAnalysisMetadata|null} [callAnalysisMetadata] AnalysisResult callAnalysisMetadata + * @property {google.protobuf.ITimestamp|null} [endTime] AnalysisResult endTime + */ + + /** + * Constructs a new AnalysisResult. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an AnalysisResult. + * @implements IAnalysisResult + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IAnalysisResult=} [properties] Properties to set + */ + function AnalysisResult(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnalysisResult callAnalysisMetadata. + * @member {google.cloud.contactcenterinsights.v1.AnalysisResult.ICallAnalysisMetadata|null|undefined} callAnalysisMetadata + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @instance + */ + AnalysisResult.prototype.callAnalysisMetadata = null; + + /** + * AnalysisResult endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @instance + */ + AnalysisResult.prototype.endTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AnalysisResult metadata. + * @member {"callAnalysisMetadata"|undefined} metadata + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @instance + */ + Object.defineProperty(AnalysisResult.prototype, "metadata", { + get: $util.oneOfGetter($oneOfFields = ["callAnalysisMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AnalysisResult instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @static + * @param {google.cloud.contactcenterinsights.v1.IAnalysisResult=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.AnalysisResult} AnalysisResult instance + */ + AnalysisResult.create = function create(properties) { + return new AnalysisResult(properties); + }; + + /** + * Encodes the specified AnalysisResult message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnalysisResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @static + * @param {google.cloud.contactcenterinsights.v1.IAnalysisResult} message AnalysisResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalysisResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.callAnalysisMetadata != null && Object.hasOwnProperty.call(message, "callAnalysisMetadata")) + $root.google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.encode(message.callAnalysisMetadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AnalysisResult message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnalysisResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @static + * @param {google.cloud.contactcenterinsights.v1.IAnalysisResult} message AnalysisResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalysisResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnalysisResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.AnalysisResult} AnalysisResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalysisResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.AnalysisResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.callAnalysisMetadata = $root.google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.decode(reader, reader.uint32()); + break; + } + case 1: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnalysisResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.AnalysisResult} AnalysisResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalysisResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnalysisResult message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnalysisResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.callAnalysisMetadata != null && message.hasOwnProperty("callAnalysisMetadata")) { + properties.metadata = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.verify(message.callAnalysisMetadata); + if (error) + return "callAnalysisMetadata." + error; + } + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + return null; + }; + + /** + * Creates an AnalysisResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.AnalysisResult} AnalysisResult + */ + AnalysisResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.AnalysisResult) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.AnalysisResult(); + if (object.callAnalysisMetadata != null) { + if (typeof object.callAnalysisMetadata !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.callAnalysisMetadata: object expected"); + message.callAnalysisMetadata = $root.google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.fromObject(object.callAnalysisMetadata); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + return message; + }; + + /** + * Creates a plain object from an AnalysisResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @static + * @param {google.cloud.contactcenterinsights.v1.AnalysisResult} message AnalysisResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnalysisResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.endTime = null; + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.callAnalysisMetadata != null && message.hasOwnProperty("callAnalysisMetadata")) { + object.callAnalysisMetadata = $root.google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.toObject(message.callAnalysisMetadata, options); + if (options.oneofs) + object.metadata = "callAnalysisMetadata"; + } + return object; + }; + + /** + * Converts this AnalysisResult to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @instance + * @returns {Object.} JSON object + */ + AnalysisResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AnalysisResult + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnalysisResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.AnalysisResult"; + }; + + AnalysisResult.CallAnalysisMetadata = (function() { + + /** + * Properties of a CallAnalysisMetadata. + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @interface ICallAnalysisMetadata + * @property {Array.|null} [annotations] CallAnalysisMetadata annotations + * @property {Object.|null} [entities] CallAnalysisMetadata entities + * @property {Array.|null} [sentiments] CallAnalysisMetadata sentiments + * @property {google.cloud.contactcenterinsights.v1.IConversationLevelSilence|null} [silence] CallAnalysisMetadata silence + * @property {Object.|null} [intents] CallAnalysisMetadata intents + * @property {Object.|null} [phraseMatchers] CallAnalysisMetadata phraseMatchers + * @property {google.cloud.contactcenterinsights.v1.IIssueModelResult|null} [issueModelResult] CallAnalysisMetadata issueModelResult + * @property {Array.|null} [qaScorecardResults] CallAnalysisMetadata qaScorecardResults + */ + + /** + * Constructs a new CallAnalysisMetadata. + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @classdesc Represents a CallAnalysisMetadata. + * @implements ICallAnalysisMetadata + * @constructor + * @param {google.cloud.contactcenterinsights.v1.AnalysisResult.ICallAnalysisMetadata=} [properties] Properties to set + */ + function CallAnalysisMetadata(properties) { + this.annotations = []; + this.entities = {}; + this.sentiments = []; + this.intents = {}; + this.phraseMatchers = {}; + this.qaScorecardResults = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CallAnalysisMetadata annotations. + * @member {Array.} annotations + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata + * @instance + */ + CallAnalysisMetadata.prototype.annotations = $util.emptyArray; + + /** + * CallAnalysisMetadata entities. + * @member {Object.} entities + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata + * @instance + */ + CallAnalysisMetadata.prototype.entities = $util.emptyObject; + + /** + * CallAnalysisMetadata sentiments. + * @member {Array.} sentiments + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata + * @instance + */ + CallAnalysisMetadata.prototype.sentiments = $util.emptyArray; + + /** + * CallAnalysisMetadata silence. + * @member {google.cloud.contactcenterinsights.v1.IConversationLevelSilence|null|undefined} silence + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata + * @instance + */ + CallAnalysisMetadata.prototype.silence = null; + + /** + * CallAnalysisMetadata intents. + * @member {Object.} intents + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata + * @instance + */ + CallAnalysisMetadata.prototype.intents = $util.emptyObject; + + /** + * CallAnalysisMetadata phraseMatchers. + * @member {Object.} phraseMatchers + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata + * @instance + */ + CallAnalysisMetadata.prototype.phraseMatchers = $util.emptyObject; + + /** + * CallAnalysisMetadata issueModelResult. + * @member {google.cloud.contactcenterinsights.v1.IIssueModelResult|null|undefined} issueModelResult + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata + * @instance + */ + CallAnalysisMetadata.prototype.issueModelResult = null; + + /** + * CallAnalysisMetadata qaScorecardResults. + * @member {Array.} qaScorecardResults + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata + * @instance + */ + CallAnalysisMetadata.prototype.qaScorecardResults = $util.emptyArray; + + /** + * Creates a new CallAnalysisMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.AnalysisResult.ICallAnalysisMetadata=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata} CallAnalysisMetadata instance + */ + CallAnalysisMetadata.create = function create(properties) { + return new CallAnalysisMetadata(properties); + }; + + /** + * Encodes the specified CallAnalysisMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.AnalysisResult.ICallAnalysisMetadata} message CallAnalysisMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CallAnalysisMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotations != null && message.annotations.length) + for (var i = 0; i < message.annotations.length; ++i) + $root.google.cloud.contactcenterinsights.v1.CallAnnotation.encode(message.annotations[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.entities != null && Object.hasOwnProperty.call(message, "entities")) + for (var keys = Object.keys(message.entities), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.contactcenterinsights.v1.Entity.encode(message.entities[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.sentiments != null && message.sentiments.length) + for (var i = 0; i < message.sentiments.length; ++i) + $root.google.cloud.contactcenterinsights.v1.ConversationLevelSentiment.encode(message.sentiments[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.intents != null && Object.hasOwnProperty.call(message, "intents")) + for (var keys = Object.keys(message.intents), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.contactcenterinsights.v1.Intent.encode(message.intents[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.phraseMatchers != null && Object.hasOwnProperty.call(message, "phraseMatchers")) + for (var keys = Object.keys(message.phraseMatchers), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.contactcenterinsights.v1.PhraseMatchData.encode(message.phraseMatchers[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.issueModelResult != null && Object.hasOwnProperty.call(message, "issueModelResult")) + $root.google.cloud.contactcenterinsights.v1.IssueModelResult.encode(message.issueModelResult, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.qaScorecardResults != null && message.qaScorecardResults.length) + for (var i = 0; i < message.qaScorecardResults.length; ++i) + $root.google.cloud.contactcenterinsights.v1.QaScorecardResult.encode(message.qaScorecardResults[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.silence != null && Object.hasOwnProperty.call(message, "silence")) + $root.google.cloud.contactcenterinsights.v1.ConversationLevelSilence.encode(message.silence, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CallAnalysisMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.AnalysisResult.ICallAnalysisMetadata} message CallAnalysisMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CallAnalysisMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CallAnalysisMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata} CallAnalysisMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CallAnalysisMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.annotations && message.annotations.length)) + message.annotations = []; + message.annotations.push($root.google.cloud.contactcenterinsights.v1.CallAnnotation.decode(reader, reader.uint32())); + break; + } + case 3: { + if (message.entities === $util.emptyObject) + message.entities = {}; + 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.contactcenterinsights.v1.Entity.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.entities[key] = value; + break; + } + case 4: { + if (!(message.sentiments && message.sentiments.length)) + message.sentiments = []; + message.sentiments.push($root.google.cloud.contactcenterinsights.v1.ConversationLevelSentiment.decode(reader, reader.uint32())); + break; + } + case 11: { + message.silence = $root.google.cloud.contactcenterinsights.v1.ConversationLevelSilence.decode(reader, reader.uint32()); + break; + } + case 6: { + if (message.intents === $util.emptyObject) + message.intents = {}; + 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.contactcenterinsights.v1.Intent.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.intents[key] = value; + break; + } + case 7: { + if (message.phraseMatchers === $util.emptyObject) + message.phraseMatchers = {}; + 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.contactcenterinsights.v1.PhraseMatchData.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.phraseMatchers[key] = value; + break; + } + case 8: { + message.issueModelResult = $root.google.cloud.contactcenterinsights.v1.IssueModelResult.decode(reader, reader.uint32()); + break; + } + case 10: { + if (!(message.qaScorecardResults && message.qaScorecardResults.length)) + message.qaScorecardResults = []; + message.qaScorecardResults.push($root.google.cloud.contactcenterinsights.v1.QaScorecardResult.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CallAnalysisMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata} CallAnalysisMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CallAnalysisMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CallAnalysisMetadata message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CallAnalysisMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotations != null && message.hasOwnProperty("annotations")) { + if (!Array.isArray(message.annotations)) + return "annotations: array expected"; + for (var i = 0; i < message.annotations.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.CallAnnotation.verify(message.annotations[i]); + if (error) + return "annotations." + error; + } + } + if (message.entities != null && message.hasOwnProperty("entities")) { + if (!$util.isObject(message.entities)) + return "entities: object expected"; + var key = Object.keys(message.entities); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.Entity.verify(message.entities[key[i]]); + if (error) + return "entities." + error; + } + } + if (message.sentiments != null && message.hasOwnProperty("sentiments")) { + if (!Array.isArray(message.sentiments)) + return "sentiments: array expected"; + for (var i = 0; i < message.sentiments.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.ConversationLevelSentiment.verify(message.sentiments[i]); + if (error) + return "sentiments." + error; + } + } + if (message.silence != null && message.hasOwnProperty("silence")) { + var error = $root.google.cloud.contactcenterinsights.v1.ConversationLevelSilence.verify(message.silence); + if (error) + return "silence." + error; + } + if (message.intents != null && message.hasOwnProperty("intents")) { + if (!$util.isObject(message.intents)) + return "intents: object expected"; + var key = Object.keys(message.intents); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.Intent.verify(message.intents[key[i]]); + if (error) + return "intents." + error; + } + } + if (message.phraseMatchers != null && message.hasOwnProperty("phraseMatchers")) { + if (!$util.isObject(message.phraseMatchers)) + return "phraseMatchers: object expected"; + var key = Object.keys(message.phraseMatchers); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.PhraseMatchData.verify(message.phraseMatchers[key[i]]); + if (error) + return "phraseMatchers." + error; + } + } + if (message.issueModelResult != null && message.hasOwnProperty("issueModelResult")) { + var error = $root.google.cloud.contactcenterinsights.v1.IssueModelResult.verify(message.issueModelResult); + if (error) + return "issueModelResult." + error; + } + if (message.qaScorecardResults != null && message.hasOwnProperty("qaScorecardResults")) { + if (!Array.isArray(message.qaScorecardResults)) + return "qaScorecardResults: array expected"; + for (var i = 0; i < message.qaScorecardResults.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.QaScorecardResult.verify(message.qaScorecardResults[i]); + if (error) + return "qaScorecardResults." + error; + } + } + return null; + }; + + /** + * Creates a CallAnalysisMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata} CallAnalysisMetadata + */ + CallAnalysisMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata(); + if (object.annotations) { + if (!Array.isArray(object.annotations)) + throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.annotations: array expected"); + message.annotations = []; + for (var i = 0; i < object.annotations.length; ++i) { + if (typeof object.annotations[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.annotations: object expected"); + message.annotations[i] = $root.google.cloud.contactcenterinsights.v1.CallAnnotation.fromObject(object.annotations[i]); + } + } + if (object.entities) { + if (typeof object.entities !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.entities: object expected"); + message.entities = {}; + for (var keys = Object.keys(object.entities), i = 0; i < keys.length; ++i) { + if (typeof object.entities[keys[i]] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.entities: object expected"); + message.entities[keys[i]] = $root.google.cloud.contactcenterinsights.v1.Entity.fromObject(object.entities[keys[i]]); + } + } + if (object.sentiments) { + if (!Array.isArray(object.sentiments)) + throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.sentiments: array expected"); + message.sentiments = []; + for (var i = 0; i < object.sentiments.length; ++i) { + if (typeof object.sentiments[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.sentiments: object expected"); + message.sentiments[i] = $root.google.cloud.contactcenterinsights.v1.ConversationLevelSentiment.fromObject(object.sentiments[i]); + } + } + if (object.silence != null) { + if (typeof object.silence !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.silence: object expected"); + message.silence = $root.google.cloud.contactcenterinsights.v1.ConversationLevelSilence.fromObject(object.silence); + } + if (object.intents) { + if (typeof object.intents !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.intents: object expected"); + message.intents = {}; + for (var keys = Object.keys(object.intents), i = 0; i < keys.length; ++i) { + if (typeof object.intents[keys[i]] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.intents: object expected"); + message.intents[keys[i]] = $root.google.cloud.contactcenterinsights.v1.Intent.fromObject(object.intents[keys[i]]); + } + } + if (object.phraseMatchers) { + if (typeof object.phraseMatchers !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.phraseMatchers: object expected"); + message.phraseMatchers = {}; + for (var keys = Object.keys(object.phraseMatchers), i = 0; i < keys.length; ++i) { + if (typeof object.phraseMatchers[keys[i]] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.phraseMatchers: object expected"); + message.phraseMatchers[keys[i]] = $root.google.cloud.contactcenterinsights.v1.PhraseMatchData.fromObject(object.phraseMatchers[keys[i]]); + } + } + if (object.issueModelResult != null) { + if (typeof object.issueModelResult !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.issueModelResult: object expected"); + message.issueModelResult = $root.google.cloud.contactcenterinsights.v1.IssueModelResult.fromObject(object.issueModelResult); + } + if (object.qaScorecardResults) { + if (!Array.isArray(object.qaScorecardResults)) + throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.qaScorecardResults: array expected"); + message.qaScorecardResults = []; + for (var i = 0; i < object.qaScorecardResults.length; ++i) { + if (typeof object.qaScorecardResults[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.qaScorecardResults: object expected"); + message.qaScorecardResults[i] = $root.google.cloud.contactcenterinsights.v1.QaScorecardResult.fromObject(object.qaScorecardResults[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CallAnalysisMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata} message CallAnalysisMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CallAnalysisMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.annotations = []; + object.sentiments = []; + object.qaScorecardResults = []; + } + if (options.objects || options.defaults) { + object.entities = {}; + object.intents = {}; + object.phraseMatchers = {}; + } + if (options.defaults) { + object.issueModelResult = null; + object.silence = null; + } + if (message.annotations && message.annotations.length) { + object.annotations = []; + for (var j = 0; j < message.annotations.length; ++j) + object.annotations[j] = $root.google.cloud.contactcenterinsights.v1.CallAnnotation.toObject(message.annotations[j], options); + } + var keys2; + if (message.entities && (keys2 = Object.keys(message.entities)).length) { + object.entities = {}; + for (var j = 0; j < keys2.length; ++j) + object.entities[keys2[j]] = $root.google.cloud.contactcenterinsights.v1.Entity.toObject(message.entities[keys2[j]], options); + } + if (message.sentiments && message.sentiments.length) { + object.sentiments = []; + for (var j = 0; j < message.sentiments.length; ++j) + object.sentiments[j] = $root.google.cloud.contactcenterinsights.v1.ConversationLevelSentiment.toObject(message.sentiments[j], options); + } + if (message.intents && (keys2 = Object.keys(message.intents)).length) { + object.intents = {}; + for (var j = 0; j < keys2.length; ++j) + object.intents[keys2[j]] = $root.google.cloud.contactcenterinsights.v1.Intent.toObject(message.intents[keys2[j]], options); + } + if (message.phraseMatchers && (keys2 = Object.keys(message.phraseMatchers)).length) { + object.phraseMatchers = {}; + for (var j = 0; j < keys2.length; ++j) + object.phraseMatchers[keys2[j]] = $root.google.cloud.contactcenterinsights.v1.PhraseMatchData.toObject(message.phraseMatchers[keys2[j]], options); + } + if (message.issueModelResult != null && message.hasOwnProperty("issueModelResult")) + object.issueModelResult = $root.google.cloud.contactcenterinsights.v1.IssueModelResult.toObject(message.issueModelResult, options); + if (message.qaScorecardResults && message.qaScorecardResults.length) { + object.qaScorecardResults = []; + for (var j = 0; j < message.qaScorecardResults.length; ++j) + object.qaScorecardResults[j] = $root.google.cloud.contactcenterinsights.v1.QaScorecardResult.toObject(message.qaScorecardResults[j], options); + } + if (message.silence != null && message.hasOwnProperty("silence")) + object.silence = $root.google.cloud.contactcenterinsights.v1.ConversationLevelSilence.toObject(message.silence, options); + return object; + }; + + /** + * Converts this CallAnalysisMetadata to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata + * @instance + * @returns {Object.} JSON object + */ + CallAnalysisMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CallAnalysisMetadata + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CallAnalysisMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata"; + }; + + return CallAnalysisMetadata; + })(); + + return AnalysisResult; + })(); + + v1.IssueModelResult = (function() { + + /** + * Properties of an IssueModelResult. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IIssueModelResult + * @property {string|null} [issueModel] IssueModelResult issueModel + * @property {Array.|null} [issues] IssueModelResult issues + */ + + /** + * Constructs a new IssueModelResult. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an IssueModelResult. + * @implements IIssueModelResult + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IIssueModelResult=} [properties] Properties to set + */ + function IssueModelResult(properties) { + this.issues = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IssueModelResult issueModel. + * @member {string} issueModel + * @memberof google.cloud.contactcenterinsights.v1.IssueModelResult + * @instance + */ + IssueModelResult.prototype.issueModel = ""; + + /** + * IssueModelResult issues. + * @member {Array.} issues + * @memberof google.cloud.contactcenterinsights.v1.IssueModelResult + * @instance + */ + IssueModelResult.prototype.issues = $util.emptyArray; + + /** + * Creates a new IssueModelResult instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.IssueModelResult + * @static + * @param {google.cloud.contactcenterinsights.v1.IIssueModelResult=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.IssueModelResult} IssueModelResult instance + */ + IssueModelResult.create = function create(properties) { + return new IssueModelResult(properties); + }; + + /** + * Encodes the specified IssueModelResult message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModelResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.IssueModelResult + * @static + * @param {google.cloud.contactcenterinsights.v1.IIssueModelResult} message IssueModelResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IssueModelResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.issueModel != null && Object.hasOwnProperty.call(message, "issueModel")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.issueModel); + if (message.issues != null && message.issues.length) + for (var i = 0; i < message.issues.length; ++i) + $root.google.cloud.contactcenterinsights.v1.IssueAssignment.encode(message.issues[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified IssueModelResult message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModelResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.IssueModelResult + * @static + * @param {google.cloud.contactcenterinsights.v1.IIssueModelResult} message IssueModelResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IssueModelResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IssueModelResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.IssueModelResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.IssueModelResult} IssueModelResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IssueModelResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.IssueModelResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.issueModel = reader.string(); + break; + } + case 2: { + if (!(message.issues && message.issues.length)) + message.issues = []; + message.issues.push($root.google.cloud.contactcenterinsights.v1.IssueAssignment.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IssueModelResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.IssueModelResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.IssueModelResult} IssueModelResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IssueModelResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IssueModelResult message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.IssueModelResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IssueModelResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.issueModel != null && message.hasOwnProperty("issueModel")) + if (!$util.isString(message.issueModel)) + return "issueModel: string expected"; + if (message.issues != null && message.hasOwnProperty("issues")) { + if (!Array.isArray(message.issues)) + return "issues: array expected"; + for (var i = 0; i < message.issues.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.IssueAssignment.verify(message.issues[i]); + if (error) + return "issues." + error; + } + } + return null; + }; + + /** + * Creates an IssueModelResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.IssueModelResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.IssueModelResult} IssueModelResult + */ + IssueModelResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.IssueModelResult) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.IssueModelResult(); + if (object.issueModel != null) + message.issueModel = String(object.issueModel); + if (object.issues) { + if (!Array.isArray(object.issues)) + throw TypeError(".google.cloud.contactcenterinsights.v1.IssueModelResult.issues: array expected"); + message.issues = []; + for (var i = 0; i < object.issues.length; ++i) { + if (typeof object.issues[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.IssueModelResult.issues: object expected"); + message.issues[i] = $root.google.cloud.contactcenterinsights.v1.IssueAssignment.fromObject(object.issues[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an IssueModelResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.IssueModelResult + * @static + * @param {google.cloud.contactcenterinsights.v1.IssueModelResult} message IssueModelResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IssueModelResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.issues = []; + if (options.defaults) + object.issueModel = ""; + if (message.issueModel != null && message.hasOwnProperty("issueModel")) + object.issueModel = message.issueModel; + if (message.issues && message.issues.length) { + object.issues = []; + for (var j = 0; j < message.issues.length; ++j) + object.issues[j] = $root.google.cloud.contactcenterinsights.v1.IssueAssignment.toObject(message.issues[j], options); + } + return object; + }; + + /** + * Converts this IssueModelResult to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.IssueModelResult + * @instance + * @returns {Object.} JSON object + */ + IssueModelResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IssueModelResult + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.IssueModelResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IssueModelResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.IssueModelResult"; + }; + + return IssueModelResult; + })(); + + v1.FeedbackLabel = (function() { + + /** + * Properties of a FeedbackLabel. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IFeedbackLabel + * @property {string|null} [label] FeedbackLabel label + * @property {google.cloud.contactcenterinsights.v1.QaAnswer.IAnswerValue|null} [qaAnswerLabel] FeedbackLabel qaAnswerLabel + * @property {string|null} [name] FeedbackLabel name + * @property {string|null} [labeledResource] FeedbackLabel labeledResource + * @property {google.protobuf.ITimestamp|null} [createTime] FeedbackLabel createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] FeedbackLabel updateTime + */ + + /** + * Constructs a new FeedbackLabel. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a FeedbackLabel. + * @implements IFeedbackLabel + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IFeedbackLabel=} [properties] Properties to set + */ + function FeedbackLabel(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeedbackLabel label. + * @member {string|null|undefined} label + * @memberof google.cloud.contactcenterinsights.v1.FeedbackLabel + * @instance + */ + FeedbackLabel.prototype.label = null; + + /** + * FeedbackLabel qaAnswerLabel. + * @member {google.cloud.contactcenterinsights.v1.QaAnswer.IAnswerValue|null|undefined} qaAnswerLabel + * @memberof google.cloud.contactcenterinsights.v1.FeedbackLabel + * @instance + */ + FeedbackLabel.prototype.qaAnswerLabel = null; + + /** + * FeedbackLabel name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.FeedbackLabel + * @instance + */ + FeedbackLabel.prototype.name = ""; + + /** + * FeedbackLabel labeledResource. + * @member {string} labeledResource + * @memberof google.cloud.contactcenterinsights.v1.FeedbackLabel + * @instance + */ + FeedbackLabel.prototype.labeledResource = ""; + + /** + * FeedbackLabel createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.contactcenterinsights.v1.FeedbackLabel + * @instance + */ + FeedbackLabel.prototype.createTime = null; + + /** + * FeedbackLabel updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.contactcenterinsights.v1.FeedbackLabel + * @instance + */ + FeedbackLabel.prototype.updateTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FeedbackLabel labelType. + * @member {"label"|"qaAnswerLabel"|undefined} labelType + * @memberof google.cloud.contactcenterinsights.v1.FeedbackLabel + * @instance + */ + Object.defineProperty(FeedbackLabel.prototype, "labelType", { + get: $util.oneOfGetter($oneOfFields = ["label", "qaAnswerLabel"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FeedbackLabel instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.FeedbackLabel + * @static + * @param {google.cloud.contactcenterinsights.v1.IFeedbackLabel=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.FeedbackLabel} FeedbackLabel instance + */ + FeedbackLabel.create = function create(properties) { + return new FeedbackLabel(properties); + }; + + /** + * Encodes the specified FeedbackLabel message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.FeedbackLabel.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.FeedbackLabel + * @static + * @param {google.cloud.contactcenterinsights.v1.IFeedbackLabel} message FeedbackLabel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeedbackLabel.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.labeledResource != null && Object.hasOwnProperty.call(message, "labeledResource")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.labeledResource); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.label); + 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.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.qaAnswerLabel != null && Object.hasOwnProperty.call(message, "qaAnswerLabel")) + $root.google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue.encode(message.qaAnswerLabel, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FeedbackLabel message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.FeedbackLabel.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.FeedbackLabel + * @static + * @param {google.cloud.contactcenterinsights.v1.IFeedbackLabel} message FeedbackLabel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeedbackLabel.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeedbackLabel message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.FeedbackLabel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.FeedbackLabel} FeedbackLabel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeedbackLabel.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.FeedbackLabel(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: { + message.label = reader.string(); + break; + } + case 7: { + message.qaAnswerLabel = $root.google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue.decode(reader, reader.uint32()); + break; + } + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.labeledResource = reader.string(); + break; + } + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeedbackLabel message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.FeedbackLabel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.FeedbackLabel} FeedbackLabel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeedbackLabel.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeedbackLabel message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.FeedbackLabel + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeedbackLabel.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.label != null && message.hasOwnProperty("label")) { + properties.labelType = 1; + if (!$util.isString(message.label)) + return "label: string expected"; + } + if (message.qaAnswerLabel != null && message.hasOwnProperty("qaAnswerLabel")) { + if (properties.labelType === 1) + return "labelType: multiple values"; + properties.labelType = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue.verify(message.qaAnswerLabel); + if (error) + return "qaAnswerLabel." + error; + } + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.labeledResource != null && message.hasOwnProperty("labeledResource")) + if (!$util.isString(message.labeledResource)) + return "labeledResource: 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.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; + + /** + * Creates a FeedbackLabel message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.FeedbackLabel + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.FeedbackLabel} FeedbackLabel + */ + FeedbackLabel.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.FeedbackLabel) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.FeedbackLabel(); + if (object.label != null) + message.label = String(object.label); + if (object.qaAnswerLabel != null) { + if (typeof object.qaAnswerLabel !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.FeedbackLabel.qaAnswerLabel: object expected"); + message.qaAnswerLabel = $root.google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue.fromObject(object.qaAnswerLabel); + } + if (object.name != null) + message.name = String(object.name); + if (object.labeledResource != null) + message.labeledResource = String(object.labeledResource); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.FeedbackLabel.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.FeedbackLabel.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a FeedbackLabel message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.FeedbackLabel + * @static + * @param {google.cloud.contactcenterinsights.v1.FeedbackLabel} message FeedbackLabel + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeedbackLabel.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.labeledResource = ""; + object.createTime = null; + object.updateTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.labeledResource != null && message.hasOwnProperty("labeledResource")) + object.labeledResource = message.labeledResource; + if (message.label != null && message.hasOwnProperty("label")) { + object.label = message.label; + if (options.oneofs) + object.labelType = "label"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.qaAnswerLabel != null && message.hasOwnProperty("qaAnswerLabel")) { + object.qaAnswerLabel = $root.google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue.toObject(message.qaAnswerLabel, options); + if (options.oneofs) + object.labelType = "qaAnswerLabel"; + } + return object; + }; + + /** + * Converts this FeedbackLabel to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.FeedbackLabel + * @instance + * @returns {Object.} JSON object + */ + FeedbackLabel.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeedbackLabel + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.FeedbackLabel + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeedbackLabel.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.FeedbackLabel"; + }; + + return FeedbackLabel; + })(); + + v1.ConversationLevelSentiment = (function() { + + /** + * Properties of a ConversationLevelSentiment. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IConversationLevelSentiment + * @property {number|null} [channelTag] ConversationLevelSentiment channelTag + * @property {google.cloud.contactcenterinsights.v1.ISentimentData|null} [sentimentData] ConversationLevelSentiment sentimentData + */ + + /** + * Constructs a new ConversationLevelSentiment. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ConversationLevelSentiment. + * @implements IConversationLevelSentiment + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IConversationLevelSentiment=} [properties] Properties to set + */ + function ConversationLevelSentiment(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConversationLevelSentiment channelTag. + * @member {number} channelTag + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSentiment + * @instance + */ + ConversationLevelSentiment.prototype.channelTag = 0; + + /** + * ConversationLevelSentiment sentimentData. + * @member {google.cloud.contactcenterinsights.v1.ISentimentData|null|undefined} sentimentData + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSentiment + * @instance + */ + ConversationLevelSentiment.prototype.sentimentData = null; + + /** + * Creates a new ConversationLevelSentiment instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSentiment + * @static + * @param {google.cloud.contactcenterinsights.v1.IConversationLevelSentiment=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ConversationLevelSentiment} ConversationLevelSentiment instance + */ + ConversationLevelSentiment.create = function create(properties) { + return new ConversationLevelSentiment(properties); + }; + + /** + * Encodes the specified ConversationLevelSentiment message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationLevelSentiment.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSentiment + * @static + * @param {google.cloud.contactcenterinsights.v1.IConversationLevelSentiment} message ConversationLevelSentiment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationLevelSentiment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.channelTag); + if (message.sentimentData != null && Object.hasOwnProperty.call(message, "sentimentData")) + $root.google.cloud.contactcenterinsights.v1.SentimentData.encode(message.sentimentData, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ConversationLevelSentiment message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationLevelSentiment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSentiment + * @static + * @param {google.cloud.contactcenterinsights.v1.IConversationLevelSentiment} message ConversationLevelSentiment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationLevelSentiment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConversationLevelSentiment message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSentiment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ConversationLevelSentiment} ConversationLevelSentiment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationLevelSentiment.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ConversationLevelSentiment(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.channelTag = reader.int32(); + break; + } + case 2: { + message.sentimentData = $root.google.cloud.contactcenterinsights.v1.SentimentData.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConversationLevelSentiment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSentiment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ConversationLevelSentiment} ConversationLevelSentiment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationLevelSentiment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConversationLevelSentiment message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSentiment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConversationLevelSentiment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.channelTag != null && message.hasOwnProperty("channelTag")) + if (!$util.isInteger(message.channelTag)) + return "channelTag: integer expected"; + if (message.sentimentData != null && message.hasOwnProperty("sentimentData")) { + var error = $root.google.cloud.contactcenterinsights.v1.SentimentData.verify(message.sentimentData); + if (error) + return "sentimentData." + error; + } + return null; + }; + + /** + * Creates a ConversationLevelSentiment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSentiment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ConversationLevelSentiment} ConversationLevelSentiment + */ + ConversationLevelSentiment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ConversationLevelSentiment) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ConversationLevelSentiment(); + if (object.channelTag != null) + message.channelTag = object.channelTag | 0; + if (object.sentimentData != null) { + if (typeof object.sentimentData !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ConversationLevelSentiment.sentimentData: object expected"); + message.sentimentData = $root.google.cloud.contactcenterinsights.v1.SentimentData.fromObject(object.sentimentData); + } + return message; + }; + + /** + * Creates a plain object from a ConversationLevelSentiment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSentiment + * @static + * @param {google.cloud.contactcenterinsights.v1.ConversationLevelSentiment} message ConversationLevelSentiment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConversationLevelSentiment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.channelTag = 0; + object.sentimentData = null; + } + if (message.channelTag != null && message.hasOwnProperty("channelTag")) + object.channelTag = message.channelTag; + if (message.sentimentData != null && message.hasOwnProperty("sentimentData")) + object.sentimentData = $root.google.cloud.contactcenterinsights.v1.SentimentData.toObject(message.sentimentData, options); + return object; + }; + + /** + * Converts this ConversationLevelSentiment to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSentiment + * @instance + * @returns {Object.} JSON object + */ + ConversationLevelSentiment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConversationLevelSentiment + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSentiment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConversationLevelSentiment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ConversationLevelSentiment"; + }; + + return ConversationLevelSentiment; + })(); + + v1.ConversationLevelSilence = (function() { + + /** + * Properties of a ConversationLevelSilence. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IConversationLevelSilence + * @property {google.protobuf.IDuration|null} [silenceDuration] ConversationLevelSilence silenceDuration + * @property {number|null} [silencePercentage] ConversationLevelSilence silencePercentage + */ + + /** + * Constructs a new ConversationLevelSilence. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ConversationLevelSilence. + * @implements IConversationLevelSilence + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IConversationLevelSilence=} [properties] Properties to set + */ + function ConversationLevelSilence(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConversationLevelSilence silenceDuration. + * @member {google.protobuf.IDuration|null|undefined} silenceDuration + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSilence + * @instance + */ + ConversationLevelSilence.prototype.silenceDuration = null; + + /** + * ConversationLevelSilence silencePercentage. + * @member {number} silencePercentage + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSilence + * @instance + */ + ConversationLevelSilence.prototype.silencePercentage = 0; + + /** + * Creates a new ConversationLevelSilence instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSilence + * @static + * @param {google.cloud.contactcenterinsights.v1.IConversationLevelSilence=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ConversationLevelSilence} ConversationLevelSilence instance + */ + ConversationLevelSilence.create = function create(properties) { + return new ConversationLevelSilence(properties); + }; + + /** + * Encodes the specified ConversationLevelSilence message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationLevelSilence.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSilence + * @static + * @param {google.cloud.contactcenterinsights.v1.IConversationLevelSilence} message ConversationLevelSilence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationLevelSilence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.silenceDuration != null && Object.hasOwnProperty.call(message, "silenceDuration")) + $root.google.protobuf.Duration.encode(message.silenceDuration, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.silencePercentage != null && Object.hasOwnProperty.call(message, "silencePercentage")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.silencePercentage); + return writer; + }; + + /** + * Encodes the specified ConversationLevelSilence message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationLevelSilence.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSilence + * @static + * @param {google.cloud.contactcenterinsights.v1.IConversationLevelSilence} message ConversationLevelSilence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationLevelSilence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConversationLevelSilence message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSilence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ConversationLevelSilence} ConversationLevelSilence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationLevelSilence.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ConversationLevelSilence(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.silenceDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.silencePercentage = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConversationLevelSilence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSilence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ConversationLevelSilence} ConversationLevelSilence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationLevelSilence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConversationLevelSilence message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSilence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConversationLevelSilence.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.silenceDuration != null && message.hasOwnProperty("silenceDuration")) { + var error = $root.google.protobuf.Duration.verify(message.silenceDuration); + if (error) + return "silenceDuration." + error; + } + if (message.silencePercentage != null && message.hasOwnProperty("silencePercentage")) + if (typeof message.silencePercentage !== "number") + return "silencePercentage: number expected"; + return null; + }; + + /** + * Creates a ConversationLevelSilence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSilence + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ConversationLevelSilence} ConversationLevelSilence + */ + ConversationLevelSilence.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ConversationLevelSilence) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ConversationLevelSilence(); + if (object.silenceDuration != null) { + if (typeof object.silenceDuration !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ConversationLevelSilence.silenceDuration: object expected"); + message.silenceDuration = $root.google.protobuf.Duration.fromObject(object.silenceDuration); + } + if (object.silencePercentage != null) + message.silencePercentage = Number(object.silencePercentage); + return message; + }; + + /** + * Creates a plain object from a ConversationLevelSilence message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSilence + * @static + * @param {google.cloud.contactcenterinsights.v1.ConversationLevelSilence} message ConversationLevelSilence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConversationLevelSilence.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.silenceDuration = null; + object.silencePercentage = 0; + } + if (message.silenceDuration != null && message.hasOwnProperty("silenceDuration")) + object.silenceDuration = $root.google.protobuf.Duration.toObject(message.silenceDuration, options); + if (message.silencePercentage != null && message.hasOwnProperty("silencePercentage")) + object.silencePercentage = options.json && !isFinite(message.silencePercentage) ? String(message.silencePercentage) : message.silencePercentage; + return object; + }; + + /** + * Converts this ConversationLevelSilence to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSilence + * @instance + * @returns {Object.} JSON object + */ + ConversationLevelSilence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConversationLevelSilence + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSilence + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConversationLevelSilence.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ConversationLevelSilence"; + }; + + return ConversationLevelSilence; + })(); + + v1.IssueAssignment = (function() { + + /** + * Properties of an IssueAssignment. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IIssueAssignment + * @property {string|null} [issue] IssueAssignment issue + * @property {number|null} [score] IssueAssignment score + * @property {string|null} [displayName] IssueAssignment displayName + */ + + /** + * Constructs a new IssueAssignment. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an IssueAssignment. + * @implements IIssueAssignment + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IIssueAssignment=} [properties] Properties to set + */ + function IssueAssignment(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IssueAssignment issue. + * @member {string} issue + * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * @instance + */ + IssueAssignment.prototype.issue = ""; + + /** + * IssueAssignment score. + * @member {number} score + * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * @instance + */ + IssueAssignment.prototype.score = 0; + + /** + * IssueAssignment displayName. + * @member {string} displayName + * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * @instance + */ + IssueAssignment.prototype.displayName = ""; + + /** + * Creates a new IssueAssignment instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * @static + * @param {google.cloud.contactcenterinsights.v1.IIssueAssignment=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.IssueAssignment} IssueAssignment instance + */ + IssueAssignment.create = function create(properties) { + return new IssueAssignment(properties); + }; + + /** + * Encodes the specified IssueAssignment message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueAssignment.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * @static + * @param {google.cloud.contactcenterinsights.v1.IIssueAssignment} message IssueAssignment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IssueAssignment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.issue != null && Object.hasOwnProperty.call(message, "issue")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.issue); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.score); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + return writer; + }; + + /** + * Encodes the specified IssueAssignment message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueAssignment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * @static + * @param {google.cloud.contactcenterinsights.v1.IIssueAssignment} message IssueAssignment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IssueAssignment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IssueAssignment message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.IssueAssignment} IssueAssignment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IssueAssignment.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.IssueAssignment(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.issue = reader.string(); + break; + } + case 2: { + message.score = reader.double(); + break; + } + case 3: { + message.displayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IssueAssignment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.IssueAssignment} IssueAssignment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IssueAssignment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IssueAssignment message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IssueAssignment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.issue != null && message.hasOwnProperty("issue")) + if (!$util.isString(message.issue)) + return "issue: string expected"; + if (message.score != null && message.hasOwnProperty("score")) + if (typeof message.score !== "number") + return "score: number expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + return null; + }; + + /** + * Creates an IssueAssignment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.IssueAssignment} IssueAssignment + */ + IssueAssignment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.IssueAssignment) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.IssueAssignment(); + if (object.issue != null) + message.issue = String(object.issue); + if (object.score != null) + message.score = Number(object.score); + if (object.displayName != null) + message.displayName = String(object.displayName); + return message; + }; + + /** + * Creates a plain object from an IssueAssignment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * @static + * @param {google.cloud.contactcenterinsights.v1.IssueAssignment} message IssueAssignment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IssueAssignment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.issue = ""; + object.score = 0; + object.displayName = ""; + } + if (message.issue != null && message.hasOwnProperty("issue")) + object.issue = message.issue; + if (message.score != null && message.hasOwnProperty("score")) + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; - /** - * Creates a new WordInfo instance using the specified properties. - * @function create - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo - * @static - * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IWordInfo=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo} WordInfo instance - */ - WordInfo.create = function create(properties) { - return new WordInfo(properties); - }; + /** + * Converts this IssueAssignment to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * @instance + * @returns {Object.} JSON object + */ + IssueAssignment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Encodes the specified WordInfo message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo - * @static - * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IWordInfo} message WordInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WordInfo.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); - return writer; - }; + /** + * Gets the default type url for IssueAssignment + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IssueAssignment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.IssueAssignment"; + }; - /** - * Encodes the specified WordInfo message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo - * @static - * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IWordInfo} message WordInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WordInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + return IssueAssignment; + })(); - /** - * Decodes a WordInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo} WordInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WordInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.startOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 2: { - message.endOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 3: { - message.word = reader.string(); - break; - } - case 4: { - message.confidence = reader.float(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + v1.CallAnnotation = (function() { - /** - * Decodes a WordInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo} WordInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WordInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Properties of a CallAnnotation. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface ICallAnnotation + * @property {google.cloud.contactcenterinsights.v1.IInterruptionData|null} [interruptionData] CallAnnotation interruptionData + * @property {google.cloud.contactcenterinsights.v1.ISentimentData|null} [sentimentData] CallAnnotation sentimentData + * @property {google.cloud.contactcenterinsights.v1.ISilenceData|null} [silenceData] CallAnnotation silenceData + * @property {google.cloud.contactcenterinsights.v1.IHoldData|null} [holdData] CallAnnotation holdData + * @property {google.cloud.contactcenterinsights.v1.IEntityMentionData|null} [entityMentionData] CallAnnotation entityMentionData + * @property {google.cloud.contactcenterinsights.v1.IIntentMatchData|null} [intentMatchData] CallAnnotation intentMatchData + * @property {google.cloud.contactcenterinsights.v1.IPhraseMatchData|null} [phraseMatchData] CallAnnotation phraseMatchData + * @property {google.cloud.contactcenterinsights.v1.IIssueMatchData|null} [issueMatchData] CallAnnotation issueMatchData + * @property {number|null} [channelTag] CallAnnotation channelTag + * @property {google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null} [annotationStartBoundary] CallAnnotation annotationStartBoundary + * @property {google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null} [annotationEndBoundary] CallAnnotation annotationEndBoundary + */ - /** - * Verifies a WordInfo message. - * @function verify - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WordInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object 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.word != null && message.hasOwnProperty("word")) - if (!$util.isString(message.word)) - return "word: string expected"; - if (message.confidence != null && message.hasOwnProperty("confidence")) - if (typeof message.confidence !== "number") - return "confidence: number expected"; - return null; - }; + /** + * Constructs a new CallAnnotation. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a CallAnnotation. + * @implements ICallAnnotation + * @constructor + * @param {google.cloud.contactcenterinsights.v1.ICallAnnotation=} [properties] Properties to set + */ + function CallAnnotation(properties) { + if (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 WordInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo} WordInfo - */ - WordInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo) - return object; - var message = new $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo(); - if (object.startOffset != null) { - if (typeof object.startOffset !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo.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.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo.endOffset: object expected"); - message.endOffset = $root.google.protobuf.Duration.fromObject(object.endOffset); - } - if (object.word != null) - message.word = String(object.word); - if (object.confidence != null) - message.confidence = Number(object.confidence); - return message; - }; + /** + * CallAnnotation interruptionData. + * @member {google.cloud.contactcenterinsights.v1.IInterruptionData|null|undefined} interruptionData + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @instance + */ + CallAnnotation.prototype.interruptionData = null; - /** - * Creates a plain object from a WordInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo - * @static - * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo} message WordInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WordInfo.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.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; - }; + /** + * CallAnnotation sentimentData. + * @member {google.cloud.contactcenterinsights.v1.ISentimentData|null|undefined} sentimentData + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @instance + */ + CallAnnotation.prototype.sentimentData = null; - /** - * Converts this WordInfo to JSON. - * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo - * @instance - * @returns {Object.} JSON object - */ - WordInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * CallAnnotation silenceData. + * @member {google.cloud.contactcenterinsights.v1.ISilenceData|null|undefined} silenceData + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @instance + */ + CallAnnotation.prototype.silenceData = null; - /** - * Gets the default type url for WordInfo - * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WordInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo"; - }; + /** + * CallAnnotation holdData. + * @member {google.cloud.contactcenterinsights.v1.IHoldData|null|undefined} holdData + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @instance + */ + CallAnnotation.prototype.holdData = null; - return WordInfo; - })(); + /** + * CallAnnotation entityMentionData. + * @member {google.cloud.contactcenterinsights.v1.IEntityMentionData|null|undefined} entityMentionData + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @instance + */ + CallAnnotation.prototype.entityMentionData = null; - TranscriptSegment.DialogflowSegmentMetadata = (function() { + /** + * CallAnnotation intentMatchData. + * @member {google.cloud.contactcenterinsights.v1.IIntentMatchData|null|undefined} intentMatchData + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @instance + */ + CallAnnotation.prototype.intentMatchData = null; - /** - * Properties of a DialogflowSegmentMetadata. - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment - * @interface IDialogflowSegmentMetadata - * @property {boolean|null} [smartReplyAllowlistCovered] DialogflowSegmentMetadata smartReplyAllowlistCovered - */ + /** + * CallAnnotation phraseMatchData. + * @member {google.cloud.contactcenterinsights.v1.IPhraseMatchData|null|undefined} phraseMatchData + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @instance + */ + CallAnnotation.prototype.phraseMatchData = null; - /** - * Constructs a new DialogflowSegmentMetadata. - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment - * @classdesc Represents a DialogflowSegmentMetadata. - * @implements IDialogflowSegmentMetadata - * @constructor - * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IDialogflowSegmentMetadata=} [properties] Properties to set - */ - function DialogflowSegmentMetadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * CallAnnotation issueMatchData. + * @member {google.cloud.contactcenterinsights.v1.IIssueMatchData|null|undefined} issueMatchData + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @instance + */ + CallAnnotation.prototype.issueMatchData = null; - /** - * DialogflowSegmentMetadata smartReplyAllowlistCovered. - * @member {boolean} smartReplyAllowlistCovered - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata - * @instance - */ - DialogflowSegmentMetadata.prototype.smartReplyAllowlistCovered = false; + /** + * CallAnnotation channelTag. + * @member {number} channelTag + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @instance + */ + CallAnnotation.prototype.channelTag = 0; - /** - * Creates a new DialogflowSegmentMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata - * @static - * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IDialogflowSegmentMetadata=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata} DialogflowSegmentMetadata instance - */ - DialogflowSegmentMetadata.create = function create(properties) { - return new DialogflowSegmentMetadata(properties); - }; + /** + * CallAnnotation annotationStartBoundary. + * @member {google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null|undefined} annotationStartBoundary + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @instance + */ + CallAnnotation.prototype.annotationStartBoundary = null; - /** - * Encodes the specified DialogflowSegmentMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata - * @static - * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IDialogflowSegmentMetadata} message DialogflowSegmentMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DialogflowSegmentMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.smartReplyAllowlistCovered != null && Object.hasOwnProperty.call(message, "smartReplyAllowlistCovered")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.smartReplyAllowlistCovered); - return writer; - }; + /** + * CallAnnotation annotationEndBoundary. + * @member {google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null|undefined} annotationEndBoundary + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @instance + */ + CallAnnotation.prototype.annotationEndBoundary = null; - /** - * Encodes the specified DialogflowSegmentMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata - * @static - * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.IDialogflowSegmentMetadata} message DialogflowSegmentMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DialogflowSegmentMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Decodes a DialogflowSegmentMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata} DialogflowSegmentMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DialogflowSegmentMetadata.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.smartReplyAllowlistCovered = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * CallAnnotation data. + * @member {"interruptionData"|"sentimentData"|"silenceData"|"holdData"|"entityMentionData"|"intentMatchData"|"phraseMatchData"|"issueMatchData"|undefined} data + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @instance + */ + Object.defineProperty(CallAnnotation.prototype, "data", { + get: $util.oneOfGetter($oneOfFields = ["interruptionData", "sentimentData", "silenceData", "holdData", "entityMentionData", "intentMatchData", "phraseMatchData", "issueMatchData"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Decodes a DialogflowSegmentMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata} DialogflowSegmentMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DialogflowSegmentMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new CallAnnotation instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @static + * @param {google.cloud.contactcenterinsights.v1.ICallAnnotation=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.CallAnnotation} CallAnnotation instance + */ + CallAnnotation.create = function create(properties) { + return new CallAnnotation(properties); + }; - /** - * Verifies a DialogflowSegmentMetadata message. - * @function verify - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DialogflowSegmentMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.smartReplyAllowlistCovered != null && message.hasOwnProperty("smartReplyAllowlistCovered")) - if (typeof message.smartReplyAllowlistCovered !== "boolean") - return "smartReplyAllowlistCovered: boolean expected"; - return null; - }; + /** + * Encodes the specified CallAnnotation message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CallAnnotation.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @static + * @param {google.cloud.contactcenterinsights.v1.ICallAnnotation} message CallAnnotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CallAnnotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.channelTag); + if (message.annotationStartBoundary != null && Object.hasOwnProperty.call(message, "annotationStartBoundary")) + $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.encode(message.annotationStartBoundary, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.annotationEndBoundary != null && Object.hasOwnProperty.call(message, "annotationEndBoundary")) + $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.encode(message.annotationEndBoundary, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.interruptionData != null && Object.hasOwnProperty.call(message, "interruptionData")) + $root.google.cloud.contactcenterinsights.v1.InterruptionData.encode(message.interruptionData, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.sentimentData != null && Object.hasOwnProperty.call(message, "sentimentData")) + $root.google.cloud.contactcenterinsights.v1.SentimentData.encode(message.sentimentData, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.silenceData != null && Object.hasOwnProperty.call(message, "silenceData")) + $root.google.cloud.contactcenterinsights.v1.SilenceData.encode(message.silenceData, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.holdData != null && Object.hasOwnProperty.call(message, "holdData")) + $root.google.cloud.contactcenterinsights.v1.HoldData.encode(message.holdData, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.entityMentionData != null && Object.hasOwnProperty.call(message, "entityMentionData")) + $root.google.cloud.contactcenterinsights.v1.EntityMentionData.encode(message.entityMentionData, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.intentMatchData != null && Object.hasOwnProperty.call(message, "intentMatchData")) + $root.google.cloud.contactcenterinsights.v1.IntentMatchData.encode(message.intentMatchData, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.phraseMatchData != null && Object.hasOwnProperty.call(message, "phraseMatchData")) + $root.google.cloud.contactcenterinsights.v1.PhraseMatchData.encode(message.phraseMatchData, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.issueMatchData != null && Object.hasOwnProperty.call(message, "issueMatchData")) + $root.google.cloud.contactcenterinsights.v1.IssueMatchData.encode(message.issueMatchData, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + return writer; + }; - /** - * Creates a DialogflowSegmentMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata} DialogflowSegmentMetadata - */ - DialogflowSegmentMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata) - return object; - var message = new $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata(); - if (object.smartReplyAllowlistCovered != null) - message.smartReplyAllowlistCovered = Boolean(object.smartReplyAllowlistCovered); - return message; - }; + /** + * Encodes the specified CallAnnotation message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CallAnnotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @static + * @param {google.cloud.contactcenterinsights.v1.ICallAnnotation} message CallAnnotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CallAnnotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a plain object from a DialogflowSegmentMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata - * @static - * @param {google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata} message DialogflowSegmentMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DialogflowSegmentMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.smartReplyAllowlistCovered = false; - if (message.smartReplyAllowlistCovered != null && message.hasOwnProperty("smartReplyAllowlistCovered")) - object.smartReplyAllowlistCovered = message.smartReplyAllowlistCovered; - return object; - }; + /** + * Decodes a CallAnnotation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.CallAnnotation} CallAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CallAnnotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.CallAnnotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 10: { + message.interruptionData = $root.google.cloud.contactcenterinsights.v1.InterruptionData.decode(reader, reader.uint32()); + break; + } + case 11: { + message.sentimentData = $root.google.cloud.contactcenterinsights.v1.SentimentData.decode(reader, reader.uint32()); + break; + } + case 12: { + message.silenceData = $root.google.cloud.contactcenterinsights.v1.SilenceData.decode(reader, reader.uint32()); + break; + } + case 13: { + message.holdData = $root.google.cloud.contactcenterinsights.v1.HoldData.decode(reader, reader.uint32()); + break; + } + case 15: { + message.entityMentionData = $root.google.cloud.contactcenterinsights.v1.EntityMentionData.decode(reader, reader.uint32()); + break; + } + case 16: { + message.intentMatchData = $root.google.cloud.contactcenterinsights.v1.IntentMatchData.decode(reader, reader.uint32()); + break; + } + case 17: { + message.phraseMatchData = $root.google.cloud.contactcenterinsights.v1.PhraseMatchData.decode(reader, reader.uint32()); + break; + } + case 18: { + message.issueMatchData = $root.google.cloud.contactcenterinsights.v1.IssueMatchData.decode(reader, reader.uint32()); + break; + } + case 1: { + message.channelTag = reader.int32(); + break; + } + case 4: { + message.annotationStartBoundary = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.decode(reader, reader.uint32()); + break; + } + case 5: { + message.annotationEndBoundary = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Converts this DialogflowSegmentMetadata to JSON. - * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata - * @instance - * @returns {Object.} JSON object - */ - DialogflowSegmentMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a CallAnnotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.CallAnnotation} CallAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CallAnnotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Gets the default type url for DialogflowSegmentMetadata - * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DialogflowSegmentMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata"; - }; + /** + * Verifies a CallAnnotation message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CallAnnotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.interruptionData != null && message.hasOwnProperty("interruptionData")) { + properties.data = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.InterruptionData.verify(message.interruptionData); + if (error) + return "interruptionData." + error; + } + } + if (message.sentimentData != null && message.hasOwnProperty("sentimentData")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.SentimentData.verify(message.sentimentData); + if (error) + return "sentimentData." + error; + } + } + if (message.silenceData != null && message.hasOwnProperty("silenceData")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.SilenceData.verify(message.silenceData); + if (error) + return "silenceData." + error; + } + } + if (message.holdData != null && message.hasOwnProperty("holdData")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.HoldData.verify(message.holdData); + if (error) + return "holdData." + error; + } + } + if (message.entityMentionData != null && message.hasOwnProperty("entityMentionData")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.EntityMentionData.verify(message.entityMentionData); + if (error) + return "entityMentionData." + error; + } + } + if (message.intentMatchData != null && message.hasOwnProperty("intentMatchData")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.IntentMatchData.verify(message.intentMatchData); + if (error) + return "intentMatchData." + error; + } + } + if (message.phraseMatchData != null && message.hasOwnProperty("phraseMatchData")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.PhraseMatchData.verify(message.phraseMatchData); + if (error) + return "phraseMatchData." + error; + } + } + if (message.issueMatchData != null && message.hasOwnProperty("issueMatchData")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.IssueMatchData.verify(message.issueMatchData); + if (error) + return "issueMatchData." + error; + } + } + if (message.channelTag != null && message.hasOwnProperty("channelTag")) + if (!$util.isInteger(message.channelTag)) + return "channelTag: integer expected"; + if (message.annotationStartBoundary != null && message.hasOwnProperty("annotationStartBoundary")) { + var error = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.verify(message.annotationStartBoundary); + if (error) + return "annotationStartBoundary." + error; + } + if (message.annotationEndBoundary != null && message.hasOwnProperty("annotationEndBoundary")) { + var error = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.verify(message.annotationEndBoundary); + if (error) + return "annotationEndBoundary." + error; + } + return null; + }; - return DialogflowSegmentMetadata; - })(); + /** + * Creates a CallAnnotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.CallAnnotation} CallAnnotation + */ + CallAnnotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.CallAnnotation) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.CallAnnotation(); + if (object.interruptionData != null) { + if (typeof object.interruptionData !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CallAnnotation.interruptionData: object expected"); + message.interruptionData = $root.google.cloud.contactcenterinsights.v1.InterruptionData.fromObject(object.interruptionData); + } + if (object.sentimentData != null) { + if (typeof object.sentimentData !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CallAnnotation.sentimentData: object expected"); + message.sentimentData = $root.google.cloud.contactcenterinsights.v1.SentimentData.fromObject(object.sentimentData); + } + if (object.silenceData != null) { + if (typeof object.silenceData !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CallAnnotation.silenceData: object expected"); + message.silenceData = $root.google.cloud.contactcenterinsights.v1.SilenceData.fromObject(object.silenceData); + } + if (object.holdData != null) { + if (typeof object.holdData !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CallAnnotation.holdData: object expected"); + message.holdData = $root.google.cloud.contactcenterinsights.v1.HoldData.fromObject(object.holdData); + } + if (object.entityMentionData != null) { + if (typeof object.entityMentionData !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CallAnnotation.entityMentionData: object expected"); + message.entityMentionData = $root.google.cloud.contactcenterinsights.v1.EntityMentionData.fromObject(object.entityMentionData); + } + if (object.intentMatchData != null) { + if (typeof object.intentMatchData !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CallAnnotation.intentMatchData: object expected"); + message.intentMatchData = $root.google.cloud.contactcenterinsights.v1.IntentMatchData.fromObject(object.intentMatchData); + } + if (object.phraseMatchData != null) { + if (typeof object.phraseMatchData !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CallAnnotation.phraseMatchData: object expected"); + message.phraseMatchData = $root.google.cloud.contactcenterinsights.v1.PhraseMatchData.fromObject(object.phraseMatchData); + } + if (object.issueMatchData != null) { + if (typeof object.issueMatchData !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CallAnnotation.issueMatchData: object expected"); + message.issueMatchData = $root.google.cloud.contactcenterinsights.v1.IssueMatchData.fromObject(object.issueMatchData); + } + if (object.channelTag != null) + message.channelTag = object.channelTag | 0; + if (object.annotationStartBoundary != null) { + if (typeof object.annotationStartBoundary !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CallAnnotation.annotationStartBoundary: object expected"); + message.annotationStartBoundary = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.fromObject(object.annotationStartBoundary); + } + if (object.annotationEndBoundary != null) { + if (typeof object.annotationEndBoundary !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CallAnnotation.annotationEndBoundary: object expected"); + message.annotationEndBoundary = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.fromObject(object.annotationEndBoundary); + } + return message; + }; - return TranscriptSegment; - })(); + /** + * Creates a plain object from a CallAnnotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @static + * @param {google.cloud.contactcenterinsights.v1.CallAnnotation} message CallAnnotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CallAnnotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.channelTag = 0; + object.annotationStartBoundary = null; + object.annotationEndBoundary = null; + } + if (message.channelTag != null && message.hasOwnProperty("channelTag")) + object.channelTag = message.channelTag; + if (message.annotationStartBoundary != null && message.hasOwnProperty("annotationStartBoundary")) + object.annotationStartBoundary = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.toObject(message.annotationStartBoundary, options); + if (message.annotationEndBoundary != null && message.hasOwnProperty("annotationEndBoundary")) + object.annotationEndBoundary = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.toObject(message.annotationEndBoundary, options); + if (message.interruptionData != null && message.hasOwnProperty("interruptionData")) { + object.interruptionData = $root.google.cloud.contactcenterinsights.v1.InterruptionData.toObject(message.interruptionData, options); + if (options.oneofs) + object.data = "interruptionData"; + } + if (message.sentimentData != null && message.hasOwnProperty("sentimentData")) { + object.sentimentData = $root.google.cloud.contactcenterinsights.v1.SentimentData.toObject(message.sentimentData, options); + if (options.oneofs) + object.data = "sentimentData"; + } + if (message.silenceData != null && message.hasOwnProperty("silenceData")) { + object.silenceData = $root.google.cloud.contactcenterinsights.v1.SilenceData.toObject(message.silenceData, options); + if (options.oneofs) + object.data = "silenceData"; + } + if (message.holdData != null && message.hasOwnProperty("holdData")) { + object.holdData = $root.google.cloud.contactcenterinsights.v1.HoldData.toObject(message.holdData, options); + if (options.oneofs) + object.data = "holdData"; + } + if (message.entityMentionData != null && message.hasOwnProperty("entityMentionData")) { + object.entityMentionData = $root.google.cloud.contactcenterinsights.v1.EntityMentionData.toObject(message.entityMentionData, options); + if (options.oneofs) + object.data = "entityMentionData"; + } + if (message.intentMatchData != null && message.hasOwnProperty("intentMatchData")) { + object.intentMatchData = $root.google.cloud.contactcenterinsights.v1.IntentMatchData.toObject(message.intentMatchData, options); + if (options.oneofs) + object.data = "intentMatchData"; + } + if (message.phraseMatchData != null && message.hasOwnProperty("phraseMatchData")) { + object.phraseMatchData = $root.google.cloud.contactcenterinsights.v1.PhraseMatchData.toObject(message.phraseMatchData, options); + if (options.oneofs) + object.data = "phraseMatchData"; + } + if (message.issueMatchData != null && message.hasOwnProperty("issueMatchData")) { + object.issueMatchData = $root.google.cloud.contactcenterinsights.v1.IssueMatchData.toObject(message.issueMatchData, options); + if (options.oneofs) + object.data = "issueMatchData"; + } + return object; + }; - return Transcript; - })(); + /** + * Converts this CallAnnotation to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @instance + * @returns {Object.} JSON object + */ + CallAnnotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Medium enum. - * @name google.cloud.contactcenterinsights.v1.Conversation.Medium - * @enum {number} - * @property {number} MEDIUM_UNSPECIFIED=0 MEDIUM_UNSPECIFIED value - * @property {number} PHONE_CALL=1 PHONE_CALL value - * @property {number} CHAT=2 CHAT value + * Gets the default type url for CallAnnotation + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - Conversation.Medium = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MEDIUM_UNSPECIFIED"] = 0; - values[valuesById[1] = "PHONE_CALL"] = 1; - values[valuesById[2] = "CHAT"] = 2; - return values; - })(); + CallAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.CallAnnotation"; + }; - return Conversation; + return CallAnnotation; })(); - v1.Analysis = (function() { + v1.AnnotationBoundary = (function() { /** - * Properties of an Analysis. + * Properties of an AnnotationBoundary. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IAnalysis - * @property {string|null} [name] Analysis name - * @property {google.protobuf.ITimestamp|null} [requestTime] Analysis requestTime - * @property {google.protobuf.ITimestamp|null} [createTime] Analysis createTime - * @property {google.cloud.contactcenterinsights.v1.IAnalysisResult|null} [analysisResult] Analysis analysisResult - * @property {google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null} [annotatorSelector] Analysis annotatorSelector + * @interface IAnnotationBoundary + * @property {number|null} [wordIndex] AnnotationBoundary wordIndex + * @property {number|null} [transcriptIndex] AnnotationBoundary transcriptIndex */ /** - * Constructs a new Analysis. + * Constructs a new AnnotationBoundary. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents an Analysis. - * @implements IAnalysis + * @classdesc Represents an AnnotationBoundary. + * @implements IAnnotationBoundary * @constructor - * @param {google.cloud.contactcenterinsights.v1.IAnalysis=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IAnnotationBoundary=} [properties] Properties to set */ - function Analysis(properties) { + function AnnotationBoundary(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24587,131 +45429,103 @@ } /** - * Analysis name. - * @member {string} name - * @memberof google.cloud.contactcenterinsights.v1.Analysis - * @instance - */ - Analysis.prototype.name = ""; - - /** - * Analysis requestTime. - * @member {google.protobuf.ITimestamp|null|undefined} requestTime - * @memberof google.cloud.contactcenterinsights.v1.Analysis - * @instance - */ - Analysis.prototype.requestTime = null; - - /** - * Analysis createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.contactcenterinsights.v1.Analysis + * AnnotationBoundary wordIndex. + * @member {number|null|undefined} wordIndex + * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary * @instance */ - Analysis.prototype.createTime = null; + AnnotationBoundary.prototype.wordIndex = null; /** - * Analysis analysisResult. - * @member {google.cloud.contactcenterinsights.v1.IAnalysisResult|null|undefined} analysisResult - * @memberof google.cloud.contactcenterinsights.v1.Analysis + * AnnotationBoundary transcriptIndex. + * @member {number} transcriptIndex + * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary * @instance */ - Analysis.prototype.analysisResult = null; + AnnotationBoundary.prototype.transcriptIndex = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Analysis annotatorSelector. - * @member {google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null|undefined} annotatorSelector - * @memberof google.cloud.contactcenterinsights.v1.Analysis + * AnnotationBoundary detailedBoundary. + * @member {"wordIndex"|undefined} detailedBoundary + * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary * @instance */ - Analysis.prototype.annotatorSelector = null; + Object.defineProperty(AnnotationBoundary.prototype, "detailedBoundary", { + get: $util.oneOfGetter($oneOfFields = ["wordIndex"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new Analysis instance using the specified properties. + * Creates a new AnnotationBoundary instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary * @static - * @param {google.cloud.contactcenterinsights.v1.IAnalysis=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.Analysis} Analysis instance + * @param {google.cloud.contactcenterinsights.v1.IAnnotationBoundary=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.AnnotationBoundary} AnnotationBoundary instance */ - Analysis.create = function create(properties) { - return new Analysis(properties); + AnnotationBoundary.create = function create(properties) { + return new AnnotationBoundary(properties); }; /** - * Encodes the specified Analysis message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Analysis.verify|verify} messages. + * Encodes the specified AnnotationBoundary message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotationBoundary.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary * @static - * @param {google.cloud.contactcenterinsights.v1.IAnalysis} message Analysis message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IAnnotationBoundary} message AnnotationBoundary message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Analysis.encode = function encode(message, writer) { + AnnotationBoundary.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.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) - $root.google.protobuf.Timestamp.encode(message.requestTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.analysisResult != null && Object.hasOwnProperty.call(message, "analysisResult")) - $root.google.cloud.contactcenterinsights.v1.AnalysisResult.encode(message.analysisResult, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.annotatorSelector != null && Object.hasOwnProperty.call(message, "annotatorSelector")) - $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.encode(message.annotatorSelector, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.transcriptIndex != null && Object.hasOwnProperty.call(message, "transcriptIndex")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.transcriptIndex); + if (message.wordIndex != null && Object.hasOwnProperty.call(message, "wordIndex")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.wordIndex); return writer; }; /** - * Encodes the specified Analysis message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Analysis.verify|verify} messages. + * Encodes the specified AnnotationBoundary message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotationBoundary.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary * @static - * @param {google.cloud.contactcenterinsights.v1.IAnalysis} message Analysis message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IAnnotationBoundary} message AnnotationBoundary message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Analysis.encodeDelimited = function encodeDelimited(message, writer) { + AnnotationBoundary.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Analysis message from the specified reader or buffer. + * Decodes an AnnotationBoundary message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.Analysis} Analysis + * @returns {google.cloud.contactcenterinsights.v1.AnnotationBoundary} AnnotationBoundary * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Analysis.decode = function decode(reader, length) { + AnnotationBoundary.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Analysis(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.requestTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.analysisResult = $root.google.cloud.contactcenterinsights.v1.AnalysisResult.decode(reader, reader.uint32()); + message.wordIndex = reader.int32(); break; } - case 8: { - message.annotatorSelector = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.decode(reader, reader.uint32()); + case 1: { + message.transcriptIndex = reader.int32(); break; } default: @@ -24723,176 +45537,140 @@ }; /** - * Decodes an Analysis message from the specified reader or buffer, length delimited. + * Decodes an AnnotationBoundary message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.Analysis} Analysis + * @returns {google.cloud.contactcenterinsights.v1.AnnotationBoundary} AnnotationBoundary * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Analysis.decodeDelimited = function decodeDelimited(reader) { + AnnotationBoundary.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Analysis message. + * Verifies an AnnotationBoundary message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Analysis.verify = function verify(message) { + AnnotationBoundary.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.requestTime != null && message.hasOwnProperty("requestTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.requestTime); - if (error) - return "requestTime." + error; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.analysisResult != null && message.hasOwnProperty("analysisResult")) { - var error = $root.google.cloud.contactcenterinsights.v1.AnalysisResult.verify(message.analysisResult); - if (error) - return "analysisResult." + error; - } - if (message.annotatorSelector != null && message.hasOwnProperty("annotatorSelector")) { - var error = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.verify(message.annotatorSelector); - if (error) - return "annotatorSelector." + error; + var properties = {}; + if (message.wordIndex != null && message.hasOwnProperty("wordIndex")) { + properties.detailedBoundary = 1; + if (!$util.isInteger(message.wordIndex)) + return "wordIndex: integer expected"; } + if (message.transcriptIndex != null && message.hasOwnProperty("transcriptIndex")) + if (!$util.isInteger(message.transcriptIndex)) + return "transcriptIndex: integer expected"; return null; }; /** - * Creates an Analysis message from a plain object. Also converts values to their respective internal types. + * Creates an AnnotationBoundary message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.Analysis} Analysis + * @returns {google.cloud.contactcenterinsights.v1.AnnotationBoundary} AnnotationBoundary */ - Analysis.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.Analysis) + AnnotationBoundary.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.Analysis(); - if (object.name != null) - message.name = String(object.name); - if (object.requestTime != null) { - if (typeof object.requestTime !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Analysis.requestTime: object expected"); - message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Analysis.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.analysisResult != null) { - if (typeof object.analysisResult !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Analysis.analysisResult: object expected"); - message.analysisResult = $root.google.cloud.contactcenterinsights.v1.AnalysisResult.fromObject(object.analysisResult); - } - if (object.annotatorSelector != null) { - if (typeof object.annotatorSelector !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Analysis.annotatorSelector: object expected"); - message.annotatorSelector = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.fromObject(object.annotatorSelector); - } + var message = new $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary(); + if (object.wordIndex != null) + message.wordIndex = object.wordIndex | 0; + if (object.transcriptIndex != null) + message.transcriptIndex = object.transcriptIndex | 0; return message; }; /** - * Creates a plain object from an Analysis message. Also converts values to other types if specified. + * Creates a plain object from an AnnotationBoundary message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary * @static - * @param {google.cloud.contactcenterinsights.v1.Analysis} message Analysis + * @param {google.cloud.contactcenterinsights.v1.AnnotationBoundary} message AnnotationBoundary * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Analysis.toObject = function toObject(message, options) { + AnnotationBoundary.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.requestTime = null; - object.createTime = null; - object.analysisResult = null; - object.annotatorSelector = null; + if (options.defaults) + object.transcriptIndex = 0; + if (message.transcriptIndex != null && message.hasOwnProperty("transcriptIndex")) + object.transcriptIndex = message.transcriptIndex; + if (message.wordIndex != null && message.hasOwnProperty("wordIndex")) { + object.wordIndex = message.wordIndex; + if (options.oneofs) + object.detailedBoundary = "wordIndex"; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.requestTime != null && message.hasOwnProperty("requestTime")) - object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options); - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.analysisResult != null && message.hasOwnProperty("analysisResult")) - object.analysisResult = $root.google.cloud.contactcenterinsights.v1.AnalysisResult.toObject(message.analysisResult, options); - if (message.annotatorSelector != null && message.hasOwnProperty("annotatorSelector")) - object.annotatorSelector = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.toObject(message.annotatorSelector, options); return object; }; /** - * Converts this Analysis to JSON. + * Converts this AnnotationBoundary to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary * @instance * @returns {Object.} JSON object */ - Analysis.prototype.toJSON = function toJSON() { + AnnotationBoundary.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Analysis + * Gets the default type url for AnnotationBoundary * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Analysis.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AnnotationBoundary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Analysis"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.AnnotationBoundary"; }; - return Analysis; + return AnnotationBoundary; })(); - v1.ConversationDataSource = (function() { + v1.Entity = (function() { /** - * Properties of a ConversationDataSource. + * Properties of an Entity. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IConversationDataSource - * @property {google.cloud.contactcenterinsights.v1.IGcsSource|null} [gcsSource] ConversationDataSource gcsSource - * @property {google.cloud.contactcenterinsights.v1.IDialogflowSource|null} [dialogflowSource] ConversationDataSource dialogflowSource + * @interface IEntity + * @property {string|null} [displayName] Entity displayName + * @property {google.cloud.contactcenterinsights.v1.Entity.Type|null} [type] Entity type + * @property {Object.|null} [metadata] Entity metadata + * @property {number|null} [salience] Entity salience + * @property {google.cloud.contactcenterinsights.v1.ISentimentData|null} [sentiment] Entity sentiment */ /** - * Constructs a new ConversationDataSource. + * Constructs a new Entity. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a ConversationDataSource. - * @implements IConversationDataSource + * @classdesc Represents an Entity. + * @implements IEntity * @constructor - * @param {google.cloud.contactcenterinsights.v1.IConversationDataSource=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IEntity=} [properties] Properties to set */ - function ConversationDataSource(properties) { + function Entity(properties) { + this.metadata = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24900,103 +45678,151 @@ } /** - * ConversationDataSource gcsSource. - * @member {google.cloud.contactcenterinsights.v1.IGcsSource|null|undefined} gcsSource - * @memberof google.cloud.contactcenterinsights.v1.ConversationDataSource + * Entity displayName. + * @member {string} displayName + * @memberof google.cloud.contactcenterinsights.v1.Entity * @instance */ - ConversationDataSource.prototype.gcsSource = null; + Entity.prototype.displayName = ""; /** - * ConversationDataSource dialogflowSource. - * @member {google.cloud.contactcenterinsights.v1.IDialogflowSource|null|undefined} dialogflowSource - * @memberof google.cloud.contactcenterinsights.v1.ConversationDataSource + * Entity type. + * @member {google.cloud.contactcenterinsights.v1.Entity.Type} type + * @memberof google.cloud.contactcenterinsights.v1.Entity * @instance */ - ConversationDataSource.prototype.dialogflowSource = null; + Entity.prototype.type = 0; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Entity metadata. + * @member {Object.} metadata + * @memberof google.cloud.contactcenterinsights.v1.Entity + * @instance + */ + Entity.prototype.metadata = $util.emptyObject; /** - * ConversationDataSource source. - * @member {"gcsSource"|"dialogflowSource"|undefined} source - * @memberof google.cloud.contactcenterinsights.v1.ConversationDataSource + * Entity salience. + * @member {number} salience + * @memberof google.cloud.contactcenterinsights.v1.Entity * @instance */ - Object.defineProperty(ConversationDataSource.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["gcsSource", "dialogflowSource"]), - set: $util.oneOfSetter($oneOfFields) - }); + Entity.prototype.salience = 0; /** - * Creates a new ConversationDataSource instance using the specified properties. + * Entity sentiment. + * @member {google.cloud.contactcenterinsights.v1.ISentimentData|null|undefined} sentiment + * @memberof google.cloud.contactcenterinsights.v1.Entity + * @instance + */ + Entity.prototype.sentiment = null; + + /** + * Creates a new Entity instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.ConversationDataSource + * @memberof google.cloud.contactcenterinsights.v1.Entity * @static - * @param {google.cloud.contactcenterinsights.v1.IConversationDataSource=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.ConversationDataSource} ConversationDataSource instance + * @param {google.cloud.contactcenterinsights.v1.IEntity=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.Entity} Entity instance */ - ConversationDataSource.create = function create(properties) { - return new ConversationDataSource(properties); + Entity.create = function create(properties) { + return new Entity(properties); }; /** - * Encodes the specified ConversationDataSource message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationDataSource.verify|verify} messages. + * Encodes the specified Entity message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Entity.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.ConversationDataSource + * @memberof google.cloud.contactcenterinsights.v1.Entity * @static - * @param {google.cloud.contactcenterinsights.v1.IConversationDataSource} message ConversationDataSource message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IEntity} message Entity message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConversationDataSource.encode = function encode(message, writer) { + Entity.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) - $root.google.cloud.contactcenterinsights.v1.GcsSource.encode(message.gcsSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.dialogflowSource != null && Object.hasOwnProperty.call(message, "dialogflowSource")) - $root.google.cloud.contactcenterinsights.v1.DialogflowSource.encode(message.dialogflowSource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); + if (message.salience != null && Object.hasOwnProperty.call(message, "salience")) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.salience); + if (message.sentiment != null && Object.hasOwnProperty.call(message, "sentiment")) + $root.google.cloud.contactcenterinsights.v1.SentimentData.encode(message.sentiment, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified ConversationDataSource message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationDataSource.verify|verify} messages. + * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Entity.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.ConversationDataSource + * @memberof google.cloud.contactcenterinsights.v1.Entity * @static - * @param {google.cloud.contactcenterinsights.v1.IConversationDataSource} message ConversationDataSource message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IEntity} message Entity message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConversationDataSource.encodeDelimited = function encodeDelimited(message, writer) { + Entity.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ConversationDataSource message from the specified reader or buffer. + * Decodes an Entity message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.ConversationDataSource + * @memberof google.cloud.contactcenterinsights.v1.Entity * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.ConversationDataSource} ConversationDataSource + * @returns {google.cloud.contactcenterinsights.v1.Entity} Entity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConversationDataSource.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.contactcenterinsights.v1.ConversationDataSource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Entity(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.gcsSource = $root.google.cloud.contactcenterinsights.v1.GcsSource.decode(reader, reader.uint32()); + message.displayName = reader.string(); + break; + } + case 2: { + message.type = reader.int32(); break; } case 3: { - message.dialogflowSource = $root.google.cloud.contactcenterinsights.v1.DialogflowSource.decode(reader, reader.uint32()); + if (message.metadata === $util.emptyObject) + message.metadata = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.metadata[key] = value; + break; + } + case 4: { + message.salience = reader.float(); + break; + } + case 5: { + message.sentiment = $root.google.cloud.contactcenterinsights.v1.SentimentData.decode(reader, reader.uint32()); break; } default: @@ -25008,153 +45834,286 @@ }; /** - * Decodes a ConversationDataSource 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.contactcenterinsights.v1.ConversationDataSource + * @memberof google.cloud.contactcenterinsights.v1.Entity * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.ConversationDataSource} ConversationDataSource + * @returns {google.cloud.contactcenterinsights.v1.Entity} Entity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConversationDataSource.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 ConversationDataSource message. + * Verifies an Entity message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.ConversationDataSource + * @memberof google.cloud.contactcenterinsights.v1.Entity * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ConversationDataSource.verify = function verify(message) { + Entity.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { - properties.source = 1; - { - var error = $root.google.cloud.contactcenterinsights.v1.GcsSource.verify(message.gcsSource); - if (error) - return "gcsSource." + error; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: 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: + case 4: + case 5: + case 6: + case 7: + case 9: + case 10: + case 11: + case 12: + case 13: + break; } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (!$util.isObject(message.metadata)) + return "metadata: object expected"; + var key = Object.keys(message.metadata); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.metadata[key[i]])) + return "metadata: string{k:string} expected"; } - if (message.dialogflowSource != null && message.hasOwnProperty("dialogflowSource")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - { - var error = $root.google.cloud.contactcenterinsights.v1.DialogflowSource.verify(message.dialogflowSource); - if (error) - return "dialogflowSource." + error; - } + if (message.salience != null && message.hasOwnProperty("salience")) + if (typeof message.salience !== "number") + return "salience: number expected"; + if (message.sentiment != null && message.hasOwnProperty("sentiment")) { + var error = $root.google.cloud.contactcenterinsights.v1.SentimentData.verify(message.sentiment); + if (error) + return "sentiment." + error; } return null; }; /** - * Creates a ConversationDataSource 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.contactcenterinsights.v1.ConversationDataSource + * @memberof google.cloud.contactcenterinsights.v1.Entity * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.ConversationDataSource} ConversationDataSource + * @returns {google.cloud.contactcenterinsights.v1.Entity} Entity */ - ConversationDataSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.ConversationDataSource) + Entity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.Entity) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.ConversationDataSource(); - if (object.gcsSource != null) { - if (typeof object.gcsSource !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.ConversationDataSource.gcsSource: object expected"); - message.gcsSource = $root.google.cloud.contactcenterinsights.v1.GcsSource.fromObject(object.gcsSource); + var message = new $root.google.cloud.contactcenterinsights.v1.Entity(); + if (object.displayName != null) + message.displayName = String(object.displayName); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "PERSON": + case 1: + message.type = 1; + break; + case "LOCATION": + case 2: + message.type = 2; + break; + case "ORGANIZATION": + case 3: + message.type = 3; + break; + case "EVENT": + case 4: + message.type = 4; + break; + case "WORK_OF_ART": + case 5: + message.type = 5; + break; + case "CONSUMER_GOOD": + case 6: + message.type = 6; + break; + case "OTHER": + case 7: + message.type = 7; + break; + case "PHONE_NUMBER": + case 9: + message.type = 9; + break; + case "ADDRESS": + case 10: + message.type = 10; + break; + case "DATE": + case 11: + message.type = 11; + break; + case "NUMBER": + case 12: + message.type = 12; + break; + case "PRICE": + case 13: + message.type = 13; + break; } - if (object.dialogflowSource != null) { - if (typeof object.dialogflowSource !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.ConversationDataSource.dialogflowSource: object expected"); - message.dialogflowSource = $root.google.cloud.contactcenterinsights.v1.DialogflowSource.fromObject(object.dialogflowSource); + if (object.metadata) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Entity.metadata: object expected"); + message.metadata = {}; + for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) + message.metadata[keys[i]] = String(object.metadata[keys[i]]); + } + if (object.salience != null) + message.salience = Number(object.salience); + if (object.sentiment != null) { + if (typeof object.sentiment !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Entity.sentiment: object expected"); + message.sentiment = $root.google.cloud.contactcenterinsights.v1.SentimentData.fromObject(object.sentiment); } return message; }; /** - * Creates a plain object from a ConversationDataSource 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.contactcenterinsights.v1.ConversationDataSource + * @memberof google.cloud.contactcenterinsights.v1.Entity * @static - * @param {google.cloud.contactcenterinsights.v1.ConversationDataSource} message ConversationDataSource + * @param {google.cloud.contactcenterinsights.v1.Entity} message Entity * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ConversationDataSource.toObject = function toObject(message, options) { + Entity.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { - object.gcsSource = $root.google.cloud.contactcenterinsights.v1.GcsSource.toObject(message.gcsSource, options); - if (options.oneofs) - object.source = "gcsSource"; + if (options.objects || options.defaults) + object.metadata = {}; + if (options.defaults) { + object.displayName = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.salience = 0; + object.sentiment = null; } - if (message.dialogflowSource != null && message.hasOwnProperty("dialogflowSource")) { - object.dialogflowSource = $root.google.cloud.contactcenterinsights.v1.DialogflowSource.toObject(message.dialogflowSource, options); - if (options.oneofs) - object.source = "dialogflowSource"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.Entity.Type[message.type] === undefined ? message.type : $root.google.cloud.contactcenterinsights.v1.Entity.Type[message.type] : message.type; + var keys2; + if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { + object.metadata = {}; + for (var j = 0; j < keys2.length; ++j) + object.metadata[keys2[j]] = message.metadata[keys2[j]]; } + if (message.salience != null && message.hasOwnProperty("salience")) + object.salience = options.json && !isFinite(message.salience) ? String(message.salience) : message.salience; + if (message.sentiment != null && message.hasOwnProperty("sentiment")) + object.sentiment = $root.google.cloud.contactcenterinsights.v1.SentimentData.toObject(message.sentiment, options); return object; }; /** - * Converts this ConversationDataSource to JSON. + * Converts this Entity to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.ConversationDataSource + * @memberof google.cloud.contactcenterinsights.v1.Entity * @instance * @returns {Object.} JSON object */ - ConversationDataSource.prototype.toJSON = function toJSON() { + Entity.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ConversationDataSource + * Gets the default type url for Entity * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.ConversationDataSource + * @memberof google.cloud.contactcenterinsights.v1.Entity * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ConversationDataSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Entity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ConversationDataSource"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Entity"; }; - return ConversationDataSource; + /** + * Type enum. + * @name google.cloud.contactcenterinsights.v1.Entity.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} PERSON=1 PERSON value + * @property {number} LOCATION=2 LOCATION value + * @property {number} ORGANIZATION=3 ORGANIZATION value + * @property {number} EVENT=4 EVENT value + * @property {number} WORK_OF_ART=5 WORK_OF_ART value + * @property {number} CONSUMER_GOOD=6 CONSUMER_GOOD value + * @property {number} OTHER=7 OTHER value + * @property {number} PHONE_NUMBER=9 PHONE_NUMBER value + * @property {number} ADDRESS=10 ADDRESS value + * @property {number} DATE=11 DATE value + * @property {number} NUMBER=12 NUMBER value + * @property {number} PRICE=13 PRICE value + */ + Entity.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PERSON"] = 1; + values[valuesById[2] = "LOCATION"] = 2; + values[valuesById[3] = "ORGANIZATION"] = 3; + values[valuesById[4] = "EVENT"] = 4; + values[valuesById[5] = "WORK_OF_ART"] = 5; + values[valuesById[6] = "CONSUMER_GOOD"] = 6; + values[valuesById[7] = "OTHER"] = 7; + values[valuesById[9] = "PHONE_NUMBER"] = 9; + values[valuesById[10] = "ADDRESS"] = 10; + values[valuesById[11] = "DATE"] = 11; + values[valuesById[12] = "NUMBER"] = 12; + values[valuesById[13] = "PRICE"] = 13; + return values; + })(); + + return Entity; })(); - v1.GcsSource = (function() { + v1.Intent = (function() { /** - * Properties of a GcsSource. + * Properties of an Intent. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IGcsSource - * @property {string|null} [audioUri] GcsSource audioUri - * @property {string|null} [transcriptUri] GcsSource transcriptUri + * @interface IIntent + * @property {string|null} [id] Intent id + * @property {string|null} [displayName] Intent displayName */ /** - * Constructs a new GcsSource. + * Constructs a new Intent. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a GcsSource. - * @implements IGcsSource + * @classdesc Represents an Intent. + * @implements IIntent * @constructor - * @param {google.cloud.contactcenterinsights.v1.IGcsSource=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IIntent=} [properties] Properties to set */ - function GcsSource(properties) { + function Intent(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25162,89 +46121,89 @@ } /** - * GcsSource audioUri. - * @member {string} audioUri - * @memberof google.cloud.contactcenterinsights.v1.GcsSource + * Intent id. + * @member {string} id + * @memberof google.cloud.contactcenterinsights.v1.Intent * @instance */ - GcsSource.prototype.audioUri = ""; + Intent.prototype.id = ""; /** - * GcsSource transcriptUri. - * @member {string} transcriptUri - * @memberof google.cloud.contactcenterinsights.v1.GcsSource + * Intent displayName. + * @member {string} displayName + * @memberof google.cloud.contactcenterinsights.v1.Intent * @instance */ - GcsSource.prototype.transcriptUri = ""; + Intent.prototype.displayName = ""; /** - * Creates a new GcsSource instance using the specified properties. + * Creates a new Intent instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.GcsSource + * @memberof google.cloud.contactcenterinsights.v1.Intent * @static - * @param {google.cloud.contactcenterinsights.v1.IGcsSource=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.GcsSource} GcsSource instance + * @param {google.cloud.contactcenterinsights.v1.IIntent=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.Intent} Intent instance */ - GcsSource.create = function create(properties) { - return new GcsSource(properties); + Intent.create = function create(properties) { + return new Intent(properties); }; /** - * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GcsSource.verify|verify} messages. + * Encodes the specified Intent message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Intent.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.GcsSource + * @memberof google.cloud.contactcenterinsights.v1.Intent * @static - * @param {google.cloud.contactcenterinsights.v1.IGcsSource} message GcsSource message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IIntent} message Intent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcsSource.encode = function encode(message, writer) { + Intent.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.transcriptUri != null && Object.hasOwnProperty.call(message, "transcriptUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.transcriptUri); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); return writer; }; /** - * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GcsSource.verify|verify} messages. + * Encodes the specified Intent message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Intent.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.GcsSource + * @memberof google.cloud.contactcenterinsights.v1.Intent * @static - * @param {google.cloud.contactcenterinsights.v1.IGcsSource} message GcsSource message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IIntent} message Intent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcsSource.encodeDelimited = function encodeDelimited(message, writer) { + Intent.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GcsSource message from the specified reader or buffer. + * Decodes an Intent message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.GcsSource + * @memberof google.cloud.contactcenterinsights.v1.Intent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.GcsSource} GcsSource + * @returns {google.cloud.contactcenterinsights.v1.Intent} Intent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GcsSource.decode = function decode(reader, length) { + 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.contactcenterinsights.v1.GcsSource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Intent(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.audioUri = reader.string(); + message.id = reader.string(); break; } case 2: { - message.transcriptUri = reader.string(); + message.displayName = reader.string(); break; } default: @@ -25256,132 +46215,132 @@ }; /** - * Decodes a GcsSource message from the specified reader or buffer, length delimited. + * Decodes an Intent message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.GcsSource + * @memberof google.cloud.contactcenterinsights.v1.Intent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.GcsSource} GcsSource + * @returns {google.cloud.contactcenterinsights.v1.Intent} Intent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GcsSource.decodeDelimited = function decodeDelimited(reader) { + Intent.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GcsSource message. + * Verifies an Intent message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.GcsSource + * @memberof google.cloud.contactcenterinsights.v1.Intent * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GcsSource.verify = function verify(message) { + Intent.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.transcriptUri != null && message.hasOwnProperty("transcriptUri")) - if (!$util.isString(message.transcriptUri)) - return "transcriptUri: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; return null; }; /** - * Creates a GcsSource message from a plain object. Also converts values to their respective internal types. + * Creates an Intent message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.GcsSource + * @memberof google.cloud.contactcenterinsights.v1.Intent * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.GcsSource} GcsSource + * @returns {google.cloud.contactcenterinsights.v1.Intent} Intent */ - GcsSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.GcsSource) + Intent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.Intent) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.GcsSource(); - if (object.audioUri != null) - message.audioUri = String(object.audioUri); - if (object.transcriptUri != null) - message.transcriptUri = String(object.transcriptUri); + var message = new $root.google.cloud.contactcenterinsights.v1.Intent(); + if (object.id != null) + message.id = String(object.id); + if (object.displayName != null) + message.displayName = String(object.displayName); return message; }; /** - * Creates a plain object from a GcsSource message. Also converts values to other types if specified. + * Creates a plain object from an Intent message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.GcsSource + * @memberof google.cloud.contactcenterinsights.v1.Intent * @static - * @param {google.cloud.contactcenterinsights.v1.GcsSource} message GcsSource + * @param {google.cloud.contactcenterinsights.v1.Intent} message Intent * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GcsSource.toObject = function toObject(message, options) { + Intent.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.audioUri = ""; - object.transcriptUri = ""; + object.id = ""; + object.displayName = ""; } - if (message.audioUri != null && message.hasOwnProperty("audioUri")) - object.audioUri = message.audioUri; - if (message.transcriptUri != null && message.hasOwnProperty("transcriptUri")) - object.transcriptUri = message.transcriptUri; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; return object; }; /** - * Converts this GcsSource to JSON. + * Converts this Intent to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.GcsSource + * @memberof google.cloud.contactcenterinsights.v1.Intent * @instance * @returns {Object.} JSON object */ - GcsSource.prototype.toJSON = function toJSON() { + Intent.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GcsSource + * Gets the default type url for Intent * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.GcsSource + * @memberof google.cloud.contactcenterinsights.v1.Intent * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GcsSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Intent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.GcsSource"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Intent"; }; - return GcsSource; + return Intent; })(); - v1.DialogflowSource = (function() { + v1.PhraseMatchData = (function() { /** - * Properties of a DialogflowSource. + * Properties of a PhraseMatchData. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IDialogflowSource - * @property {string|null} [dialogflowConversation] DialogflowSource dialogflowConversation - * @property {string|null} [audioUri] DialogflowSource audioUri + * @interface IPhraseMatchData + * @property {string|null} [phraseMatcher] PhraseMatchData phraseMatcher + * @property {string|null} [displayName] PhraseMatchData displayName */ /** - * Constructs a new DialogflowSource. + * Constructs a new PhraseMatchData. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a DialogflowSource. - * @implements IDialogflowSource + * @classdesc Represents a PhraseMatchData. + * @implements IPhraseMatchData * @constructor - * @param {google.cloud.contactcenterinsights.v1.IDialogflowSource=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchData=} [properties] Properties to set */ - function DialogflowSource(properties) { + function PhraseMatchData(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25389,89 +46348,89 @@ } /** - * DialogflowSource dialogflowConversation. - * @member {string} dialogflowConversation - * @memberof google.cloud.contactcenterinsights.v1.DialogflowSource + * PhraseMatchData phraseMatcher. + * @member {string} phraseMatcher + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchData * @instance */ - DialogflowSource.prototype.dialogflowConversation = ""; + PhraseMatchData.prototype.phraseMatcher = ""; /** - * DialogflowSource audioUri. - * @member {string} audioUri - * @memberof google.cloud.contactcenterinsights.v1.DialogflowSource + * PhraseMatchData displayName. + * @member {string} displayName + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchData * @instance */ - DialogflowSource.prototype.audioUri = ""; + PhraseMatchData.prototype.displayName = ""; /** - * Creates a new DialogflowSource instance using the specified properties. + * Creates a new PhraseMatchData instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.DialogflowSource + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchData * @static - * @param {google.cloud.contactcenterinsights.v1.IDialogflowSource=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.DialogflowSource} DialogflowSource instance + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchData=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchData} PhraseMatchData instance */ - DialogflowSource.create = function create(properties) { - return new DialogflowSource(properties); + PhraseMatchData.create = function create(properties) { + return new PhraseMatchData(properties); }; /** - * Encodes the specified DialogflowSource message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DialogflowSource.verify|verify} messages. + * Encodes the specified PhraseMatchData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchData.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.DialogflowSource + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchData * @static - * @param {google.cloud.contactcenterinsights.v1.IDialogflowSource} message DialogflowSource message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchData} message PhraseMatchData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DialogflowSource.encode = function encode(message, writer) { + PhraseMatchData.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dialogflowConversation != null && Object.hasOwnProperty.call(message, "dialogflowConversation")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dialogflowConversation); - if (message.audioUri != null && Object.hasOwnProperty.call(message, "audioUri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.audioUri); + if (message.phraseMatcher != null && Object.hasOwnProperty.call(message, "phraseMatcher")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.phraseMatcher); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); return writer; }; /** - * Encodes the specified DialogflowSource message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DialogflowSource.verify|verify} messages. + * Encodes the specified PhraseMatchData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchData.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.DialogflowSource + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchData * @static - * @param {google.cloud.contactcenterinsights.v1.IDialogflowSource} message DialogflowSource message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchData} message PhraseMatchData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DialogflowSource.encodeDelimited = function encodeDelimited(message, writer) { + PhraseMatchData.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DialogflowSource message from the specified reader or buffer. + * Decodes a PhraseMatchData message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.DialogflowSource + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.DialogflowSource} DialogflowSource + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchData} PhraseMatchData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DialogflowSource.decode = function decode(reader, length) { + PhraseMatchData.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.DialogflowSource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.PhraseMatchData(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.dialogflowConversation = reader.string(); + message.phraseMatcher = reader.string(); break; } - case 3: { - message.audioUri = reader.string(); + case 2: { + message.displayName = reader.string(); break; } default: @@ -25483,132 +46442,131 @@ }; /** - * Decodes a DialogflowSource message from the specified reader or buffer, length delimited. + * Decodes a PhraseMatchData message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.DialogflowSource + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.DialogflowSource} DialogflowSource + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchData} PhraseMatchData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DialogflowSource.decodeDelimited = function decodeDelimited(reader) { + PhraseMatchData.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DialogflowSource message. + * Verifies a PhraseMatchData message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.DialogflowSource + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchData * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DialogflowSource.verify = function verify(message) { + PhraseMatchData.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dialogflowConversation != null && message.hasOwnProperty("dialogflowConversation")) - if (!$util.isString(message.dialogflowConversation)) - return "dialogflowConversation: string expected"; - if (message.audioUri != null && message.hasOwnProperty("audioUri")) - if (!$util.isString(message.audioUri)) - return "audioUri: string expected"; + if (message.phraseMatcher != null && message.hasOwnProperty("phraseMatcher")) + if (!$util.isString(message.phraseMatcher)) + return "phraseMatcher: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; return null; }; /** - * Creates a DialogflowSource message from a plain object. Also converts values to their respective internal types. + * Creates a PhraseMatchData message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.DialogflowSource + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchData * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.DialogflowSource} DialogflowSource + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchData} PhraseMatchData */ - DialogflowSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.DialogflowSource) + PhraseMatchData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.PhraseMatchData) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.DialogflowSource(); - if (object.dialogflowConversation != null) - message.dialogflowConversation = String(object.dialogflowConversation); - if (object.audioUri != null) - message.audioUri = String(object.audioUri); + var message = new $root.google.cloud.contactcenterinsights.v1.PhraseMatchData(); + if (object.phraseMatcher != null) + message.phraseMatcher = String(object.phraseMatcher); + if (object.displayName != null) + message.displayName = String(object.displayName); return message; }; /** - * Creates a plain object from a DialogflowSource message. Also converts values to other types if specified. + * Creates a plain object from a PhraseMatchData message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.DialogflowSource + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchData * @static - * @param {google.cloud.contactcenterinsights.v1.DialogflowSource} message DialogflowSource + * @param {google.cloud.contactcenterinsights.v1.PhraseMatchData} message PhraseMatchData * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DialogflowSource.toObject = function toObject(message, options) { + PhraseMatchData.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.dialogflowConversation = ""; - object.audioUri = ""; + object.phraseMatcher = ""; + object.displayName = ""; } - if (message.dialogflowConversation != null && message.hasOwnProperty("dialogflowConversation")) - object.dialogflowConversation = message.dialogflowConversation; - if (message.audioUri != null && message.hasOwnProperty("audioUri")) - object.audioUri = message.audioUri; + if (message.phraseMatcher != null && message.hasOwnProperty("phraseMatcher")) + object.phraseMatcher = message.phraseMatcher; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; return object; }; /** - * Converts this DialogflowSource to JSON. + * Converts this PhraseMatchData to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.DialogflowSource + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchData * @instance * @returns {Object.} JSON object */ - DialogflowSource.prototype.toJSON = function toJSON() { + PhraseMatchData.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DialogflowSource + * Gets the default type url for PhraseMatchData * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.DialogflowSource + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchData * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DialogflowSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PhraseMatchData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.DialogflowSource"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.PhraseMatchData"; }; - return DialogflowSource; + return PhraseMatchData; })(); - v1.AnalysisResult = (function() { + v1.DialogflowIntent = (function() { /** - * Properties of an AnalysisResult. + * Properties of a DialogflowIntent. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IAnalysisResult - * @property {google.cloud.contactcenterinsights.v1.AnalysisResult.ICallAnalysisMetadata|null} [callAnalysisMetadata] AnalysisResult callAnalysisMetadata - * @property {google.protobuf.ITimestamp|null} [endTime] AnalysisResult endTime + * @interface IDialogflowIntent + * @property {string|null} [displayName] DialogflowIntent displayName */ /** - * Constructs a new AnalysisResult. + * Constructs a new DialogflowIntent. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents an AnalysisResult. - * @implements IAnalysisResult + * @classdesc Represents a DialogflowIntent. + * @implements IDialogflowIntent * @constructor - * @param {google.cloud.contactcenterinsights.v1.IAnalysisResult=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IDialogflowIntent=} [properties] Properties to set */ - function AnalysisResult(properties) { + function DialogflowIntent(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25616,103 +46574,75 @@ } /** - * AnalysisResult callAnalysisMetadata. - * @member {google.cloud.contactcenterinsights.v1.AnalysisResult.ICallAnalysisMetadata|null|undefined} callAnalysisMetadata - * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult - * @instance - */ - AnalysisResult.prototype.callAnalysisMetadata = null; - - /** - * AnalysisResult endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult - * @instance - */ - AnalysisResult.prototype.endTime = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AnalysisResult metadata. - * @member {"callAnalysisMetadata"|undefined} metadata - * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * DialogflowIntent displayName. + * @member {string} displayName + * @memberof google.cloud.contactcenterinsights.v1.DialogflowIntent * @instance */ - Object.defineProperty(AnalysisResult.prototype, "metadata", { - get: $util.oneOfGetter($oneOfFields = ["callAnalysisMetadata"]), - set: $util.oneOfSetter($oneOfFields) - }); + DialogflowIntent.prototype.displayName = ""; /** - * Creates a new AnalysisResult instance using the specified properties. + * Creates a new DialogflowIntent instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @memberof google.cloud.contactcenterinsights.v1.DialogflowIntent * @static - * @param {google.cloud.contactcenterinsights.v1.IAnalysisResult=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.AnalysisResult} AnalysisResult instance + * @param {google.cloud.contactcenterinsights.v1.IDialogflowIntent=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.DialogflowIntent} DialogflowIntent instance */ - AnalysisResult.create = function create(properties) { - return new AnalysisResult(properties); + DialogflowIntent.create = function create(properties) { + return new DialogflowIntent(properties); }; /** - * Encodes the specified AnalysisResult message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnalysisResult.verify|verify} messages. + * Encodes the specified DialogflowIntent message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DialogflowIntent.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @memberof google.cloud.contactcenterinsights.v1.DialogflowIntent * @static - * @param {google.cloud.contactcenterinsights.v1.IAnalysisResult} message AnalysisResult message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IDialogflowIntent} message DialogflowIntent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnalysisResult.encode = function encode(message, writer) { + DialogflowIntent.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.callAnalysisMetadata != null && Object.hasOwnProperty.call(message, "callAnalysisMetadata")) - $root.google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.encode(message.callAnalysisMetadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); return writer; }; /** - * Encodes the specified AnalysisResult message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnalysisResult.verify|verify} messages. + * Encodes the specified DialogflowIntent message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DialogflowIntent.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @memberof google.cloud.contactcenterinsights.v1.DialogflowIntent * @static - * @param {google.cloud.contactcenterinsights.v1.IAnalysisResult} message AnalysisResult message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IDialogflowIntent} message DialogflowIntent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnalysisResult.encodeDelimited = function encodeDelimited(message, writer) { + DialogflowIntent.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AnalysisResult message from the specified reader or buffer. + * Decodes a DialogflowIntent message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @memberof google.cloud.contactcenterinsights.v1.DialogflowIntent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.AnalysisResult} AnalysisResult + * @returns {google.cloud.contactcenterinsights.v1.DialogflowIntent} DialogflowIntent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnalysisResult.decode = function decode(reader, length) { + DialogflowIntent.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.AnalysisResult(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.DialogflowIntent(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: { - message.callAnalysisMetadata = $root.google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.decode(reader, reader.uint32()); - break; - } case 1: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.displayName = reader.string(); break; } default: @@ -25724,670 +46654,296 @@ }; /** - * Decodes an AnalysisResult message from the specified reader or buffer, length delimited. + * Decodes a DialogflowIntent message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @memberof google.cloud.contactcenterinsights.v1.DialogflowIntent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.AnalysisResult} AnalysisResult + * @returns {google.cloud.contactcenterinsights.v1.DialogflowIntent} DialogflowIntent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnalysisResult.decodeDelimited = function decodeDelimited(reader) { + DialogflowIntent.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AnalysisResult message. + * Verifies a DialogflowIntent message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @memberof google.cloud.contactcenterinsights.v1.DialogflowIntent * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AnalysisResult.verify = function verify(message) { + DialogflowIntent.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.callAnalysisMetadata != null && message.hasOwnProperty("callAnalysisMetadata")) { - properties.metadata = 1; - { - var error = $root.google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.verify(message.callAnalysisMetadata); - if (error) - return "callAnalysisMetadata." + error; - } - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; return null; }; /** - * Creates an AnalysisResult message from a plain object. Also converts values to their respective internal types. + * Creates a DialogflowIntent message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @memberof google.cloud.contactcenterinsights.v1.DialogflowIntent * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.AnalysisResult} AnalysisResult + * @returns {google.cloud.contactcenterinsights.v1.DialogflowIntent} DialogflowIntent */ - AnalysisResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.AnalysisResult) + DialogflowIntent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.DialogflowIntent) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.AnalysisResult(); - if (object.callAnalysisMetadata != null) { - if (typeof object.callAnalysisMetadata !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.callAnalysisMetadata: object expected"); - message.callAnalysisMetadata = $root.google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.fromObject(object.callAnalysisMetadata); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } + var message = new $root.google.cloud.contactcenterinsights.v1.DialogflowIntent(); + if (object.displayName != null) + message.displayName = String(object.displayName); return message; }; /** - * Creates a plain object from an AnalysisResult message. Also converts values to other types if specified. + * Creates a plain object from a DialogflowIntent message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @memberof google.cloud.contactcenterinsights.v1.DialogflowIntent * @static - * @param {google.cloud.contactcenterinsights.v1.AnalysisResult} message AnalysisResult + * @param {google.cloud.contactcenterinsights.v1.DialogflowIntent} message DialogflowIntent * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AnalysisResult.toObject = function toObject(message, options) { + DialogflowIntent.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.endTime = null; - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.callAnalysisMetadata != null && message.hasOwnProperty("callAnalysisMetadata")) { - object.callAnalysisMetadata = $root.google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.toObject(message.callAnalysisMetadata, options); - if (options.oneofs) - object.metadata = "callAnalysisMetadata"; - } + object.displayName = ""; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; return object; }; /** - * Converts this AnalysisResult to JSON. + * Converts this DialogflowIntent to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @memberof google.cloud.contactcenterinsights.v1.DialogflowIntent * @instance * @returns {Object.} JSON object */ - AnalysisResult.prototype.toJSON = function toJSON() { + DialogflowIntent.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AnalysisResult + * Gets the default type url for DialogflowIntent * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult + * @memberof google.cloud.contactcenterinsights.v1.DialogflowIntent * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AnalysisResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DialogflowIntent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.AnalysisResult"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.DialogflowIntent"; }; - AnalysisResult.CallAnalysisMetadata = (function() { - - /** - * Properties of a CallAnalysisMetadata. - * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult - * @interface ICallAnalysisMetadata - * @property {Array.|null} [annotations] CallAnalysisMetadata annotations - * @property {Object.|null} [entities] CallAnalysisMetadata entities - * @property {Array.|null} [sentiments] CallAnalysisMetadata sentiments - * @property {google.cloud.contactcenterinsights.v1.IConversationLevelSilence|null} [silence] CallAnalysisMetadata silence - * @property {Object.|null} [intents] CallAnalysisMetadata intents - * @property {Object.|null} [phraseMatchers] CallAnalysisMetadata phraseMatchers - * @property {google.cloud.contactcenterinsights.v1.IIssueModelResult|null} [issueModelResult] CallAnalysisMetadata issueModelResult - */ - - /** - * Constructs a new CallAnalysisMetadata. - * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult - * @classdesc Represents a CallAnalysisMetadata. - * @implements ICallAnalysisMetadata - * @constructor - * @param {google.cloud.contactcenterinsights.v1.AnalysisResult.ICallAnalysisMetadata=} [properties] Properties to set - */ - function CallAnalysisMetadata(properties) { - this.annotations = []; - this.entities = {}; - this.sentiments = []; - this.intents = {}; - this.phraseMatchers = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CallAnalysisMetadata annotations. - * @member {Array.} annotations - * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata - * @instance - */ - CallAnalysisMetadata.prototype.annotations = $util.emptyArray; - - /** - * CallAnalysisMetadata entities. - * @member {Object.} entities - * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata - * @instance - */ - CallAnalysisMetadata.prototype.entities = $util.emptyObject; - - /** - * CallAnalysisMetadata sentiments. - * @member {Array.} sentiments - * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata - * @instance - */ - CallAnalysisMetadata.prototype.sentiments = $util.emptyArray; - - /** - * CallAnalysisMetadata silence. - * @member {google.cloud.contactcenterinsights.v1.IConversationLevelSilence|null|undefined} silence - * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata - * @instance - */ - CallAnalysisMetadata.prototype.silence = null; - - /** - * CallAnalysisMetadata intents. - * @member {Object.} intents - * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata - * @instance - */ - CallAnalysisMetadata.prototype.intents = $util.emptyObject; - - /** - * CallAnalysisMetadata phraseMatchers. - * @member {Object.} phraseMatchers - * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata - * @instance - */ - CallAnalysisMetadata.prototype.phraseMatchers = $util.emptyObject; - - /** - * CallAnalysisMetadata issueModelResult. - * @member {google.cloud.contactcenterinsights.v1.IIssueModelResult|null|undefined} issueModelResult - * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata - * @instance - */ - CallAnalysisMetadata.prototype.issueModelResult = null; - - /** - * Creates a new CallAnalysisMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata - * @static - * @param {google.cloud.contactcenterinsights.v1.AnalysisResult.ICallAnalysisMetadata=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata} CallAnalysisMetadata instance - */ - CallAnalysisMetadata.create = function create(properties) { - return new CallAnalysisMetadata(properties); - }; + return DialogflowIntent; + })(); - /** - * Encodes the specified CallAnalysisMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata - * @static - * @param {google.cloud.contactcenterinsights.v1.AnalysisResult.ICallAnalysisMetadata} message CallAnalysisMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CallAnalysisMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.annotations != null && message.annotations.length) - for (var i = 0; i < message.annotations.length; ++i) - $root.google.cloud.contactcenterinsights.v1.CallAnnotation.encode(message.annotations[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.entities != null && Object.hasOwnProperty.call(message, "entities")) - for (var keys = Object.keys(message.entities), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.contactcenterinsights.v1.Entity.encode(message.entities[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.sentiments != null && message.sentiments.length) - for (var i = 0; i < message.sentiments.length; ++i) - $root.google.cloud.contactcenterinsights.v1.ConversationLevelSentiment.encode(message.sentiments[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.intents != null && Object.hasOwnProperty.call(message, "intents")) - for (var keys = Object.keys(message.intents), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.contactcenterinsights.v1.Intent.encode(message.intents[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.phraseMatchers != null && Object.hasOwnProperty.call(message, "phraseMatchers")) - for (var keys = Object.keys(message.phraseMatchers), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.contactcenterinsights.v1.PhraseMatchData.encode(message.phraseMatchers[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.issueModelResult != null && Object.hasOwnProperty.call(message, "issueModelResult")) - $root.google.cloud.contactcenterinsights.v1.IssueModelResult.encode(message.issueModelResult, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.silence != null && Object.hasOwnProperty.call(message, "silence")) - $root.google.cloud.contactcenterinsights.v1.ConversationLevelSilence.encode(message.silence, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - return writer; - }; + v1.InterruptionData = (function() { - /** - * Encodes the specified CallAnalysisMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata - * @static - * @param {google.cloud.contactcenterinsights.v1.AnalysisResult.ICallAnalysisMetadata} message CallAnalysisMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CallAnalysisMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of an InterruptionData. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IInterruptionData + */ - /** - * Decodes a CallAnalysisMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata} CallAnalysisMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CallAnalysisMetadata.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - if (!(message.annotations && message.annotations.length)) - message.annotations = []; - message.annotations.push($root.google.cloud.contactcenterinsights.v1.CallAnnotation.decode(reader, reader.uint32())); - break; - } - case 3: { - if (message.entities === $util.emptyObject) - message.entities = {}; - 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.contactcenterinsights.v1.Entity.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.entities[key] = value; - break; - } - case 4: { - if (!(message.sentiments && message.sentiments.length)) - message.sentiments = []; - message.sentiments.push($root.google.cloud.contactcenterinsights.v1.ConversationLevelSentiment.decode(reader, reader.uint32())); - break; - } - case 11: { - message.silence = $root.google.cloud.contactcenterinsights.v1.ConversationLevelSilence.decode(reader, reader.uint32()); - break; - } - case 6: { - if (message.intents === $util.emptyObject) - message.intents = {}; - 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.contactcenterinsights.v1.Intent.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.intents[key] = value; - break; - } - case 7: { - if (message.phraseMatchers === $util.emptyObject) - message.phraseMatchers = {}; - 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.contactcenterinsights.v1.PhraseMatchData.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.phraseMatchers[key] = value; - break; - } - case 8: { - message.issueModelResult = $root.google.cloud.contactcenterinsights.v1.IssueModelResult.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Constructs a new InterruptionData. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an InterruptionData. + * @implements IInterruptionData + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IInterruptionData=} [properties] Properties to set + */ + function InterruptionData(properties) { + if (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 CallAnalysisMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata} CallAnalysisMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CallAnalysisMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new InterruptionData instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.InterruptionData + * @static + * @param {google.cloud.contactcenterinsights.v1.IInterruptionData=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.InterruptionData} InterruptionData instance + */ + InterruptionData.create = function create(properties) { + return new InterruptionData(properties); + }; - /** - * Verifies a CallAnalysisMetadata message. - * @function verify - * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CallAnalysisMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.annotations != null && message.hasOwnProperty("annotations")) { - if (!Array.isArray(message.annotations)) - return "annotations: array expected"; - for (var i = 0; i < message.annotations.length; ++i) { - var error = $root.google.cloud.contactcenterinsights.v1.CallAnnotation.verify(message.annotations[i]); - if (error) - return "annotations." + error; - } - } - if (message.entities != null && message.hasOwnProperty("entities")) { - if (!$util.isObject(message.entities)) - return "entities: object expected"; - var key = Object.keys(message.entities); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.contactcenterinsights.v1.Entity.verify(message.entities[key[i]]); - if (error) - return "entities." + error; - } - } - if (message.sentiments != null && message.hasOwnProperty("sentiments")) { - if (!Array.isArray(message.sentiments)) - return "sentiments: array expected"; - for (var i = 0; i < message.sentiments.length; ++i) { - var error = $root.google.cloud.contactcenterinsights.v1.ConversationLevelSentiment.verify(message.sentiments[i]); - if (error) - return "sentiments." + error; - } - } - if (message.silence != null && message.hasOwnProperty("silence")) { - var error = $root.google.cloud.contactcenterinsights.v1.ConversationLevelSilence.verify(message.silence); - if (error) - return "silence." + error; - } - if (message.intents != null && message.hasOwnProperty("intents")) { - if (!$util.isObject(message.intents)) - return "intents: object expected"; - var key = Object.keys(message.intents); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.contactcenterinsights.v1.Intent.verify(message.intents[key[i]]); - if (error) - return "intents." + error; - } - } - if (message.phraseMatchers != null && message.hasOwnProperty("phraseMatchers")) { - if (!$util.isObject(message.phraseMatchers)) - return "phraseMatchers: object expected"; - var key = Object.keys(message.phraseMatchers); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.contactcenterinsights.v1.PhraseMatchData.verify(message.phraseMatchers[key[i]]); - if (error) - return "phraseMatchers." + error; - } - } - if (message.issueModelResult != null && message.hasOwnProperty("issueModelResult")) { - var error = $root.google.cloud.contactcenterinsights.v1.IssueModelResult.verify(message.issueModelResult); - if (error) - return "issueModelResult." + error; - } - return null; - }; + /** + * Encodes the specified InterruptionData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InterruptionData.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.InterruptionData + * @static + * @param {google.cloud.contactcenterinsights.v1.IInterruptionData} message InterruptionData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InterruptionData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - /** - * Creates a CallAnalysisMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata} CallAnalysisMetadata - */ - CallAnalysisMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata) - return object; - var message = new $root.google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata(); - if (object.annotations) { - if (!Array.isArray(object.annotations)) - throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.annotations: array expected"); - message.annotations = []; - for (var i = 0; i < object.annotations.length; ++i) { - if (typeof object.annotations[i] !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.annotations: object expected"); - message.annotations[i] = $root.google.cloud.contactcenterinsights.v1.CallAnnotation.fromObject(object.annotations[i]); - } - } - if (object.entities) { - if (typeof object.entities !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.entities: object expected"); - message.entities = {}; - for (var keys = Object.keys(object.entities), i = 0; i < keys.length; ++i) { - if (typeof object.entities[keys[i]] !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.entities: object expected"); - message.entities[keys[i]] = $root.google.cloud.contactcenterinsights.v1.Entity.fromObject(object.entities[keys[i]]); - } - } - if (object.sentiments) { - if (!Array.isArray(object.sentiments)) - throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.sentiments: array expected"); - message.sentiments = []; - for (var i = 0; i < object.sentiments.length; ++i) { - if (typeof object.sentiments[i] !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.sentiments: object expected"); - message.sentiments[i] = $root.google.cloud.contactcenterinsights.v1.ConversationLevelSentiment.fromObject(object.sentiments[i]); - } - } - if (object.silence != null) { - if (typeof object.silence !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.silence: object expected"); - message.silence = $root.google.cloud.contactcenterinsights.v1.ConversationLevelSilence.fromObject(object.silence); - } - if (object.intents) { - if (typeof object.intents !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.intents: object expected"); - message.intents = {}; - for (var keys = Object.keys(object.intents), i = 0; i < keys.length; ++i) { - if (typeof object.intents[keys[i]] !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.intents: object expected"); - message.intents[keys[i]] = $root.google.cloud.contactcenterinsights.v1.Intent.fromObject(object.intents[keys[i]]); - } - } - if (object.phraseMatchers) { - if (typeof object.phraseMatchers !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.phraseMatchers: object expected"); - message.phraseMatchers = {}; - for (var keys = Object.keys(object.phraseMatchers), i = 0; i < keys.length; ++i) { - if (typeof object.phraseMatchers[keys[i]] !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.phraseMatchers: object expected"); - message.phraseMatchers[keys[i]] = $root.google.cloud.contactcenterinsights.v1.PhraseMatchData.fromObject(object.phraseMatchers[keys[i]]); - } - } - if (object.issueModelResult != null) { - if (typeof object.issueModelResult !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.issueModelResult: object expected"); - message.issueModelResult = $root.google.cloud.contactcenterinsights.v1.IssueModelResult.fromObject(object.issueModelResult); - } - return message; - }; + /** + * Encodes the specified InterruptionData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InterruptionData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.InterruptionData + * @static + * @param {google.cloud.contactcenterinsights.v1.IInterruptionData} message InterruptionData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InterruptionData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a plain object from a CallAnalysisMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata - * @static - * @param {google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata} message CallAnalysisMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CallAnalysisMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.annotations = []; - object.sentiments = []; - } - if (options.objects || options.defaults) { - object.entities = {}; - object.intents = {}; - object.phraseMatchers = {}; - } - if (options.defaults) { - object.issueModelResult = null; - object.silence = null; - } - if (message.annotations && message.annotations.length) { - object.annotations = []; - for (var j = 0; j < message.annotations.length; ++j) - object.annotations[j] = $root.google.cloud.contactcenterinsights.v1.CallAnnotation.toObject(message.annotations[j], options); - } - var keys2; - if (message.entities && (keys2 = Object.keys(message.entities)).length) { - object.entities = {}; - for (var j = 0; j < keys2.length; ++j) - object.entities[keys2[j]] = $root.google.cloud.contactcenterinsights.v1.Entity.toObject(message.entities[keys2[j]], options); - } - if (message.sentiments && message.sentiments.length) { - object.sentiments = []; - for (var j = 0; j < message.sentiments.length; ++j) - object.sentiments[j] = $root.google.cloud.contactcenterinsights.v1.ConversationLevelSentiment.toObject(message.sentiments[j], options); - } - if (message.intents && (keys2 = Object.keys(message.intents)).length) { - object.intents = {}; - for (var j = 0; j < keys2.length; ++j) - object.intents[keys2[j]] = $root.google.cloud.contactcenterinsights.v1.Intent.toObject(message.intents[keys2[j]], options); - } - if (message.phraseMatchers && (keys2 = Object.keys(message.phraseMatchers)).length) { - object.phraseMatchers = {}; - for (var j = 0; j < keys2.length; ++j) - object.phraseMatchers[keys2[j]] = $root.google.cloud.contactcenterinsights.v1.PhraseMatchData.toObject(message.phraseMatchers[keys2[j]], options); + /** + * Decodes an InterruptionData message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.InterruptionData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.InterruptionData} InterruptionData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InterruptionData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.InterruptionData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; } - if (message.issueModelResult != null && message.hasOwnProperty("issueModelResult")) - object.issueModelResult = $root.google.cloud.contactcenterinsights.v1.IssueModelResult.toObject(message.issueModelResult, options); - if (message.silence != null && message.hasOwnProperty("silence")) - object.silence = $root.google.cloud.contactcenterinsights.v1.ConversationLevelSilence.toObject(message.silence, options); + } + return message; + }; + + /** + * Decodes an InterruptionData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.InterruptionData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.InterruptionData} InterruptionData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InterruptionData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InterruptionData message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.InterruptionData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InterruptionData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an InterruptionData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.InterruptionData + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.InterruptionData} InterruptionData + */ + InterruptionData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.InterruptionData) return object; - }; + return new $root.google.cloud.contactcenterinsights.v1.InterruptionData(); + }; - /** - * Converts this CallAnalysisMetadata to JSON. - * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata - * @instance - * @returns {Object.} JSON object - */ - CallAnalysisMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from an InterruptionData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.InterruptionData + * @static + * @param {google.cloud.contactcenterinsights.v1.InterruptionData} message InterruptionData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InterruptionData.toObject = function toObject() { + return {}; + }; - /** - * Gets the default type url for CallAnalysisMetadata - * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CallAnalysisMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata"; - }; + /** + * Converts this InterruptionData to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.InterruptionData + * @instance + * @returns {Object.} JSON object + */ + InterruptionData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return CallAnalysisMetadata; - })(); + /** + * Gets the default type url for InterruptionData + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.InterruptionData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InterruptionData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.InterruptionData"; + }; - return AnalysisResult; + return InterruptionData; })(); - v1.IssueModelResult = (function() { + v1.SilenceData = (function() { /** - * Properties of an IssueModelResult. + * Properties of a SilenceData. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IIssueModelResult - * @property {string|null} [issueModel] IssueModelResult issueModel - * @property {Array.|null} [issues] IssueModelResult issues + * @interface ISilenceData */ /** - * Constructs a new IssueModelResult. + * Constructs a new SilenceData. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents an IssueModelResult. - * @implements IIssueModelResult + * @classdesc Represents a SilenceData. + * @implements ISilenceData * @constructor - * @param {google.cloud.contactcenterinsights.v1.IIssueModelResult=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.ISilenceData=} [properties] Properties to set */ - function IssueModelResult(properties) { - this.issues = []; + function SilenceData(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26395,94 +46951,238 @@ } /** - * IssueModelResult issueModel. - * @member {string} issueModel - * @memberof google.cloud.contactcenterinsights.v1.IssueModelResult - * @instance + * Creates a new SilenceData instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.SilenceData + * @static + * @param {google.cloud.contactcenterinsights.v1.ISilenceData=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.SilenceData} SilenceData instance */ - IssueModelResult.prototype.issueModel = ""; + SilenceData.create = function create(properties) { + return new SilenceData(properties); + }; /** - * IssueModelResult issues. - * @member {Array.} issues - * @memberof google.cloud.contactcenterinsights.v1.IssueModelResult + * Encodes the specified SilenceData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SilenceData.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.SilenceData + * @static + * @param {google.cloud.contactcenterinsights.v1.ISilenceData} message SilenceData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SilenceData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified SilenceData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SilenceData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.SilenceData + * @static + * @param {google.cloud.contactcenterinsights.v1.ISilenceData} message SilenceData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SilenceData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SilenceData message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.SilenceData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.SilenceData} SilenceData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SilenceData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.SilenceData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SilenceData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.SilenceData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.SilenceData} SilenceData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SilenceData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SilenceData message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.SilenceData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SilenceData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a SilenceData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.SilenceData + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.SilenceData} SilenceData + */ + SilenceData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.SilenceData) + return object; + return new $root.google.cloud.contactcenterinsights.v1.SilenceData(); + }; + + /** + * Creates a plain object from a SilenceData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.SilenceData + * @static + * @param {google.cloud.contactcenterinsights.v1.SilenceData} message SilenceData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SilenceData.toObject = function toObject() { + return {}; + }; + + /** + * Converts this SilenceData to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.SilenceData * @instance + * @returns {Object.} JSON object */ - IssueModelResult.prototype.issues = $util.emptyArray; + SilenceData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Creates a new IssueModelResult instance using the specified properties. + * Gets the default type url for SilenceData + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.SilenceData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SilenceData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.SilenceData"; + }; + + return SilenceData; + })(); + + v1.HoldData = (function() { + + /** + * Properties of a HoldData. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IHoldData + */ + + /** + * Constructs a new HoldData. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a HoldData. + * @implements IHoldData + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IHoldData=} [properties] Properties to set + */ + function HoldData(properties) { + if (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 HoldData instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.IssueModelResult + * @memberof google.cloud.contactcenterinsights.v1.HoldData * @static - * @param {google.cloud.contactcenterinsights.v1.IIssueModelResult=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.IssueModelResult} IssueModelResult instance + * @param {google.cloud.contactcenterinsights.v1.IHoldData=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.HoldData} HoldData instance */ - IssueModelResult.create = function create(properties) { - return new IssueModelResult(properties); + HoldData.create = function create(properties) { + return new HoldData(properties); }; /** - * Encodes the specified IssueModelResult message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModelResult.verify|verify} messages. + * Encodes the specified HoldData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.HoldData.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.IssueModelResult + * @memberof google.cloud.contactcenterinsights.v1.HoldData * @static - * @param {google.cloud.contactcenterinsights.v1.IIssueModelResult} message IssueModelResult message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IHoldData} message HoldData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - IssueModelResult.encode = function encode(message, writer) { + HoldData.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.issueModel != null && Object.hasOwnProperty.call(message, "issueModel")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.issueModel); - if (message.issues != null && message.issues.length) - for (var i = 0; i < message.issues.length; ++i) - $root.google.cloud.contactcenterinsights.v1.IssueAssignment.encode(message.issues[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified IssueModelResult message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModelResult.verify|verify} messages. + * Encodes the specified HoldData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.HoldData.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.IssueModelResult + * @memberof google.cloud.contactcenterinsights.v1.HoldData * @static - * @param {google.cloud.contactcenterinsights.v1.IIssueModelResult} message IssueModelResult message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IHoldData} message HoldData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - IssueModelResult.encodeDelimited = function encodeDelimited(message, writer) { + HoldData.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an IssueModelResult message from the specified reader or buffer. + * Decodes a HoldData message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.IssueModelResult + * @memberof google.cloud.contactcenterinsights.v1.HoldData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.IssueModelResult} IssueModelResult + * @returns {google.cloud.contactcenterinsights.v1.HoldData} HoldData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - IssueModelResult.decode = function decode(reader, length) { + HoldData.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.IssueModelResult(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.HoldData(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.issueModel = reader.string(); - break; - } - case 2: { - if (!(message.issues && message.issues.length)) - message.issues = []; - message.issues.push($root.google.cloud.contactcenterinsights.v1.IssueAssignment.decode(reader, reader.uint32())); - break; - } default: reader.skipType(tag & 7); break; @@ -26492,149 +47192,111 @@ }; /** - * Decodes an IssueModelResult message from the specified reader or buffer, length delimited. + * Decodes a HoldData message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.IssueModelResult + * @memberof google.cloud.contactcenterinsights.v1.HoldData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.IssueModelResult} IssueModelResult + * @returns {google.cloud.contactcenterinsights.v1.HoldData} HoldData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - IssueModelResult.decodeDelimited = function decodeDelimited(reader) { + HoldData.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an IssueModelResult message. + * Verifies a HoldData message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.IssueModelResult + * @memberof google.cloud.contactcenterinsights.v1.HoldData * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - IssueModelResult.verify = function verify(message) { + HoldData.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.issueModel != null && message.hasOwnProperty("issueModel")) - if (!$util.isString(message.issueModel)) - return "issueModel: string expected"; - if (message.issues != null && message.hasOwnProperty("issues")) { - if (!Array.isArray(message.issues)) - return "issues: array expected"; - for (var i = 0; i < message.issues.length; ++i) { - var error = $root.google.cloud.contactcenterinsights.v1.IssueAssignment.verify(message.issues[i]); - if (error) - return "issues." + error; - } - } return null; }; /** - * Creates an IssueModelResult message from a plain object. Also converts values to their respective internal types. + * Creates a HoldData message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.IssueModelResult + * @memberof google.cloud.contactcenterinsights.v1.HoldData * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.IssueModelResult} IssueModelResult + * @returns {google.cloud.contactcenterinsights.v1.HoldData} HoldData */ - IssueModelResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.IssueModelResult) + HoldData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.HoldData) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.IssueModelResult(); - if (object.issueModel != null) - message.issueModel = String(object.issueModel); - if (object.issues) { - if (!Array.isArray(object.issues)) - throw TypeError(".google.cloud.contactcenterinsights.v1.IssueModelResult.issues: array expected"); - message.issues = []; - for (var i = 0; i < object.issues.length; ++i) { - if (typeof object.issues[i] !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.IssueModelResult.issues: object expected"); - message.issues[i] = $root.google.cloud.contactcenterinsights.v1.IssueAssignment.fromObject(object.issues[i]); - } - } - return message; + return new $root.google.cloud.contactcenterinsights.v1.HoldData(); }; /** - * Creates a plain object from an IssueModelResult message. Also converts values to other types if specified. + * Creates a plain object from a HoldData message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.IssueModelResult + * @memberof google.cloud.contactcenterinsights.v1.HoldData * @static - * @param {google.cloud.contactcenterinsights.v1.IssueModelResult} message IssueModelResult + * @param {google.cloud.contactcenterinsights.v1.HoldData} message HoldData * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - IssueModelResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.issues = []; - if (options.defaults) - object.issueModel = ""; - if (message.issueModel != null && message.hasOwnProperty("issueModel")) - object.issueModel = message.issueModel; - if (message.issues && message.issues.length) { - object.issues = []; - for (var j = 0; j < message.issues.length; ++j) - object.issues[j] = $root.google.cloud.contactcenterinsights.v1.IssueAssignment.toObject(message.issues[j], options); - } - return object; + HoldData.toObject = function toObject() { + return {}; }; /** - * Converts this IssueModelResult to JSON. + * Converts this HoldData to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.IssueModelResult + * @memberof google.cloud.contactcenterinsights.v1.HoldData * @instance * @returns {Object.} JSON object */ - IssueModelResult.prototype.toJSON = function toJSON() { + HoldData.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for IssueModelResult + * Gets the default type url for HoldData * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.IssueModelResult + * @memberof google.cloud.contactcenterinsights.v1.HoldData * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - IssueModelResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + HoldData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.IssueModelResult"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.HoldData"; }; - return IssueModelResult; + return HoldData; })(); - v1.ConversationLevelSentiment = (function() { + v1.EntityMentionData = (function() { /** - * Properties of a ConversationLevelSentiment. + * Properties of an EntityMentionData. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IConversationLevelSentiment - * @property {number|null} [channelTag] ConversationLevelSentiment channelTag - * @property {google.cloud.contactcenterinsights.v1.ISentimentData|null} [sentimentData] ConversationLevelSentiment sentimentData + * @interface IEntityMentionData + * @property {string|null} [entityUniqueId] EntityMentionData entityUniqueId + * @property {google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType|null} [type] EntityMentionData type + * @property {google.cloud.contactcenterinsights.v1.ISentimentData|null} [sentiment] EntityMentionData sentiment */ /** - * Constructs a new ConversationLevelSentiment. + * Constructs a new EntityMentionData. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a ConversationLevelSentiment. - * @implements IConversationLevelSentiment + * @classdesc Represents an EntityMentionData. + * @implements IEntityMentionData * @constructor - * @param {google.cloud.contactcenterinsights.v1.IConversationLevelSentiment=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IEntityMentionData=} [properties] Properties to set */ - function ConversationLevelSentiment(properties) { + function EntityMentionData(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26642,89 +47304,103 @@ } /** - * ConversationLevelSentiment channelTag. - * @member {number} channelTag - * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSentiment + * EntityMentionData entityUniqueId. + * @member {string} entityUniqueId + * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData * @instance */ - ConversationLevelSentiment.prototype.channelTag = 0; + EntityMentionData.prototype.entityUniqueId = ""; /** - * ConversationLevelSentiment sentimentData. - * @member {google.cloud.contactcenterinsights.v1.ISentimentData|null|undefined} sentimentData - * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSentiment + * EntityMentionData type. + * @member {google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType} type + * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData * @instance */ - ConversationLevelSentiment.prototype.sentimentData = null; + EntityMentionData.prototype.type = 0; /** - * Creates a new ConversationLevelSentiment instance using the specified properties. + * EntityMentionData sentiment. + * @member {google.cloud.contactcenterinsights.v1.ISentimentData|null|undefined} sentiment + * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData + * @instance + */ + EntityMentionData.prototype.sentiment = null; + + /** + * Creates a new EntityMentionData instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSentiment + * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData * @static - * @param {google.cloud.contactcenterinsights.v1.IConversationLevelSentiment=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.ConversationLevelSentiment} ConversationLevelSentiment instance + * @param {google.cloud.contactcenterinsights.v1.IEntityMentionData=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.EntityMentionData} EntityMentionData instance */ - ConversationLevelSentiment.create = function create(properties) { - return new ConversationLevelSentiment(properties); + EntityMentionData.create = function create(properties) { + return new EntityMentionData(properties); }; /** - * Encodes the specified ConversationLevelSentiment message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationLevelSentiment.verify|verify} messages. + * Encodes the specified EntityMentionData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.EntityMentionData.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSentiment + * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData * @static - * @param {google.cloud.contactcenterinsights.v1.IConversationLevelSentiment} message ConversationLevelSentiment message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IEntityMentionData} message EntityMentionData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConversationLevelSentiment.encode = function encode(message, writer) { + EntityMentionData.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.channelTag); - if (message.sentimentData != null && Object.hasOwnProperty.call(message, "sentimentData")) - $root.google.cloud.contactcenterinsights.v1.SentimentData.encode(message.sentimentData, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.entityUniqueId != null && Object.hasOwnProperty.call(message, "entityUniqueId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.entityUniqueId); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.sentiment != null && Object.hasOwnProperty.call(message, "sentiment")) + $root.google.cloud.contactcenterinsights.v1.SentimentData.encode(message.sentiment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ConversationLevelSentiment message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationLevelSentiment.verify|verify} messages. + * Encodes the specified EntityMentionData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.EntityMentionData.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSentiment + * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData * @static - * @param {google.cloud.contactcenterinsights.v1.IConversationLevelSentiment} message ConversationLevelSentiment message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IEntityMentionData} message EntityMentionData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConversationLevelSentiment.encodeDelimited = function encodeDelimited(message, writer) { + EntityMentionData.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ConversationLevelSentiment message from the specified reader or buffer. + * Decodes an EntityMentionData message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSentiment + * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.ConversationLevelSentiment} ConversationLevelSentiment + * @returns {google.cloud.contactcenterinsights.v1.EntityMentionData} EntityMentionData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConversationLevelSentiment.decode = function decode(reader, length) { + EntityMentionData.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ConversationLevelSentiment(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.EntityMentionData(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.channelTag = reader.int32(); + message.entityUniqueId = reader.string(); break; } case 2: { - message.sentimentData = $root.google.cloud.contactcenterinsights.v1.SentimentData.decode(reader, reader.uint32()); + message.type = reader.int32(); + break; + } + case 3: { + message.sentiment = $root.google.cloud.contactcenterinsights.v1.SentimentData.decode(reader, reader.uint32()); break; } default: @@ -26736,137 +47412,184 @@ }; /** - * Decodes a ConversationLevelSentiment message from the specified reader or buffer, length delimited. + * Decodes an EntityMentionData message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSentiment + * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.ConversationLevelSentiment} ConversationLevelSentiment + * @returns {google.cloud.contactcenterinsights.v1.EntityMentionData} EntityMentionData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConversationLevelSentiment.decodeDelimited = function decodeDelimited(reader) { + EntityMentionData.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ConversationLevelSentiment message. + * Verifies an EntityMentionData message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSentiment + * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ConversationLevelSentiment.verify = function verify(message) { + EntityMentionData.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.channelTag != null && message.hasOwnProperty("channelTag")) - if (!$util.isInteger(message.channelTag)) - return "channelTag: integer expected"; - if (message.sentimentData != null && message.hasOwnProperty("sentimentData")) { - var error = $root.google.cloud.contactcenterinsights.v1.SentimentData.verify(message.sentimentData); + if (message.entityUniqueId != null && message.hasOwnProperty("entityUniqueId")) + if (!$util.isString(message.entityUniqueId)) + return "entityUniqueId: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.sentiment != null && message.hasOwnProperty("sentiment")) { + var error = $root.google.cloud.contactcenterinsights.v1.SentimentData.verify(message.sentiment); if (error) - return "sentimentData." + error; + return "sentiment." + error; } return null; }; /** - * Creates a ConversationLevelSentiment message from a plain object. Also converts values to their respective internal types. + * Creates an EntityMentionData message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSentiment + * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.ConversationLevelSentiment} ConversationLevelSentiment + * @returns {google.cloud.contactcenterinsights.v1.EntityMentionData} EntityMentionData */ - ConversationLevelSentiment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.ConversationLevelSentiment) + EntityMentionData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.EntityMentionData) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.ConversationLevelSentiment(); - if (object.channelTag != null) - message.channelTag = object.channelTag | 0; - if (object.sentimentData != null) { - if (typeof object.sentimentData !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.ConversationLevelSentiment.sentimentData: object expected"); - message.sentimentData = $root.google.cloud.contactcenterinsights.v1.SentimentData.fromObject(object.sentimentData); + var message = new $root.google.cloud.contactcenterinsights.v1.EntityMentionData(); + if (object.entityUniqueId != null) + message.entityUniqueId = String(object.entityUniqueId); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "MENTION_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "PROPER": + case 1: + message.type = 1; + break; + case "COMMON": + case 2: + message.type = 2; + break; + } + if (object.sentiment != null) { + if (typeof object.sentiment !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.EntityMentionData.sentiment: object expected"); + message.sentiment = $root.google.cloud.contactcenterinsights.v1.SentimentData.fromObject(object.sentiment); } return message; }; /** - * Creates a plain object from a ConversationLevelSentiment message. Also converts values to other types if specified. + * Creates a plain object from an EntityMentionData message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSentiment + * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData * @static - * @param {google.cloud.contactcenterinsights.v1.ConversationLevelSentiment} message ConversationLevelSentiment + * @param {google.cloud.contactcenterinsights.v1.EntityMentionData} message EntityMentionData * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ConversationLevelSentiment.toObject = function toObject(message, options) { + EntityMentionData.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.channelTag = 0; - object.sentimentData = null; + object.entityUniqueId = ""; + object.type = options.enums === String ? "MENTION_TYPE_UNSPECIFIED" : 0; + object.sentiment = null; } - if (message.channelTag != null && message.hasOwnProperty("channelTag")) - object.channelTag = message.channelTag; - if (message.sentimentData != null && message.hasOwnProperty("sentimentData")) - object.sentimentData = $root.google.cloud.contactcenterinsights.v1.SentimentData.toObject(message.sentimentData, options); + if (message.entityUniqueId != null && message.hasOwnProperty("entityUniqueId")) + object.entityUniqueId = message.entityUniqueId; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType[message.type] === undefined ? message.type : $root.google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType[message.type] : message.type; + if (message.sentiment != null && message.hasOwnProperty("sentiment")) + object.sentiment = $root.google.cloud.contactcenterinsights.v1.SentimentData.toObject(message.sentiment, options); return object; }; /** - * Converts this ConversationLevelSentiment to JSON. + * Converts this EntityMentionData to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSentiment + * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData * @instance * @returns {Object.} JSON object */ - ConversationLevelSentiment.prototype.toJSON = function toJSON() { + EntityMentionData.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ConversationLevelSentiment + * Gets the default type url for EntityMentionData * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSentiment + * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ConversationLevelSentiment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EntityMentionData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ConversationLevelSentiment"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.EntityMentionData"; }; - return ConversationLevelSentiment; + /** + * MentionType enum. + * @name google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType + * @enum {number} + * @property {number} MENTION_TYPE_UNSPECIFIED=0 MENTION_TYPE_UNSPECIFIED value + * @property {number} PROPER=1 PROPER value + * @property {number} COMMON=2 COMMON value + */ + EntityMentionData.MentionType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MENTION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PROPER"] = 1; + values[valuesById[2] = "COMMON"] = 2; + return values; + })(); + + return EntityMentionData; })(); - v1.ConversationLevelSilence = (function() { + v1.IntentMatchData = (function() { /** - * Properties of a ConversationLevelSilence. + * Properties of an IntentMatchData. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IConversationLevelSilence - * @property {google.protobuf.IDuration|null} [silenceDuration] ConversationLevelSilence silenceDuration - * @property {number|null} [silencePercentage] ConversationLevelSilence silencePercentage + * @interface IIntentMatchData + * @property {string|null} [intentUniqueId] IntentMatchData intentUniqueId */ /** - * Constructs a new ConversationLevelSilence. + * Constructs a new IntentMatchData. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a ConversationLevelSilence. - * @implements IConversationLevelSilence + * @classdesc Represents an IntentMatchData. + * @implements IIntentMatchData * @constructor - * @param {google.cloud.contactcenterinsights.v1.IConversationLevelSilence=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IIntentMatchData=} [properties] Properties to set */ - function ConversationLevelSilence(properties) { + function IntentMatchData(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26874,89 +47597,75 @@ } /** - * ConversationLevelSilence silenceDuration. - * @member {google.protobuf.IDuration|null|undefined} silenceDuration - * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSilence - * @instance - */ - ConversationLevelSilence.prototype.silenceDuration = null; - - /** - * ConversationLevelSilence silencePercentage. - * @member {number} silencePercentage - * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSilence + * IntentMatchData intentUniqueId. + * @member {string} intentUniqueId + * @memberof google.cloud.contactcenterinsights.v1.IntentMatchData * @instance */ - ConversationLevelSilence.prototype.silencePercentage = 0; + IntentMatchData.prototype.intentUniqueId = ""; /** - * Creates a new ConversationLevelSilence instance using the specified properties. + * Creates a new IntentMatchData instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSilence + * @memberof google.cloud.contactcenterinsights.v1.IntentMatchData * @static - * @param {google.cloud.contactcenterinsights.v1.IConversationLevelSilence=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.ConversationLevelSilence} ConversationLevelSilence instance + * @param {google.cloud.contactcenterinsights.v1.IIntentMatchData=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.IntentMatchData} IntentMatchData instance */ - ConversationLevelSilence.create = function create(properties) { - return new ConversationLevelSilence(properties); + IntentMatchData.create = function create(properties) { + return new IntentMatchData(properties); }; /** - * Encodes the specified ConversationLevelSilence message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationLevelSilence.verify|verify} messages. + * Encodes the specified IntentMatchData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IntentMatchData.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSilence + * @memberof google.cloud.contactcenterinsights.v1.IntentMatchData * @static - * @param {google.cloud.contactcenterinsights.v1.IConversationLevelSilence} message ConversationLevelSilence message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IIntentMatchData} message IntentMatchData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConversationLevelSilence.encode = function encode(message, writer) { + IntentMatchData.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.silenceDuration != null && Object.hasOwnProperty.call(message, "silenceDuration")) - $root.google.protobuf.Duration.encode(message.silenceDuration, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.silencePercentage != null && Object.hasOwnProperty.call(message, "silencePercentage")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.silencePercentage); + if (message.intentUniqueId != null && Object.hasOwnProperty.call(message, "intentUniqueId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.intentUniqueId); return writer; }; /** - * Encodes the specified ConversationLevelSilence message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationLevelSilence.verify|verify} messages. + * Encodes the specified IntentMatchData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IntentMatchData.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSilence + * @memberof google.cloud.contactcenterinsights.v1.IntentMatchData * @static - * @param {google.cloud.contactcenterinsights.v1.IConversationLevelSilence} message ConversationLevelSilence message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IIntentMatchData} message IntentMatchData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConversationLevelSilence.encodeDelimited = function encodeDelimited(message, writer) { + IntentMatchData.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ConversationLevelSilence message from the specified reader or buffer. + * Decodes an IntentMatchData message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSilence + * @memberof google.cloud.contactcenterinsights.v1.IntentMatchData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.ConversationLevelSilence} ConversationLevelSilence + * @returns {google.cloud.contactcenterinsights.v1.IntentMatchData} IntentMatchData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConversationLevelSilence.decode = function decode(reader, length) { + IntentMatchData.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ConversationLevelSilence(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.IntentMatchData(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.silenceDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 2: { - message.silencePercentage = reader.float(); + message.intentUniqueId = reader.string(); break; } default: @@ -26968,138 +47677,123 @@ }; /** - * Decodes a ConversationLevelSilence message from the specified reader or buffer, length delimited. + * Decodes an IntentMatchData message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSilence + * @memberof google.cloud.contactcenterinsights.v1.IntentMatchData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.ConversationLevelSilence} ConversationLevelSilence + * @returns {google.cloud.contactcenterinsights.v1.IntentMatchData} IntentMatchData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConversationLevelSilence.decodeDelimited = function decodeDelimited(reader) { + IntentMatchData.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ConversationLevelSilence message. + * Verifies an IntentMatchData message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSilence + * @memberof google.cloud.contactcenterinsights.v1.IntentMatchData * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ConversationLevelSilence.verify = function verify(message) { + IntentMatchData.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.silenceDuration != null && message.hasOwnProperty("silenceDuration")) { - var error = $root.google.protobuf.Duration.verify(message.silenceDuration); - if (error) - return "silenceDuration." + error; - } - if (message.silencePercentage != null && message.hasOwnProperty("silencePercentage")) - if (typeof message.silencePercentage !== "number") - return "silencePercentage: number expected"; + if (message.intentUniqueId != null && message.hasOwnProperty("intentUniqueId")) + if (!$util.isString(message.intentUniqueId)) + return "intentUniqueId: string expected"; return null; }; /** - * Creates a ConversationLevelSilence message from a plain object. Also converts values to their respective internal types. + * Creates an IntentMatchData message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSilence + * @memberof google.cloud.contactcenterinsights.v1.IntentMatchData * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.ConversationLevelSilence} ConversationLevelSilence + * @returns {google.cloud.contactcenterinsights.v1.IntentMatchData} IntentMatchData */ - ConversationLevelSilence.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.ConversationLevelSilence) + IntentMatchData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.IntentMatchData) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.ConversationLevelSilence(); - if (object.silenceDuration != null) { - if (typeof object.silenceDuration !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.ConversationLevelSilence.silenceDuration: object expected"); - message.silenceDuration = $root.google.protobuf.Duration.fromObject(object.silenceDuration); - } - if (object.silencePercentage != null) - message.silencePercentage = Number(object.silencePercentage); + var message = new $root.google.cloud.contactcenterinsights.v1.IntentMatchData(); + if (object.intentUniqueId != null) + message.intentUniqueId = String(object.intentUniqueId); return message; }; /** - * Creates a plain object from a ConversationLevelSilence message. Also converts values to other types if specified. + * Creates a plain object from an IntentMatchData message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSilence + * @memberof google.cloud.contactcenterinsights.v1.IntentMatchData * @static - * @param {google.cloud.contactcenterinsights.v1.ConversationLevelSilence} message ConversationLevelSilence + * @param {google.cloud.contactcenterinsights.v1.IntentMatchData} message IntentMatchData * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ConversationLevelSilence.toObject = function toObject(message, options) { + IntentMatchData.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.silenceDuration = null; - object.silencePercentage = 0; - } - if (message.silenceDuration != null && message.hasOwnProperty("silenceDuration")) - object.silenceDuration = $root.google.protobuf.Duration.toObject(message.silenceDuration, options); - if (message.silencePercentage != null && message.hasOwnProperty("silencePercentage")) - object.silencePercentage = options.json && !isFinite(message.silencePercentage) ? String(message.silencePercentage) : message.silencePercentage; + if (options.defaults) + object.intentUniqueId = ""; + if (message.intentUniqueId != null && message.hasOwnProperty("intentUniqueId")) + object.intentUniqueId = message.intentUniqueId; return object; }; /** - * Converts this ConversationLevelSilence to JSON. + * Converts this IntentMatchData to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSilence + * @memberof google.cloud.contactcenterinsights.v1.IntentMatchData * @instance * @returns {Object.} JSON object */ - ConversationLevelSilence.prototype.toJSON = function toJSON() { + IntentMatchData.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ConversationLevelSilence + * Gets the default type url for IntentMatchData * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSilence + * @memberof google.cloud.contactcenterinsights.v1.IntentMatchData * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ConversationLevelSilence.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + IntentMatchData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ConversationLevelSilence"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.IntentMatchData"; }; - return ConversationLevelSilence; + return IntentMatchData; })(); - v1.IssueAssignment = (function() { + v1.SentimentData = (function() { /** - * Properties of an IssueAssignment. + * Properties of a SentimentData. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IIssueAssignment - * @property {string|null} [issue] IssueAssignment issue - * @property {number|null} [score] IssueAssignment score - * @property {string|null} [displayName] IssueAssignment displayName + * @interface ISentimentData + * @property {number|null} [magnitude] SentimentData magnitude + * @property {number|null} [score] SentimentData score */ /** - * Constructs a new IssueAssignment. + * Constructs a new SentimentData. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents an IssueAssignment. - * @implements IIssueAssignment + * @classdesc Represents a SentimentData. + * @implements ISentimentData * @constructor - * @param {google.cloud.contactcenterinsights.v1.IIssueAssignment=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.ISentimentData=} [properties] Properties to set */ - function IssueAssignment(properties) { + function SentimentData(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27107,103 +47801,89 @@ } /** - * IssueAssignment issue. - * @member {string} issue - * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * SentimentData magnitude. + * @member {number} magnitude + * @memberof google.cloud.contactcenterinsights.v1.SentimentData * @instance */ - IssueAssignment.prototype.issue = ""; + SentimentData.prototype.magnitude = 0; /** - * IssueAssignment score. + * SentimentData score. * @member {number} score - * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment - * @instance - */ - IssueAssignment.prototype.score = 0; - - /** - * IssueAssignment displayName. - * @member {string} displayName - * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * @memberof google.cloud.contactcenterinsights.v1.SentimentData * @instance */ - IssueAssignment.prototype.displayName = ""; + SentimentData.prototype.score = 0; /** - * Creates a new IssueAssignment instance using the specified properties. + * Creates a new SentimentData instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * @memberof google.cloud.contactcenterinsights.v1.SentimentData * @static - * @param {google.cloud.contactcenterinsights.v1.IIssueAssignment=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.IssueAssignment} IssueAssignment instance + * @param {google.cloud.contactcenterinsights.v1.ISentimentData=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.SentimentData} SentimentData instance */ - IssueAssignment.create = function create(properties) { - return new IssueAssignment(properties); + SentimentData.create = function create(properties) { + return new SentimentData(properties); }; /** - * Encodes the specified IssueAssignment message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueAssignment.verify|verify} messages. + * Encodes the specified SentimentData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SentimentData.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * @memberof google.cloud.contactcenterinsights.v1.SentimentData * @static - * @param {google.cloud.contactcenterinsights.v1.IIssueAssignment} message IssueAssignment message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.ISentimentData} message SentimentData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - IssueAssignment.encode = function encode(message, writer) { + SentimentData.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.issue != null && Object.hasOwnProperty.call(message, "issue")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.issue); + if (message.magnitude != null && Object.hasOwnProperty.call(message, "magnitude")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.magnitude); if (message.score != null && Object.hasOwnProperty.call(message, "score")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.score); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + writer.uint32(/* id 2, wireType 5 =*/21).float(message.score); return writer; }; /** - * Encodes the specified IssueAssignment message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueAssignment.verify|verify} messages. + * Encodes the specified SentimentData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SentimentData.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * @memberof google.cloud.contactcenterinsights.v1.SentimentData * @static - * @param {google.cloud.contactcenterinsights.v1.IIssueAssignment} message IssueAssignment message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.ISentimentData} message SentimentData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - IssueAssignment.encodeDelimited = function encodeDelimited(message, writer) { + SentimentData.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an IssueAssignment message from the specified reader or buffer. + * Decodes a SentimentData message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * @memberof google.cloud.contactcenterinsights.v1.SentimentData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.IssueAssignment} IssueAssignment + * @returns {google.cloud.contactcenterinsights.v1.SentimentData} SentimentData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - IssueAssignment.decode = function decode(reader, length) { + SentimentData.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.IssueAssignment(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.SentimentData(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.issue = reader.string(); + message.magnitude = reader.float(); break; } case 2: { - message.score = reader.double(); - break; - } - case 3: { - message.displayName = reader.string(); + message.score = reader.float(); break; } default: @@ -27215,149 +47895,131 @@ }; /** - * Decodes an IssueAssignment message from the specified reader or buffer, length delimited. + * Decodes a SentimentData message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * @memberof google.cloud.contactcenterinsights.v1.SentimentData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.IssueAssignment} IssueAssignment + * @returns {google.cloud.contactcenterinsights.v1.SentimentData} SentimentData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - IssueAssignment.decodeDelimited = function decodeDelimited(reader) { + SentimentData.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an IssueAssignment message. + * Verifies a SentimentData message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * @memberof google.cloud.contactcenterinsights.v1.SentimentData * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - IssueAssignment.verify = function verify(message) { + SentimentData.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.issue != null && message.hasOwnProperty("issue")) - if (!$util.isString(message.issue)) - return "issue: string expected"; + if (message.magnitude != null && message.hasOwnProperty("magnitude")) + if (typeof message.magnitude !== "number") + return "magnitude: number expected"; if (message.score != null && message.hasOwnProperty("score")) if (typeof message.score !== "number") return "score: number expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; return null; }; /** - * Creates an IssueAssignment message from a plain object. Also converts values to their respective internal types. + * Creates a SentimentData message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * @memberof google.cloud.contactcenterinsights.v1.SentimentData * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.IssueAssignment} IssueAssignment + * @returns {google.cloud.contactcenterinsights.v1.SentimentData} SentimentData */ - IssueAssignment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.IssueAssignment) + SentimentData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.SentimentData) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.IssueAssignment(); - if (object.issue != null) - message.issue = String(object.issue); + var message = new $root.google.cloud.contactcenterinsights.v1.SentimentData(); + if (object.magnitude != null) + message.magnitude = Number(object.magnitude); if (object.score != null) message.score = Number(object.score); - if (object.displayName != null) - message.displayName = String(object.displayName); return message; }; /** - * Creates a plain object from an IssueAssignment message. Also converts values to other types if specified. + * Creates a plain object from a SentimentData message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * @memberof google.cloud.contactcenterinsights.v1.SentimentData * @static - * @param {google.cloud.contactcenterinsights.v1.IssueAssignment} message IssueAssignment + * @param {google.cloud.contactcenterinsights.v1.SentimentData} message SentimentData * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - IssueAssignment.toObject = function toObject(message, options) { + SentimentData.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.issue = ""; + object.magnitude = 0; object.score = 0; - object.displayName = ""; } - if (message.issue != null && message.hasOwnProperty("issue")) - object.issue = message.issue; + if (message.magnitude != null && message.hasOwnProperty("magnitude")) + object.magnitude = options.json && !isFinite(message.magnitude) ? String(message.magnitude) : message.magnitude; if (message.score != null && message.hasOwnProperty("score")) object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; return object; }; /** - * Converts this IssueAssignment to JSON. + * Converts this SentimentData to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * @memberof google.cloud.contactcenterinsights.v1.SentimentData * @instance * @returns {Object.} JSON object */ - IssueAssignment.prototype.toJSON = function toJSON() { + SentimentData.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for IssueAssignment + * Gets the default type url for SentimentData * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.IssueAssignment + * @memberof google.cloud.contactcenterinsights.v1.SentimentData * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - IssueAssignment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SentimentData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.IssueAssignment"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.SentimentData"; }; - return IssueAssignment; + return SentimentData; })(); - v1.CallAnnotation = (function() { + v1.IssueMatchData = (function() { /** - * Properties of a CallAnnotation. + * Properties of an IssueMatchData. * @memberof google.cloud.contactcenterinsights.v1 - * @interface ICallAnnotation - * @property {google.cloud.contactcenterinsights.v1.IInterruptionData|null} [interruptionData] CallAnnotation interruptionData - * @property {google.cloud.contactcenterinsights.v1.ISentimentData|null} [sentimentData] CallAnnotation sentimentData - * @property {google.cloud.contactcenterinsights.v1.ISilenceData|null} [silenceData] CallAnnotation silenceData - * @property {google.cloud.contactcenterinsights.v1.IHoldData|null} [holdData] CallAnnotation holdData - * @property {google.cloud.contactcenterinsights.v1.IEntityMentionData|null} [entityMentionData] CallAnnotation entityMentionData - * @property {google.cloud.contactcenterinsights.v1.IIntentMatchData|null} [intentMatchData] CallAnnotation intentMatchData - * @property {google.cloud.contactcenterinsights.v1.IPhraseMatchData|null} [phraseMatchData] CallAnnotation phraseMatchData - * @property {google.cloud.contactcenterinsights.v1.IIssueMatchData|null} [issueMatchData] CallAnnotation issueMatchData - * @property {number|null} [channelTag] CallAnnotation channelTag - * @property {google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null} [annotationStartBoundary] CallAnnotation annotationStartBoundary - * @property {google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null} [annotationEndBoundary] CallAnnotation annotationEndBoundary + * @interface IIssueMatchData + * @property {google.cloud.contactcenterinsights.v1.IIssueAssignment|null} [issueAssignment] IssueMatchData issueAssignment */ /** - * Constructs a new CallAnnotation. + * Constructs a new IssueMatchData. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a CallAnnotation. - * @implements ICallAnnotation + * @classdesc Represents an IssueMatchData. + * @implements IIssueMatchData * @constructor - * @param {google.cloud.contactcenterinsights.v1.ICallAnnotation=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IIssueMatchData=} [properties] Properties to set */ - function CallAnnotation(properties) { + function IssueMatchData(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27365,229 +48027,75 @@ } /** - * CallAnnotation interruptionData. - * @member {google.cloud.contactcenterinsights.v1.IInterruptionData|null|undefined} interruptionData - * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation - * @instance - */ - CallAnnotation.prototype.interruptionData = null; - - /** - * CallAnnotation sentimentData. - * @member {google.cloud.contactcenterinsights.v1.ISentimentData|null|undefined} sentimentData - * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation - * @instance - */ - CallAnnotation.prototype.sentimentData = null; - - /** - * CallAnnotation silenceData. - * @member {google.cloud.contactcenterinsights.v1.ISilenceData|null|undefined} silenceData - * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation - * @instance - */ - CallAnnotation.prototype.silenceData = null; - - /** - * CallAnnotation holdData. - * @member {google.cloud.contactcenterinsights.v1.IHoldData|null|undefined} holdData - * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation - * @instance - */ - CallAnnotation.prototype.holdData = null; - - /** - * CallAnnotation entityMentionData. - * @member {google.cloud.contactcenterinsights.v1.IEntityMentionData|null|undefined} entityMentionData - * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation - * @instance - */ - CallAnnotation.prototype.entityMentionData = null; - - /** - * CallAnnotation intentMatchData. - * @member {google.cloud.contactcenterinsights.v1.IIntentMatchData|null|undefined} intentMatchData - * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation - * @instance - */ - CallAnnotation.prototype.intentMatchData = null; - - /** - * CallAnnotation phraseMatchData. - * @member {google.cloud.contactcenterinsights.v1.IPhraseMatchData|null|undefined} phraseMatchData - * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation - * @instance - */ - CallAnnotation.prototype.phraseMatchData = null; - - /** - * CallAnnotation issueMatchData. - * @member {google.cloud.contactcenterinsights.v1.IIssueMatchData|null|undefined} issueMatchData - * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation - * @instance - */ - CallAnnotation.prototype.issueMatchData = null; - - /** - * CallAnnotation channelTag. - * @member {number} channelTag - * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation - * @instance - */ - CallAnnotation.prototype.channelTag = 0; - - /** - * CallAnnotation annotationStartBoundary. - * @member {google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null|undefined} annotationStartBoundary - * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation - * @instance - */ - CallAnnotation.prototype.annotationStartBoundary = null; - - /** - * CallAnnotation annotationEndBoundary. - * @member {google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null|undefined} annotationEndBoundary - * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation - * @instance - */ - CallAnnotation.prototype.annotationEndBoundary = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * CallAnnotation data. - * @member {"interruptionData"|"sentimentData"|"silenceData"|"holdData"|"entityMentionData"|"intentMatchData"|"phraseMatchData"|"issueMatchData"|undefined} data - * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * IssueMatchData issueAssignment. + * @member {google.cloud.contactcenterinsights.v1.IIssueAssignment|null|undefined} issueAssignment + * @memberof google.cloud.contactcenterinsights.v1.IssueMatchData * @instance */ - Object.defineProperty(CallAnnotation.prototype, "data", { - get: $util.oneOfGetter($oneOfFields = ["interruptionData", "sentimentData", "silenceData", "holdData", "entityMentionData", "intentMatchData", "phraseMatchData", "issueMatchData"]), - set: $util.oneOfSetter($oneOfFields) - }); + IssueMatchData.prototype.issueAssignment = null; /** - * Creates a new CallAnnotation instance using the specified properties. + * Creates a new IssueMatchData instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @memberof google.cloud.contactcenterinsights.v1.IssueMatchData * @static - * @param {google.cloud.contactcenterinsights.v1.ICallAnnotation=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.CallAnnotation} CallAnnotation instance + * @param {google.cloud.contactcenterinsights.v1.IIssueMatchData=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.IssueMatchData} IssueMatchData instance */ - CallAnnotation.create = function create(properties) { - return new CallAnnotation(properties); + IssueMatchData.create = function create(properties) { + return new IssueMatchData(properties); }; /** - * Encodes the specified CallAnnotation message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CallAnnotation.verify|verify} messages. + * Encodes the specified IssueMatchData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueMatchData.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @memberof google.cloud.contactcenterinsights.v1.IssueMatchData * @static - * @param {google.cloud.contactcenterinsights.v1.ICallAnnotation} message CallAnnotation message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IIssueMatchData} message IssueMatchData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CallAnnotation.encode = function encode(message, writer) { + IssueMatchData.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.channelTag != null && Object.hasOwnProperty.call(message, "channelTag")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.channelTag); - if (message.annotationStartBoundary != null && Object.hasOwnProperty.call(message, "annotationStartBoundary")) - $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.encode(message.annotationStartBoundary, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.annotationEndBoundary != null && Object.hasOwnProperty.call(message, "annotationEndBoundary")) - $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.encode(message.annotationEndBoundary, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.interruptionData != null && Object.hasOwnProperty.call(message, "interruptionData")) - $root.google.cloud.contactcenterinsights.v1.InterruptionData.encode(message.interruptionData, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.sentimentData != null && Object.hasOwnProperty.call(message, "sentimentData")) - $root.google.cloud.contactcenterinsights.v1.SentimentData.encode(message.sentimentData, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.silenceData != null && Object.hasOwnProperty.call(message, "silenceData")) - $root.google.cloud.contactcenterinsights.v1.SilenceData.encode(message.silenceData, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.holdData != null && Object.hasOwnProperty.call(message, "holdData")) - $root.google.cloud.contactcenterinsights.v1.HoldData.encode(message.holdData, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.entityMentionData != null && Object.hasOwnProperty.call(message, "entityMentionData")) - $root.google.cloud.contactcenterinsights.v1.EntityMentionData.encode(message.entityMentionData, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.intentMatchData != null && Object.hasOwnProperty.call(message, "intentMatchData")) - $root.google.cloud.contactcenterinsights.v1.IntentMatchData.encode(message.intentMatchData, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.phraseMatchData != null && Object.hasOwnProperty.call(message, "phraseMatchData")) - $root.google.cloud.contactcenterinsights.v1.PhraseMatchData.encode(message.phraseMatchData, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.issueMatchData != null && Object.hasOwnProperty.call(message, "issueMatchData")) - $root.google.cloud.contactcenterinsights.v1.IssueMatchData.encode(message.issueMatchData, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.issueAssignment != null && Object.hasOwnProperty.call(message, "issueAssignment")) + $root.google.cloud.contactcenterinsights.v1.IssueAssignment.encode(message.issueAssignment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified CallAnnotation message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CallAnnotation.verify|verify} messages. + * Encodes the specified IssueMatchData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueMatchData.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @memberof google.cloud.contactcenterinsights.v1.IssueMatchData * @static - * @param {google.cloud.contactcenterinsights.v1.ICallAnnotation} message CallAnnotation message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IIssueMatchData} message IssueMatchData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CallAnnotation.encodeDelimited = function encodeDelimited(message, writer) { + IssueMatchData.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CallAnnotation message from the specified reader or buffer. + * Decodes an IssueMatchData message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @memberof google.cloud.contactcenterinsights.v1.IssueMatchData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.CallAnnotation} CallAnnotation + * @returns {google.cloud.contactcenterinsights.v1.IssueMatchData} IssueMatchData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CallAnnotation.decode = function decode(reader, length) { + IssueMatchData.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.CallAnnotation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.IssueMatchData(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 10: { - message.interruptionData = $root.google.cloud.contactcenterinsights.v1.InterruptionData.decode(reader, reader.uint32()); - break; - } - case 11: { - message.sentimentData = $root.google.cloud.contactcenterinsights.v1.SentimentData.decode(reader, reader.uint32()); - break; - } - case 12: { - message.silenceData = $root.google.cloud.contactcenterinsights.v1.SilenceData.decode(reader, reader.uint32()); - break; - } - case 13: { - message.holdData = $root.google.cloud.contactcenterinsights.v1.HoldData.decode(reader, reader.uint32()); - break; - } - case 15: { - message.entityMentionData = $root.google.cloud.contactcenterinsights.v1.EntityMentionData.decode(reader, reader.uint32()); - break; - } - case 16: { - message.intentMatchData = $root.google.cloud.contactcenterinsights.v1.IntentMatchData.decode(reader, reader.uint32()); - break; - } - case 17: { - message.phraseMatchData = $root.google.cloud.contactcenterinsights.v1.PhraseMatchData.decode(reader, reader.uint32()); - break; - } - case 18: { - message.issueMatchData = $root.google.cloud.contactcenterinsights.v1.IssueMatchData.decode(reader, reader.uint32()); - break; - } case 1: { - message.channelTag = reader.int32(); - break; - } - case 4: { - message.annotationStartBoundary = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.decode(reader, reader.uint32()); - break; - } - case 5: { - message.annotationEndBoundary = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.decode(reader, reader.uint32()); + message.issueAssignment = $root.google.cloud.contactcenterinsights.v1.IssueAssignment.decode(reader, reader.uint32()); break; } default: @@ -27599,309 +48107,136 @@ }; /** - * Decodes a CallAnnotation message from the specified reader or buffer, length delimited. + * Decodes an IssueMatchData message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @memberof google.cloud.contactcenterinsights.v1.IssueMatchData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.CallAnnotation} CallAnnotation + * @returns {google.cloud.contactcenterinsights.v1.IssueMatchData} IssueMatchData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CallAnnotation.decodeDelimited = function decodeDelimited(reader) { + IssueMatchData.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CallAnnotation message. + * Verifies an IssueMatchData message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @memberof google.cloud.contactcenterinsights.v1.IssueMatchData * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CallAnnotation.verify = function verify(message) { + IssueMatchData.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.interruptionData != null && message.hasOwnProperty("interruptionData")) { - properties.data = 1; - { - var error = $root.google.cloud.contactcenterinsights.v1.InterruptionData.verify(message.interruptionData); - if (error) - return "interruptionData." + error; - } - } - if (message.sentimentData != null && message.hasOwnProperty("sentimentData")) { - if (properties.data === 1) - return "data: multiple values"; - properties.data = 1; - { - var error = $root.google.cloud.contactcenterinsights.v1.SentimentData.verify(message.sentimentData); - if (error) - return "sentimentData." + error; - } - } - if (message.silenceData != null && message.hasOwnProperty("silenceData")) { - if (properties.data === 1) - return "data: multiple values"; - properties.data = 1; - { - var error = $root.google.cloud.contactcenterinsights.v1.SilenceData.verify(message.silenceData); - if (error) - return "silenceData." + error; - } - } - if (message.holdData != null && message.hasOwnProperty("holdData")) { - if (properties.data === 1) - return "data: multiple values"; - properties.data = 1; - { - var error = $root.google.cloud.contactcenterinsights.v1.HoldData.verify(message.holdData); - if (error) - return "holdData." + error; - } - } - if (message.entityMentionData != null && message.hasOwnProperty("entityMentionData")) { - if (properties.data === 1) - return "data: multiple values"; - properties.data = 1; - { - var error = $root.google.cloud.contactcenterinsights.v1.EntityMentionData.verify(message.entityMentionData); - if (error) - return "entityMentionData." + error; - } - } - if (message.intentMatchData != null && message.hasOwnProperty("intentMatchData")) { - if (properties.data === 1) - return "data: multiple values"; - properties.data = 1; - { - var error = $root.google.cloud.contactcenterinsights.v1.IntentMatchData.verify(message.intentMatchData); - if (error) - return "intentMatchData." + error; - } - } - if (message.phraseMatchData != null && message.hasOwnProperty("phraseMatchData")) { - if (properties.data === 1) - return "data: multiple values"; - properties.data = 1; - { - var error = $root.google.cloud.contactcenterinsights.v1.PhraseMatchData.verify(message.phraseMatchData); - if (error) - return "phraseMatchData." + error; - } - } - if (message.issueMatchData != null && message.hasOwnProperty("issueMatchData")) { - if (properties.data === 1) - return "data: multiple values"; - properties.data = 1; - { - var error = $root.google.cloud.contactcenterinsights.v1.IssueMatchData.verify(message.issueMatchData); - if (error) - return "issueMatchData." + error; - } - } - if (message.channelTag != null && message.hasOwnProperty("channelTag")) - if (!$util.isInteger(message.channelTag)) - return "channelTag: integer expected"; - if (message.annotationStartBoundary != null && message.hasOwnProperty("annotationStartBoundary")) { - var error = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.verify(message.annotationStartBoundary); - if (error) - return "annotationStartBoundary." + error; - } - if (message.annotationEndBoundary != null && message.hasOwnProperty("annotationEndBoundary")) { - var error = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.verify(message.annotationEndBoundary); + if (message.issueAssignment != null && message.hasOwnProperty("issueAssignment")) { + var error = $root.google.cloud.contactcenterinsights.v1.IssueAssignment.verify(message.issueAssignment); if (error) - return "annotationEndBoundary." + error; + return "issueAssignment." + error; } return null; }; /** - * Creates a CallAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates an IssueMatchData message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @memberof google.cloud.contactcenterinsights.v1.IssueMatchData * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.CallAnnotation} CallAnnotation + * @returns {google.cloud.contactcenterinsights.v1.IssueMatchData} IssueMatchData */ - CallAnnotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.CallAnnotation) + IssueMatchData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.IssueMatchData) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.CallAnnotation(); - if (object.interruptionData != null) { - if (typeof object.interruptionData !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.CallAnnotation.interruptionData: object expected"); - message.interruptionData = $root.google.cloud.contactcenterinsights.v1.InterruptionData.fromObject(object.interruptionData); - } - if (object.sentimentData != null) { - if (typeof object.sentimentData !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.CallAnnotation.sentimentData: object expected"); - message.sentimentData = $root.google.cloud.contactcenterinsights.v1.SentimentData.fromObject(object.sentimentData); - } - if (object.silenceData != null) { - if (typeof object.silenceData !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.CallAnnotation.silenceData: object expected"); - message.silenceData = $root.google.cloud.contactcenterinsights.v1.SilenceData.fromObject(object.silenceData); - } - if (object.holdData != null) { - if (typeof object.holdData !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.CallAnnotation.holdData: object expected"); - message.holdData = $root.google.cloud.contactcenterinsights.v1.HoldData.fromObject(object.holdData); - } - if (object.entityMentionData != null) { - if (typeof object.entityMentionData !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.CallAnnotation.entityMentionData: object expected"); - message.entityMentionData = $root.google.cloud.contactcenterinsights.v1.EntityMentionData.fromObject(object.entityMentionData); - } - if (object.intentMatchData != null) { - if (typeof object.intentMatchData !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.CallAnnotation.intentMatchData: object expected"); - message.intentMatchData = $root.google.cloud.contactcenterinsights.v1.IntentMatchData.fromObject(object.intentMatchData); - } - if (object.phraseMatchData != null) { - if (typeof object.phraseMatchData !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.CallAnnotation.phraseMatchData: object expected"); - message.phraseMatchData = $root.google.cloud.contactcenterinsights.v1.PhraseMatchData.fromObject(object.phraseMatchData); - } - if (object.issueMatchData != null) { - if (typeof object.issueMatchData !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.CallAnnotation.issueMatchData: object expected"); - message.issueMatchData = $root.google.cloud.contactcenterinsights.v1.IssueMatchData.fromObject(object.issueMatchData); - } - if (object.channelTag != null) - message.channelTag = object.channelTag | 0; - if (object.annotationStartBoundary != null) { - if (typeof object.annotationStartBoundary !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.CallAnnotation.annotationStartBoundary: object expected"); - message.annotationStartBoundary = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.fromObject(object.annotationStartBoundary); - } - if (object.annotationEndBoundary != null) { - if (typeof object.annotationEndBoundary !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.CallAnnotation.annotationEndBoundary: object expected"); - message.annotationEndBoundary = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.fromObject(object.annotationEndBoundary); + var message = new $root.google.cloud.contactcenterinsights.v1.IssueMatchData(); + if (object.issueAssignment != null) { + if (typeof object.issueAssignment !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.IssueMatchData.issueAssignment: object expected"); + message.issueAssignment = $root.google.cloud.contactcenterinsights.v1.IssueAssignment.fromObject(object.issueAssignment); } return message; }; /** - * Creates a plain object from a CallAnnotation message. Also converts values to other types if specified. + * Creates a plain object from an IssueMatchData message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @memberof google.cloud.contactcenterinsights.v1.IssueMatchData * @static - * @param {google.cloud.contactcenterinsights.v1.CallAnnotation} message CallAnnotation + * @param {google.cloud.contactcenterinsights.v1.IssueMatchData} message IssueMatchData * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CallAnnotation.toObject = function toObject(message, options) { + IssueMatchData.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.channelTag = 0; - object.annotationStartBoundary = null; - object.annotationEndBoundary = null; - } - if (message.channelTag != null && message.hasOwnProperty("channelTag")) - object.channelTag = message.channelTag; - if (message.annotationStartBoundary != null && message.hasOwnProperty("annotationStartBoundary")) - object.annotationStartBoundary = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.toObject(message.annotationStartBoundary, options); - if (message.annotationEndBoundary != null && message.hasOwnProperty("annotationEndBoundary")) - object.annotationEndBoundary = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.toObject(message.annotationEndBoundary, options); - if (message.interruptionData != null && message.hasOwnProperty("interruptionData")) { - object.interruptionData = $root.google.cloud.contactcenterinsights.v1.InterruptionData.toObject(message.interruptionData, options); - if (options.oneofs) - object.data = "interruptionData"; - } - if (message.sentimentData != null && message.hasOwnProperty("sentimentData")) { - object.sentimentData = $root.google.cloud.contactcenterinsights.v1.SentimentData.toObject(message.sentimentData, options); - if (options.oneofs) - object.data = "sentimentData"; - } - if (message.silenceData != null && message.hasOwnProperty("silenceData")) { - object.silenceData = $root.google.cloud.contactcenterinsights.v1.SilenceData.toObject(message.silenceData, options); - if (options.oneofs) - object.data = "silenceData"; - } - if (message.holdData != null && message.hasOwnProperty("holdData")) { - object.holdData = $root.google.cloud.contactcenterinsights.v1.HoldData.toObject(message.holdData, options); - if (options.oneofs) - object.data = "holdData"; - } - if (message.entityMentionData != null && message.hasOwnProperty("entityMentionData")) { - object.entityMentionData = $root.google.cloud.contactcenterinsights.v1.EntityMentionData.toObject(message.entityMentionData, options); - if (options.oneofs) - object.data = "entityMentionData"; - } - if (message.intentMatchData != null && message.hasOwnProperty("intentMatchData")) { - object.intentMatchData = $root.google.cloud.contactcenterinsights.v1.IntentMatchData.toObject(message.intentMatchData, options); - if (options.oneofs) - object.data = "intentMatchData"; - } - if (message.phraseMatchData != null && message.hasOwnProperty("phraseMatchData")) { - object.phraseMatchData = $root.google.cloud.contactcenterinsights.v1.PhraseMatchData.toObject(message.phraseMatchData, options); - if (options.oneofs) - object.data = "phraseMatchData"; - } - if (message.issueMatchData != null && message.hasOwnProperty("issueMatchData")) { - object.issueMatchData = $root.google.cloud.contactcenterinsights.v1.IssueMatchData.toObject(message.issueMatchData, options); - if (options.oneofs) - object.data = "issueMatchData"; - } + if (options.defaults) + object.issueAssignment = null; + if (message.issueAssignment != null && message.hasOwnProperty("issueAssignment")) + object.issueAssignment = $root.google.cloud.contactcenterinsights.v1.IssueAssignment.toObject(message.issueAssignment, options); return object; }; /** - * Converts this CallAnnotation to JSON. + * Converts this IssueMatchData to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @memberof google.cloud.contactcenterinsights.v1.IssueMatchData * @instance * @returns {Object.} JSON object */ - CallAnnotation.prototype.toJSON = function toJSON() { + IssueMatchData.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CallAnnotation + * Gets the default type url for IssueMatchData * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @memberof google.cloud.contactcenterinsights.v1.IssueMatchData * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CallAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + IssueMatchData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.CallAnnotation"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.IssueMatchData"; }; - return CallAnnotation; + return IssueMatchData; })(); - v1.AnnotationBoundary = (function() { + v1.IssueModel = (function() { /** - * Properties of an AnnotationBoundary. + * Properties of an IssueModel. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IAnnotationBoundary - * @property {number|null} [wordIndex] AnnotationBoundary wordIndex - * @property {number|null} [transcriptIndex] AnnotationBoundary transcriptIndex + * @interface IIssueModel + * @property {string|null} [name] IssueModel name + * @property {string|null} [displayName] IssueModel displayName + * @property {google.protobuf.ITimestamp|null} [createTime] IssueModel createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] IssueModel updateTime + * @property {number|Long|null} [issueCount] IssueModel issueCount + * @property {google.cloud.contactcenterinsights.v1.IssueModel.State|null} [state] IssueModel state + * @property {google.cloud.contactcenterinsights.v1.IssueModel.IInputDataConfig|null} [inputDataConfig] IssueModel inputDataConfig + * @property {google.cloud.contactcenterinsights.v1.IIssueModelLabelStats|null} [trainingStats] IssueModel trainingStats + * @property {google.cloud.contactcenterinsights.v1.IssueModel.ModelType|null} [modelType] IssueModel modelType + * @property {string|null} [languageCode] IssueModel languageCode */ /** - * Constructs a new AnnotationBoundary. + * Constructs a new IssueModel. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents an AnnotationBoundary. - * @implements IAnnotationBoundary + * @classdesc Represents an IssueModel. + * @implements IIssueModel * @constructor - * @param {google.cloud.contactcenterinsights.v1.IAnnotationBoundary=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IIssueModel=} [properties] Properties to set */ - function AnnotationBoundary(properties) { + function IssueModel(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27909,103 +48244,201 @@ } /** - * AnnotationBoundary wordIndex. - * @member {number|null|undefined} wordIndex - * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary + * IssueModel name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.IssueModel * @instance */ - AnnotationBoundary.prototype.wordIndex = null; + IssueModel.prototype.name = ""; /** - * AnnotationBoundary transcriptIndex. - * @member {number} transcriptIndex - * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary + * IssueModel displayName. + * @member {string} displayName + * @memberof google.cloud.contactcenterinsights.v1.IssueModel * @instance */ - AnnotationBoundary.prototype.transcriptIndex = 0; + IssueModel.prototype.displayName = ""; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * IssueModel createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @instance + */ + IssueModel.prototype.createTime = null; /** - * AnnotationBoundary detailedBoundary. - * @member {"wordIndex"|undefined} detailedBoundary - * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary + * IssueModel updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.contactcenterinsights.v1.IssueModel * @instance */ - Object.defineProperty(AnnotationBoundary.prototype, "detailedBoundary", { - get: $util.oneOfGetter($oneOfFields = ["wordIndex"]), - set: $util.oneOfSetter($oneOfFields) - }); + IssueModel.prototype.updateTime = null; /** - * Creates a new AnnotationBoundary instance using the specified properties. + * IssueModel issueCount. + * @member {number|Long} issueCount + * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @instance + */ + IssueModel.prototype.issueCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * IssueModel state. + * @member {google.cloud.contactcenterinsights.v1.IssueModel.State} state + * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @instance + */ + IssueModel.prototype.state = 0; + + /** + * IssueModel inputDataConfig. + * @member {google.cloud.contactcenterinsights.v1.IssueModel.IInputDataConfig|null|undefined} inputDataConfig + * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @instance + */ + IssueModel.prototype.inputDataConfig = null; + + /** + * IssueModel trainingStats. + * @member {google.cloud.contactcenterinsights.v1.IIssueModelLabelStats|null|undefined} trainingStats + * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @instance + */ + IssueModel.prototype.trainingStats = null; + + /** + * IssueModel modelType. + * @member {google.cloud.contactcenterinsights.v1.IssueModel.ModelType} modelType + * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @instance + */ + IssueModel.prototype.modelType = 0; + + /** + * IssueModel languageCode. + * @member {string} languageCode + * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @instance + */ + IssueModel.prototype.languageCode = ""; + + /** + * Creates a new IssueModel instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary + * @memberof google.cloud.contactcenterinsights.v1.IssueModel * @static - * @param {google.cloud.contactcenterinsights.v1.IAnnotationBoundary=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.AnnotationBoundary} AnnotationBoundary instance + * @param {google.cloud.contactcenterinsights.v1.IIssueModel=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.IssueModel} IssueModel instance */ - AnnotationBoundary.create = function create(properties) { - return new AnnotationBoundary(properties); + IssueModel.create = function create(properties) { + return new IssueModel(properties); }; /** - * Encodes the specified AnnotationBoundary message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotationBoundary.verify|verify} messages. + * Encodes the specified IssueModel message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModel.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary + * @memberof google.cloud.contactcenterinsights.v1.IssueModel * @static - * @param {google.cloud.contactcenterinsights.v1.IAnnotationBoundary} message AnnotationBoundary message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IIssueModel} message IssueModel message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnnotationBoundary.encode = function encode(message, writer) { + IssueModel.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.transcriptIndex != null && Object.hasOwnProperty.call(message, "transcriptIndex")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.transcriptIndex); - if (message.wordIndex != null && Object.hasOwnProperty.call(message, "wordIndex")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.wordIndex); + 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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + if (message.inputDataConfig != null && Object.hasOwnProperty.call(message, "inputDataConfig")) + $root.google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig.encode(message.inputDataConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.trainingStats != null && Object.hasOwnProperty.call(message, "trainingStats")) + $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.encode(message.trainingStats, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.issueCount != null && Object.hasOwnProperty.call(message, "issueCount")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.issueCount); + if (message.modelType != null && Object.hasOwnProperty.call(message, "modelType")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.modelType); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.languageCode); return writer; }; /** - * Encodes the specified AnnotationBoundary message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotationBoundary.verify|verify} messages. + * Encodes the specified IssueModel message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModel.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary + * @memberof google.cloud.contactcenterinsights.v1.IssueModel * @static - * @param {google.cloud.contactcenterinsights.v1.IAnnotationBoundary} message AnnotationBoundary message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IIssueModel} message IssueModel message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnnotationBoundary.encodeDelimited = function encodeDelimited(message, writer) { + IssueModel.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AnnotationBoundary message from the specified reader or buffer. + * Decodes an IssueModel message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary + * @memberof google.cloud.contactcenterinsights.v1.IssueModel * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.AnnotationBoundary} AnnotationBoundary + * @returns {google.cloud.contactcenterinsights.v1.IssueModel} IssueModel * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnnotationBoundary.decode = function decode(reader, length) { + IssueModel.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.IssueModel(); 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; + } case 3: { - message.wordIndex = reader.int32(); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } - case 1: { - message.transcriptIndex = reader.int32(); + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.issueCount = reader.int64(); + break; + } + case 5: { + message.state = reader.int32(); + break; + } + case 6: { + message.inputDataConfig = $root.google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig.decode(reader, reader.uint32()); + break; + } + case 7: { + message.trainingStats = $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.decode(reader, reader.uint32()); + break; + } + case 9: { + message.modelType = reader.int32(); + break; + } + case 10: { + message.languageCode = reader.string(); break; } default: @@ -28017,140 +48450,624 @@ }; /** - * Decodes an AnnotationBoundary message from the specified reader or buffer, length delimited. + * Decodes an IssueModel message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary + * @memberof google.cloud.contactcenterinsights.v1.IssueModel * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.AnnotationBoundary} AnnotationBoundary + * @returns {google.cloud.contactcenterinsights.v1.IssueModel} IssueModel * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnnotationBoundary.decodeDelimited = function decodeDelimited(reader) { + IssueModel.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AnnotationBoundary message. + * Verifies an IssueModel message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary + * @memberof google.cloud.contactcenterinsights.v1.IssueModel * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AnnotationBoundary.verify = function verify(message) { + IssueModel.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.wordIndex != null && message.hasOwnProperty("wordIndex")) { - properties.detailedBoundary = 1; - if (!$util.isInteger(message.wordIndex)) - return "wordIndex: integer 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.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.issueCount != null && message.hasOwnProperty("issueCount")) + if (!$util.isInteger(message.issueCount) && !(message.issueCount && $util.isInteger(message.issueCount.low) && $util.isInteger(message.issueCount.high))) + return "issueCount: integer|Long expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.inputDataConfig != null && message.hasOwnProperty("inputDataConfig")) { + var error = $root.google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig.verify(message.inputDataConfig); + if (error) + return "inputDataConfig." + error; + } + if (message.trainingStats != null && message.hasOwnProperty("trainingStats")) { + var error = $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.verify(message.trainingStats); + if (error) + return "trainingStats." + error; + } + if (message.modelType != null && message.hasOwnProperty("modelType")) + switch (message.modelType) { + default: + return "modelType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + return null; + }; + + /** + * Creates an IssueModel message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.IssueModel} IssueModel + */ + IssueModel.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.IssueModel) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.IssueModel(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.IssueModel.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.IssueModel.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.issueCount != null) + if ($util.Long) + (message.issueCount = $util.Long.fromValue(object.issueCount)).unsigned = false; + else if (typeof object.issueCount === "string") + message.issueCount = parseInt(object.issueCount, 10); + else if (typeof object.issueCount === "number") + message.issueCount = object.issueCount; + else if (typeof object.issueCount === "object") + message.issueCount = new $util.LongBits(object.issueCount.low >>> 0, object.issueCount.high >>> 0).toNumber(); + 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 "UNDEPLOYED": + case 1: + message.state = 1; + break; + case "DEPLOYING": + case 2: + message.state = 2; + break; + case "DEPLOYED": + case 3: + message.state = 3; + break; + case "UNDEPLOYING": + case 4: + message.state = 4; + break; + case "DELETING": + case 5: + message.state = 5; + break; + } + if (object.inputDataConfig != null) { + if (typeof object.inputDataConfig !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.IssueModel.inputDataConfig: object expected"); + message.inputDataConfig = $root.google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig.fromObject(object.inputDataConfig); + } + if (object.trainingStats != null) { + if (typeof object.trainingStats !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.IssueModel.trainingStats: object expected"); + message.trainingStats = $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.fromObject(object.trainingStats); + } + 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 "TYPE_V1": + case 1: + message.modelType = 1; + break; + case "TYPE_V2": + case 2: + message.modelType = 2; + break; } - if (message.transcriptIndex != null && message.hasOwnProperty("transcriptIndex")) - if (!$util.isInteger(message.transcriptIndex)) - return "transcriptIndex: integer expected"; - return null; - }; - - /** - * Creates an AnnotationBoundary message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.AnnotationBoundary} AnnotationBoundary - */ - AnnotationBoundary.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary) - return object; - var message = new $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary(); - if (object.wordIndex != null) - message.wordIndex = object.wordIndex | 0; - if (object.transcriptIndex != null) - message.transcriptIndex = object.transcriptIndex | 0; + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from an AnnotationBoundary message. Also converts values to other types if specified. + * Creates a plain object from an IssueModel message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary + * @memberof google.cloud.contactcenterinsights.v1.IssueModel * @static - * @param {google.cloud.contactcenterinsights.v1.AnnotationBoundary} message AnnotationBoundary + * @param {google.cloud.contactcenterinsights.v1.IssueModel} message IssueModel * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AnnotationBoundary.toObject = function toObject(message, options) { + IssueModel.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.transcriptIndex = 0; - if (message.transcriptIndex != null && message.hasOwnProperty("transcriptIndex")) - object.transcriptIndex = message.transcriptIndex; - if (message.wordIndex != null && message.hasOwnProperty("wordIndex")) { - object.wordIndex = message.wordIndex; - if (options.oneofs) - object.detailedBoundary = "wordIndex"; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.createTime = null; + object.updateTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.inputDataConfig = null; + object.trainingStats = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.issueCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.issueCount = options.longs === String ? "0" : 0; + object.modelType = options.enums === String ? "MODEL_TYPE_UNSPECIFIED" : 0; + object.languageCode = ""; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.IssueModel.State[message.state] === undefined ? message.state : $root.google.cloud.contactcenterinsights.v1.IssueModel.State[message.state] : message.state; + if (message.inputDataConfig != null && message.hasOwnProperty("inputDataConfig")) + object.inputDataConfig = $root.google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig.toObject(message.inputDataConfig, options); + if (message.trainingStats != null && message.hasOwnProperty("trainingStats")) + object.trainingStats = $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.toObject(message.trainingStats, options); + if (message.issueCount != null && message.hasOwnProperty("issueCount")) + if (typeof message.issueCount === "number") + object.issueCount = options.longs === String ? String(message.issueCount) : message.issueCount; + else + object.issueCount = options.longs === String ? $util.Long.prototype.toString.call(message.issueCount) : options.longs === Number ? new $util.LongBits(message.issueCount.low >>> 0, message.issueCount.high >>> 0).toNumber() : message.issueCount; + if (message.modelType != null && message.hasOwnProperty("modelType")) + object.modelType = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.IssueModel.ModelType[message.modelType] === undefined ? message.modelType : $root.google.cloud.contactcenterinsights.v1.IssueModel.ModelType[message.modelType] : message.modelType; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this AnnotationBoundary to JSON. + * Converts this IssueModel to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary + * @memberof google.cloud.contactcenterinsights.v1.IssueModel * @instance * @returns {Object.} JSON object */ - AnnotationBoundary.prototype.toJSON = function toJSON() { + IssueModel.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AnnotationBoundary + * Gets the default type url for IssueModel * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.AnnotationBoundary + * @memberof google.cloud.contactcenterinsights.v1.IssueModel * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AnnotationBoundary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + IssueModel.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.AnnotationBoundary"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.IssueModel"; }; - return AnnotationBoundary; + IssueModel.InputDataConfig = (function() { + + /** + * Properties of an InputDataConfig. + * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @interface IInputDataConfig + * @property {google.cloud.contactcenterinsights.v1.Conversation.Medium|null} [medium] InputDataConfig medium + * @property {number|Long|null} [trainingConversationsCount] InputDataConfig trainingConversationsCount + * @property {string|null} [filter] InputDataConfig filter + */ + + /** + * Constructs a new InputDataConfig. + * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @classdesc Represents an InputDataConfig. + * @implements IInputDataConfig + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IssueModel.IInputDataConfig=} [properties] Properties to set + */ + function InputDataConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InputDataConfig medium. + * @member {google.cloud.contactcenterinsights.v1.Conversation.Medium} medium + * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig + * @instance + */ + InputDataConfig.prototype.medium = 0; + + /** + * InputDataConfig trainingConversationsCount. + * @member {number|Long} trainingConversationsCount + * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig + * @instance + */ + InputDataConfig.prototype.trainingConversationsCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * InputDataConfig filter. + * @member {string} filter + * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig + * @instance + */ + InputDataConfig.prototype.filter = ""; + + /** + * Creates a new InputDataConfig instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.IssueModel.IInputDataConfig=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig} InputDataConfig instance + */ + InputDataConfig.create = function create(properties) { + return new InputDataConfig(properties); + }; + + /** + * Encodes the specified InputDataConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.IssueModel.IInputDataConfig} message InputDataConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InputDataConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.medium != null && Object.hasOwnProperty.call(message, "medium")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.medium); + if (message.trainingConversationsCount != null && Object.hasOwnProperty.call(message, "trainingConversationsCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.trainingConversationsCount); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); + return writer; + }; + + /** + * Encodes the specified InputDataConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.IssueModel.IInputDataConfig} message InputDataConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InputDataConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InputDataConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig} InputDataConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InputDataConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.medium = reader.int32(); + break; + } + case 2: { + message.trainingConversationsCount = reader.int64(); + break; + } + case 3: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InputDataConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig} InputDataConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InputDataConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InputDataConfig message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InputDataConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.medium != null && message.hasOwnProperty("medium")) + switch (message.medium) { + default: + return "medium: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.trainingConversationsCount != null && message.hasOwnProperty("trainingConversationsCount")) + if (!$util.isInteger(message.trainingConversationsCount) && !(message.trainingConversationsCount && $util.isInteger(message.trainingConversationsCount.low) && $util.isInteger(message.trainingConversationsCount.high))) + return "trainingConversationsCount: integer|Long expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates an InputDataConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig} InputDataConfig + */ + InputDataConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig(); + switch (object.medium) { + default: + if (typeof object.medium === "number") { + message.medium = object.medium; + break; + } + break; + case "MEDIUM_UNSPECIFIED": + case 0: + message.medium = 0; + break; + case "PHONE_CALL": + case 1: + message.medium = 1; + break; + case "CHAT": + case 2: + message.medium = 2; + break; + } + if (object.trainingConversationsCount != null) + if ($util.Long) + (message.trainingConversationsCount = $util.Long.fromValue(object.trainingConversationsCount)).unsigned = false; + else if (typeof object.trainingConversationsCount === "string") + message.trainingConversationsCount = parseInt(object.trainingConversationsCount, 10); + else if (typeof object.trainingConversationsCount === "number") + message.trainingConversationsCount = object.trainingConversationsCount; + else if (typeof object.trainingConversationsCount === "object") + message.trainingConversationsCount = new $util.LongBits(object.trainingConversationsCount.low >>> 0, object.trainingConversationsCount.high >>> 0).toNumber(); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from an InputDataConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig} message InputDataConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InputDataConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.medium = options.enums === String ? "MEDIUM_UNSPECIFIED" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.trainingConversationsCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.trainingConversationsCount = options.longs === String ? "0" : 0; + object.filter = ""; + } + if (message.medium != null && message.hasOwnProperty("medium")) + object.medium = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.Conversation.Medium[message.medium] === undefined ? message.medium : $root.google.cloud.contactcenterinsights.v1.Conversation.Medium[message.medium] : message.medium; + if (message.trainingConversationsCount != null && message.hasOwnProperty("trainingConversationsCount")) + if (typeof message.trainingConversationsCount === "number") + object.trainingConversationsCount = options.longs === String ? String(message.trainingConversationsCount) : message.trainingConversationsCount; + else + object.trainingConversationsCount = options.longs === String ? $util.Long.prototype.toString.call(message.trainingConversationsCount) : options.longs === Number ? new $util.LongBits(message.trainingConversationsCount.low >>> 0, message.trainingConversationsCount.high >>> 0).toNumber() : message.trainingConversationsCount; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this InputDataConfig to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig + * @instance + * @returns {Object.} JSON object + */ + InputDataConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InputDataConfig + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InputDataConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig"; + }; + + return InputDataConfig; + })(); + + /** + * State enum. + * @name google.cloud.contactcenterinsights.v1.IssueModel.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} UNDEPLOYED=1 UNDEPLOYED value + * @property {number} DEPLOYING=2 DEPLOYING value + * @property {number} DEPLOYED=3 DEPLOYED value + * @property {number} UNDEPLOYING=4 UNDEPLOYING value + * @property {number} DELETING=5 DELETING value + */ + IssueModel.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "UNDEPLOYED"] = 1; + values[valuesById[2] = "DEPLOYING"] = 2; + values[valuesById[3] = "DEPLOYED"] = 3; + values[valuesById[4] = "UNDEPLOYING"] = 4; + values[valuesById[5] = "DELETING"] = 5; + return values; + })(); + + /** + * ModelType enum. + * @name google.cloud.contactcenterinsights.v1.IssueModel.ModelType + * @enum {number} + * @property {number} MODEL_TYPE_UNSPECIFIED=0 MODEL_TYPE_UNSPECIFIED value + * @property {number} TYPE_V1=1 TYPE_V1 value + * @property {number} TYPE_V2=2 TYPE_V2 value + */ + IssueModel.ModelType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODEL_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TYPE_V1"] = 1; + values[valuesById[2] = "TYPE_V2"] = 2; + return values; + })(); + + return IssueModel; })(); - v1.Entity = (function() { + v1.Issue = (function() { /** - * Properties of an Entity. + * Properties of an Issue. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IEntity - * @property {string|null} [displayName] Entity displayName - * @property {google.cloud.contactcenterinsights.v1.Entity.Type|null} [type] Entity type - * @property {Object.|null} [metadata] Entity metadata - * @property {number|null} [salience] Entity salience - * @property {google.cloud.contactcenterinsights.v1.ISentimentData|null} [sentiment] Entity sentiment + * @interface IIssue + * @property {string|null} [name] Issue name + * @property {string|null} [displayName] Issue displayName + * @property {google.protobuf.ITimestamp|null} [createTime] Issue createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Issue updateTime + * @property {Array.|null} [sampleUtterances] Issue sampleUtterances + * @property {string|null} [displayDescription] Issue displayDescription */ /** - * Constructs a new Entity. + * Constructs a new Issue. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents an Entity. - * @implements IEntity + * @classdesc Represents an Issue. + * @implements IIssue * @constructor - * @param {google.cloud.contactcenterinsights.v1.IEntity=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IIssue=} [properties] Properties to set */ - function Entity(properties) { - this.metadata = {}; + function Issue(properties) { + this.sampleUtterances = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28158,151 +49075,148 @@ } /** - * Entity displayName. + * Issue name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.Issue + * @instance + */ + Issue.prototype.name = ""; + + /** + * Issue displayName. * @member {string} displayName - * @memberof google.cloud.contactcenterinsights.v1.Entity + * @memberof google.cloud.contactcenterinsights.v1.Issue * @instance */ - Entity.prototype.displayName = ""; + Issue.prototype.displayName = ""; /** - * Entity type. - * @member {google.cloud.contactcenterinsights.v1.Entity.Type} type - * @memberof google.cloud.contactcenterinsights.v1.Entity + * Issue createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.contactcenterinsights.v1.Issue * @instance */ - Entity.prototype.type = 0; + Issue.prototype.createTime = null; /** - * Entity metadata. - * @member {Object.} metadata - * @memberof google.cloud.contactcenterinsights.v1.Entity + * Issue updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.contactcenterinsights.v1.Issue * @instance */ - Entity.prototype.metadata = $util.emptyObject; + Issue.prototype.updateTime = null; /** - * Entity salience. - * @member {number} salience - * @memberof google.cloud.contactcenterinsights.v1.Entity + * Issue sampleUtterances. + * @member {Array.} sampleUtterances + * @memberof google.cloud.contactcenterinsights.v1.Issue * @instance */ - Entity.prototype.salience = 0; + Issue.prototype.sampleUtterances = $util.emptyArray; /** - * Entity sentiment. - * @member {google.cloud.contactcenterinsights.v1.ISentimentData|null|undefined} sentiment - * @memberof google.cloud.contactcenterinsights.v1.Entity + * Issue displayDescription. + * @member {string} displayDescription + * @memberof google.cloud.contactcenterinsights.v1.Issue * @instance */ - Entity.prototype.sentiment = null; + Issue.prototype.displayDescription = ""; /** - * Creates a new Entity instance using the specified properties. + * Creates a new Issue instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.Entity + * @memberof google.cloud.contactcenterinsights.v1.Issue * @static - * @param {google.cloud.contactcenterinsights.v1.IEntity=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.Entity} Entity instance + * @param {google.cloud.contactcenterinsights.v1.IIssue=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.Issue} Issue instance */ - Entity.create = function create(properties) { - return new Entity(properties); + Issue.create = function create(properties) { + return new Issue(properties); }; /** - * Encodes the specified Entity message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Entity.verify|verify} messages. + * Encodes the specified Issue message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Issue.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.Entity + * @memberof google.cloud.contactcenterinsights.v1.Issue * @static - * @param {google.cloud.contactcenterinsights.v1.IEntity} message Entity message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IIssue} message Issue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entity.encode = function encode(message, writer) { + Issue.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 1, wireType 2 =*/10).string(message.displayName); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); - if (message.salience != null && Object.hasOwnProperty.call(message, "salience")) - writer.uint32(/* id 4, wireType 5 =*/37).float(message.salience); - if (message.sentiment != null && Object.hasOwnProperty.call(message, "sentiment")) - $root.google.cloud.contactcenterinsights.v1.SentimentData.encode(message.sentiment, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.sampleUtterances != null && message.sampleUtterances.length) + for (var i = 0; i < message.sampleUtterances.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.sampleUtterances[i]); + if (message.displayDescription != null && Object.hasOwnProperty.call(message, "displayDescription")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.displayDescription); return writer; }; /** - * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Entity.verify|verify} messages. + * Encodes the specified Issue message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Issue.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.Entity + * @memberof google.cloud.contactcenterinsights.v1.Issue * @static - * @param {google.cloud.contactcenterinsights.v1.IEntity} message Entity message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IIssue} message Issue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entity.encodeDelimited = function encodeDelimited(message, writer) { + Issue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Entity message from the specified reader or buffer. + * Decodes an Issue message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.Entity + * @memberof google.cloud.contactcenterinsights.v1.Issue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.Entity} Entity + * @returns {google.cloud.contactcenterinsights.v1.Issue} Issue * @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) { + Issue.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Entity(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Issue(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.displayName = reader.string(); + message.name = reader.string(); break; } case 2: { - message.type = reader.int32(); + message.displayName = reader.string(); break; } case 3: { - if (message.metadata === $util.emptyObject) - message.metadata = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.metadata[key] = value; + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 4: { - message.salience = reader.float(); + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } - case 5: { - message.sentiment = $root.google.cloud.contactcenterinsights.v1.SentimentData.decode(reader, reader.uint32()); + case 6: { + if (!(message.sampleUtterances && message.sampleUtterances.length)) + message.sampleUtterances = []; + message.sampleUtterances.push(reader.string()); + break; + } + case 14: { + message.displayDescription = reader.string(); break; } default: @@ -28314,286 +49228,189 @@ }; /** - * Decodes an Entity message from the specified reader or buffer, length delimited. + * Decodes an Issue message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.Entity + * @memberof google.cloud.contactcenterinsights.v1.Issue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.Entity} Entity + * @returns {google.cloud.contactcenterinsights.v1.Issue} Issue * @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) { + Issue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Entity message. + * Verifies an Issue message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.Entity + * @memberof google.cloud.contactcenterinsights.v1.Issue * @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) { + Issue.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.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 9: - case 10: - case 11: - case 12: - case 13: - break; - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - if (!$util.isObject(message.metadata)) - return "metadata: object expected"; - var key = Object.keys(message.metadata); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.metadata[key[i]])) - return "metadata: string{k: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.salience != null && message.hasOwnProperty("salience")) - if (typeof message.salience !== "number") - return "salience: number expected"; - if (message.sentiment != null && message.hasOwnProperty("sentiment")) { - var error = $root.google.cloud.contactcenterinsights.v1.SentimentData.verify(message.sentiment); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); if (error) - return "sentiment." + error; + return "updateTime." + error; + } + if (message.sampleUtterances != null && message.hasOwnProperty("sampleUtterances")) { + if (!Array.isArray(message.sampleUtterances)) + return "sampleUtterances: array expected"; + for (var i = 0; i < message.sampleUtterances.length; ++i) + if (!$util.isString(message.sampleUtterances[i])) + return "sampleUtterances: string[] expected"; } + if (message.displayDescription != null && message.hasOwnProperty("displayDescription")) + if (!$util.isString(message.displayDescription)) + return "displayDescription: string expected"; return null; }; /** - * Creates an Entity message from a plain object. Also converts values to their respective internal types. + * Creates an Issue message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.Entity + * @memberof google.cloud.contactcenterinsights.v1.Issue * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.Entity} Entity + * @returns {google.cloud.contactcenterinsights.v1.Issue} Issue */ - Entity.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.Entity) + Issue.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.Issue) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.Entity(); + var message = new $root.google.cloud.contactcenterinsights.v1.Issue(); + if (object.name != null) + message.name = String(object.name); if (object.displayName != null) message.displayName = String(object.displayName); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "PERSON": - case 1: - message.type = 1; - break; - case "LOCATION": - case 2: - message.type = 2; - break; - case "ORGANIZATION": - case 3: - message.type = 3; - break; - case "EVENT": - case 4: - message.type = 4; - break; - case "WORK_OF_ART": - case 5: - message.type = 5; - break; - case "CONSUMER_GOOD": - case 6: - message.type = 6; - break; - case "OTHER": - case 7: - message.type = 7; - break; - case "PHONE_NUMBER": - case 9: - message.type = 9; - break; - case "ADDRESS": - case 10: - message.type = 10; - break; - case "DATE": - case 11: - message.type = 11; - break; - case "NUMBER": - case 12: - message.type = 12; - break; - case "PRICE": - case 13: - message.type = 13; - break; + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Issue.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - if (object.metadata) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Entity.metadata: object expected"); - message.metadata = {}; - for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) - message.metadata[keys[i]] = String(object.metadata[keys[i]]); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Issue.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } - if (object.salience != null) - message.salience = Number(object.salience); - if (object.sentiment != null) { - if (typeof object.sentiment !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Entity.sentiment: object expected"); - message.sentiment = $root.google.cloud.contactcenterinsights.v1.SentimentData.fromObject(object.sentiment); + if (object.sampleUtterances) { + if (!Array.isArray(object.sampleUtterances)) + throw TypeError(".google.cloud.contactcenterinsights.v1.Issue.sampleUtterances: array expected"); + message.sampleUtterances = []; + for (var i = 0; i < object.sampleUtterances.length; ++i) + message.sampleUtterances[i] = String(object.sampleUtterances[i]); } + if (object.displayDescription != null) + message.displayDescription = String(object.displayDescription); return message; }; /** - * Creates a plain object from an Entity message. Also converts values to other types if specified. + * Creates a plain object from an Issue message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.Entity + * @memberof google.cloud.contactcenterinsights.v1.Issue * @static - * @param {google.cloud.contactcenterinsights.v1.Entity} message Entity + * @param {google.cloud.contactcenterinsights.v1.Issue} message Issue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Entity.toObject = function toObject(message, options) { + Issue.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.metadata = {}; + if (options.arrays || options.defaults) + object.sampleUtterances = []; if (options.defaults) { + object.name = ""; object.displayName = ""; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.salience = 0; - object.sentiment = null; + object.createTime = null; + object.updateTime = null; + object.displayDescription = ""; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; if (message.displayName != null && message.hasOwnProperty("displayName")) object.displayName = message.displayName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.Entity.Type[message.type] === undefined ? message.type : $root.google.cloud.contactcenterinsights.v1.Entity.Type[message.type] : message.type; - var keys2; - if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { - object.metadata = {}; - for (var j = 0; j < keys2.length; ++j) - object.metadata[keys2[j]] = message.metadata[keys2[j]]; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.sampleUtterances && message.sampleUtterances.length) { + object.sampleUtterances = []; + for (var j = 0; j < message.sampleUtterances.length; ++j) + object.sampleUtterances[j] = message.sampleUtterances[j]; } - if (message.salience != null && message.hasOwnProperty("salience")) - object.salience = options.json && !isFinite(message.salience) ? String(message.salience) : message.salience; - if (message.sentiment != null && message.hasOwnProperty("sentiment")) - object.sentiment = $root.google.cloud.contactcenterinsights.v1.SentimentData.toObject(message.sentiment, options); + if (message.displayDescription != null && message.hasOwnProperty("displayDescription")) + object.displayDescription = message.displayDescription; return object; }; /** - * Converts this Entity to JSON. + * Converts this Issue to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.Entity + * @memberof google.cloud.contactcenterinsights.v1.Issue * @instance * @returns {Object.} JSON object */ - Entity.prototype.toJSON = function toJSON() { + Issue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Entity + * Gets the default type url for Issue * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.Entity + * @memberof google.cloud.contactcenterinsights.v1.Issue * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Entity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Issue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Entity"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Issue"; }; - /** - * Type enum. - * @name google.cloud.contactcenterinsights.v1.Entity.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} PERSON=1 PERSON value - * @property {number} LOCATION=2 LOCATION value - * @property {number} ORGANIZATION=3 ORGANIZATION value - * @property {number} EVENT=4 EVENT value - * @property {number} WORK_OF_ART=5 WORK_OF_ART value - * @property {number} CONSUMER_GOOD=6 CONSUMER_GOOD value - * @property {number} OTHER=7 OTHER value - * @property {number} PHONE_NUMBER=9 PHONE_NUMBER value - * @property {number} ADDRESS=10 ADDRESS value - * @property {number} DATE=11 DATE value - * @property {number} NUMBER=12 NUMBER value - * @property {number} PRICE=13 PRICE value - */ - Entity.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PERSON"] = 1; - values[valuesById[2] = "LOCATION"] = 2; - values[valuesById[3] = "ORGANIZATION"] = 3; - values[valuesById[4] = "EVENT"] = 4; - values[valuesById[5] = "WORK_OF_ART"] = 5; - values[valuesById[6] = "CONSUMER_GOOD"] = 6; - values[valuesById[7] = "OTHER"] = 7; - values[valuesById[9] = "PHONE_NUMBER"] = 9; - values[valuesById[10] = "ADDRESS"] = 10; - values[valuesById[11] = "DATE"] = 11; - values[valuesById[12] = "NUMBER"] = 12; - values[valuesById[13] = "PRICE"] = 13; - return values; - })(); - - return Entity; + return Issue; })(); - v1.Intent = (function() { + v1.IssueModelLabelStats = (function() { /** - * Properties of an Intent. + * Properties of an IssueModelLabelStats. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IIntent - * @property {string|null} [id] Intent id - * @property {string|null} [displayName] Intent displayName + * @interface IIssueModelLabelStats + * @property {number|Long|null} [analyzedConversationsCount] IssueModelLabelStats analyzedConversationsCount + * @property {number|Long|null} [unclassifiedConversationsCount] IssueModelLabelStats unclassifiedConversationsCount + * @property {Object.|null} [issueStats] IssueModelLabelStats issueStats */ /** - * Constructs a new Intent. + * Constructs a new IssueModelLabelStats. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents an Intent. - * @implements IIntent + * @classdesc Represents an IssueModelLabelStats. + * @implements IIssueModelLabelStats * @constructor - * @param {google.cloud.contactcenterinsights.v1.IIntent=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IIssueModelLabelStats=} [properties] Properties to set */ - function Intent(properties) { + function IssueModelLabelStats(properties) { + this.issueStats = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28601,89 +49418,125 @@ } /** - * Intent id. - * @member {string} id - * @memberof google.cloud.contactcenterinsights.v1.Intent + * IssueModelLabelStats analyzedConversationsCount. + * @member {number|Long} analyzedConversationsCount + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats * @instance */ - Intent.prototype.id = ""; + IssueModelLabelStats.prototype.analyzedConversationsCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Intent displayName. - * @member {string} displayName - * @memberof google.cloud.contactcenterinsights.v1.Intent + * IssueModelLabelStats unclassifiedConversationsCount. + * @member {number|Long} unclassifiedConversationsCount + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats * @instance */ - Intent.prototype.displayName = ""; + IssueModelLabelStats.prototype.unclassifiedConversationsCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new Intent instance using the specified properties. + * IssueModelLabelStats issueStats. + * @member {Object.} issueStats + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats + * @instance + */ + IssueModelLabelStats.prototype.issueStats = $util.emptyObject; + + /** + * Creates a new IssueModelLabelStats instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.Intent + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats * @static - * @param {google.cloud.contactcenterinsights.v1.IIntent=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.Intent} Intent instance + * @param {google.cloud.contactcenterinsights.v1.IIssueModelLabelStats=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.IssueModelLabelStats} IssueModelLabelStats instance */ - Intent.create = function create(properties) { - return new Intent(properties); + IssueModelLabelStats.create = function create(properties) { + return new IssueModelLabelStats(properties); }; /** - * Encodes the specified Intent message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Intent.verify|verify} messages. + * Encodes the specified IssueModelLabelStats message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModelLabelStats.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.Intent + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats * @static - * @param {google.cloud.contactcenterinsights.v1.IIntent} message Intent message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IIssueModelLabelStats} message IssueModelLabelStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Intent.encode = function encode(message, writer) { + IssueModelLabelStats.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.analyzedConversationsCount != null && Object.hasOwnProperty.call(message, "analyzedConversationsCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.analyzedConversationsCount); + if (message.unclassifiedConversationsCount != null && Object.hasOwnProperty.call(message, "unclassifiedConversationsCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.unclassifiedConversationsCount); + if (message.issueStats != null && Object.hasOwnProperty.call(message, "issueStats")) + for (var keys = Object.keys(message.issueStats), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats.encode(message.issueStats[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified Intent message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Intent.verify|verify} messages. + * Encodes the specified IssueModelLabelStats message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModelLabelStats.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.Intent + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats * @static - * @param {google.cloud.contactcenterinsights.v1.IIntent} message Intent message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IIssueModelLabelStats} message IssueModelLabelStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Intent.encodeDelimited = function encodeDelimited(message, writer) { + IssueModelLabelStats.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Intent message from the specified reader or buffer. + * Decodes an IssueModelLabelStats message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.Intent + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.Intent} Intent + * @returns {google.cloud.contactcenterinsights.v1.IssueModelLabelStats} IssueModelLabelStats * @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) { + IssueModelLabelStats.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Intent(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.id = reader.string(); + message.analyzedConversationsCount = reader.int64(); break; } case 2: { - message.displayName = reader.string(); + message.unclassifiedConversationsCount = reader.int64(); + break; + } + case 3: { + if (message.issueStats === $util.emptyObject) + message.issueStats = {}; + 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.contactcenterinsights.v1.IssueModelLabelStats.IssueStats.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.issueStats[key] = value; break; } default: @@ -28695,132 +49548,462 @@ }; /** - * Decodes an Intent message from the specified reader or buffer, length delimited. + * Decodes an IssueModelLabelStats message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.Intent + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.Intent} Intent + * @returns {google.cloud.contactcenterinsights.v1.IssueModelLabelStats} IssueModelLabelStats * @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) { + IssueModelLabelStats.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Intent message. + * Verifies an IssueModelLabelStats message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.Intent + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats * @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) { + IssueModelLabelStats.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.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; + if (message.analyzedConversationsCount != null && message.hasOwnProperty("analyzedConversationsCount")) + if (!$util.isInteger(message.analyzedConversationsCount) && !(message.analyzedConversationsCount && $util.isInteger(message.analyzedConversationsCount.low) && $util.isInteger(message.analyzedConversationsCount.high))) + return "analyzedConversationsCount: integer|Long expected"; + if (message.unclassifiedConversationsCount != null && message.hasOwnProperty("unclassifiedConversationsCount")) + if (!$util.isInteger(message.unclassifiedConversationsCount) && !(message.unclassifiedConversationsCount && $util.isInteger(message.unclassifiedConversationsCount.low) && $util.isInteger(message.unclassifiedConversationsCount.high))) + return "unclassifiedConversationsCount: integer|Long expected"; + if (message.issueStats != null && message.hasOwnProperty("issueStats")) { + if (!$util.isObject(message.issueStats)) + return "issueStats: object expected"; + var key = Object.keys(message.issueStats); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats.verify(message.issueStats[key[i]]); + if (error) + return "issueStats." + error; + } + } return null; }; /** - * Creates an Intent message from a plain object. Also converts values to their respective internal types. + * Creates an IssueModelLabelStats message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.Intent + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.Intent} Intent + * @returns {google.cloud.contactcenterinsights.v1.IssueModelLabelStats} IssueModelLabelStats */ - Intent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.Intent) + IssueModelLabelStats.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.Intent(); - if (object.id != null) - message.id = String(object.id); - if (object.displayName != null) - message.displayName = String(object.displayName); + var message = new $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats(); + if (object.analyzedConversationsCount != null) + if ($util.Long) + (message.analyzedConversationsCount = $util.Long.fromValue(object.analyzedConversationsCount)).unsigned = false; + else if (typeof object.analyzedConversationsCount === "string") + message.analyzedConversationsCount = parseInt(object.analyzedConversationsCount, 10); + else if (typeof object.analyzedConversationsCount === "number") + message.analyzedConversationsCount = object.analyzedConversationsCount; + else if (typeof object.analyzedConversationsCount === "object") + message.analyzedConversationsCount = new $util.LongBits(object.analyzedConversationsCount.low >>> 0, object.analyzedConversationsCount.high >>> 0).toNumber(); + if (object.unclassifiedConversationsCount != null) + if ($util.Long) + (message.unclassifiedConversationsCount = $util.Long.fromValue(object.unclassifiedConversationsCount)).unsigned = false; + else if (typeof object.unclassifiedConversationsCount === "string") + message.unclassifiedConversationsCount = parseInt(object.unclassifiedConversationsCount, 10); + else if (typeof object.unclassifiedConversationsCount === "number") + message.unclassifiedConversationsCount = object.unclassifiedConversationsCount; + else if (typeof object.unclassifiedConversationsCount === "object") + message.unclassifiedConversationsCount = new $util.LongBits(object.unclassifiedConversationsCount.low >>> 0, object.unclassifiedConversationsCount.high >>> 0).toNumber(); + if (object.issueStats) { + if (typeof object.issueStats !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.IssueModelLabelStats.issueStats: object expected"); + message.issueStats = {}; + for (var keys = Object.keys(object.issueStats), i = 0; i < keys.length; ++i) { + if (typeof object.issueStats[keys[i]] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.IssueModelLabelStats.issueStats: object expected"); + message.issueStats[keys[i]] = $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats.fromObject(object.issueStats[keys[i]]); + } + } return message; }; /** - * Creates a plain object from an Intent message. Also converts values to other types if specified. + * Creates a plain object from an IssueModelLabelStats message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.Intent + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats * @static - * @param {google.cloud.contactcenterinsights.v1.Intent} message Intent + * @param {google.cloud.contactcenterinsights.v1.IssueModelLabelStats} message IssueModelLabelStats * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Intent.toObject = function toObject(message, options) { + IssueModelLabelStats.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.issueStats = {}; if (options.defaults) { - object.id = ""; - object.displayName = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.analyzedConversationsCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.analyzedConversationsCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.unclassifiedConversationsCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.unclassifiedConversationsCount = options.longs === String ? "0" : 0; + } + if (message.analyzedConversationsCount != null && message.hasOwnProperty("analyzedConversationsCount")) + if (typeof message.analyzedConversationsCount === "number") + object.analyzedConversationsCount = options.longs === String ? String(message.analyzedConversationsCount) : message.analyzedConversationsCount; + else + object.analyzedConversationsCount = options.longs === String ? $util.Long.prototype.toString.call(message.analyzedConversationsCount) : options.longs === Number ? new $util.LongBits(message.analyzedConversationsCount.low >>> 0, message.analyzedConversationsCount.high >>> 0).toNumber() : message.analyzedConversationsCount; + if (message.unclassifiedConversationsCount != null && message.hasOwnProperty("unclassifiedConversationsCount")) + if (typeof message.unclassifiedConversationsCount === "number") + object.unclassifiedConversationsCount = options.longs === String ? String(message.unclassifiedConversationsCount) : message.unclassifiedConversationsCount; + else + object.unclassifiedConversationsCount = options.longs === String ? $util.Long.prototype.toString.call(message.unclassifiedConversationsCount) : options.longs === Number ? new $util.LongBits(message.unclassifiedConversationsCount.low >>> 0, message.unclassifiedConversationsCount.high >>> 0).toNumber() : message.unclassifiedConversationsCount; + var keys2; + if (message.issueStats && (keys2 = Object.keys(message.issueStats)).length) { + object.issueStats = {}; + for (var j = 0; j < keys2.length; ++j) + object.issueStats[keys2[j]] = $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats.toObject(message.issueStats[keys2[j]], options); } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; return object; }; /** - * Converts this Intent to JSON. + * Converts this IssueModelLabelStats to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.Intent + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats * @instance * @returns {Object.} JSON object */ - Intent.prototype.toJSON = function toJSON() { + IssueModelLabelStats.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 IssueModelLabelStats * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.Intent + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Intent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + IssueModelLabelStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Intent"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.IssueModelLabelStats"; }; - return Intent; + IssueModelLabelStats.IssueStats = (function() { + + /** + * Properties of an IssueStats. + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats + * @interface IIssueStats + * @property {string|null} [issue] IssueStats issue + * @property {number|Long|null} [labeledConversationsCount] IssueStats labeledConversationsCount + * @property {string|null} [displayName] IssueStats displayName + */ + + /** + * Constructs a new IssueStats. + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats + * @classdesc Represents an IssueStats. + * @implements IIssueStats + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IIssueStats=} [properties] Properties to set + */ + function IssueStats(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IssueStats issue. + * @member {string} issue + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats + * @instance + */ + IssueStats.prototype.issue = ""; + + /** + * IssueStats labeledConversationsCount. + * @member {number|Long} labeledConversationsCount + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats + * @instance + */ + IssueStats.prototype.labeledConversationsCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * IssueStats displayName. + * @member {string} displayName + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats + * @instance + */ + IssueStats.prototype.displayName = ""; + + /** + * Creates a new IssueStats instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats + * @static + * @param {google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IIssueStats=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats} IssueStats instance + */ + IssueStats.create = function create(properties) { + return new IssueStats(properties); + }; + + /** + * Encodes the specified IssueStats message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats + * @static + * @param {google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IIssueStats} message IssueStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IssueStats.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.issue != null && Object.hasOwnProperty.call(message, "issue")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.issue); + if (message.labeledConversationsCount != null && Object.hasOwnProperty.call(message, "labeledConversationsCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.labeledConversationsCount); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + return writer; + }; + + /** + * Encodes the specified IssueStats message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats + * @static + * @param {google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IIssueStats} message IssueStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IssueStats.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IssueStats message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats} IssueStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IssueStats.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.issue = reader.string(); + break; + } + case 2: { + message.labeledConversationsCount = reader.int64(); + break; + } + case 3: { + message.displayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IssueStats message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats} IssueStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IssueStats.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IssueStats message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IssueStats.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.issue != null && message.hasOwnProperty("issue")) + if (!$util.isString(message.issue)) + return "issue: string expected"; + if (message.labeledConversationsCount != null && message.hasOwnProperty("labeledConversationsCount")) + if (!$util.isInteger(message.labeledConversationsCount) && !(message.labeledConversationsCount && $util.isInteger(message.labeledConversationsCount.low) && $util.isInteger(message.labeledConversationsCount.high))) + return "labeledConversationsCount: integer|Long expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + return null; + }; + + /** + * Creates an IssueStats message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats} IssueStats + */ + IssueStats.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats(); + if (object.issue != null) + message.issue = String(object.issue); + if (object.labeledConversationsCount != null) + if ($util.Long) + (message.labeledConversationsCount = $util.Long.fromValue(object.labeledConversationsCount)).unsigned = false; + else if (typeof object.labeledConversationsCount === "string") + message.labeledConversationsCount = parseInt(object.labeledConversationsCount, 10); + else if (typeof object.labeledConversationsCount === "number") + message.labeledConversationsCount = object.labeledConversationsCount; + else if (typeof object.labeledConversationsCount === "object") + message.labeledConversationsCount = new $util.LongBits(object.labeledConversationsCount.low >>> 0, object.labeledConversationsCount.high >>> 0).toNumber(); + if (object.displayName != null) + message.displayName = String(object.displayName); + return message; + }; + + /** + * Creates a plain object from an IssueStats message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats + * @static + * @param {google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats} message IssueStats + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IssueStats.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.issue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.labeledConversationsCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.labeledConversationsCount = options.longs === String ? "0" : 0; + object.displayName = ""; + } + if (message.issue != null && message.hasOwnProperty("issue")) + object.issue = message.issue; + if (message.labeledConversationsCount != null && message.hasOwnProperty("labeledConversationsCount")) + if (typeof message.labeledConversationsCount === "number") + object.labeledConversationsCount = options.longs === String ? String(message.labeledConversationsCount) : message.labeledConversationsCount; + else + object.labeledConversationsCount = options.longs === String ? $util.Long.prototype.toString.call(message.labeledConversationsCount) : options.longs === Number ? new $util.LongBits(message.labeledConversationsCount.low >>> 0, message.labeledConversationsCount.high >>> 0).toNumber() : message.labeledConversationsCount; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; + + /** + * Converts this IssueStats to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats + * @instance + * @returns {Object.} JSON object + */ + IssueStats.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IssueStats + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IssueStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats"; + }; + + return IssueStats; + })(); + + return IssueModelLabelStats; })(); - v1.PhraseMatchData = (function() { + v1.PhraseMatcher = (function() { /** - * Properties of a PhraseMatchData. + * Properties of a PhraseMatcher. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IPhraseMatchData - * @property {string|null} [phraseMatcher] PhraseMatchData phraseMatcher - * @property {string|null} [displayName] PhraseMatchData displayName + * @interface IPhraseMatcher + * @property {string|null} [name] PhraseMatcher name + * @property {string|null} [revisionId] PhraseMatcher revisionId + * @property {string|null} [versionTag] PhraseMatcher versionTag + * @property {google.protobuf.ITimestamp|null} [revisionCreateTime] PhraseMatcher revisionCreateTime + * @property {string|null} [displayName] PhraseMatcher displayName + * @property {google.cloud.contactcenterinsights.v1.PhraseMatcher.PhraseMatcherType|null} [type] PhraseMatcher type + * @property {boolean|null} [active] PhraseMatcher active + * @property {Array.|null} [phraseMatchRuleGroups] PhraseMatcher phraseMatchRuleGroups + * @property {google.protobuf.ITimestamp|null} [activationUpdateTime] PhraseMatcher activationUpdateTime + * @property {google.cloud.contactcenterinsights.v1.ConversationParticipant.Role|null} [roleMatch] PhraseMatcher roleMatch + * @property {google.protobuf.ITimestamp|null} [updateTime] PhraseMatcher updateTime */ /** - * Constructs a new PhraseMatchData. + * Constructs a new PhraseMatcher. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a PhraseMatchData. - * @implements IPhraseMatchData + * @classdesc Represents a PhraseMatcher. + * @implements IPhraseMatcher * @constructor - * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchData=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatcher=} [properties] Properties to set */ - function PhraseMatchData(properties) { + function PhraseMatcher(properties) { + this.phraseMatchRuleGroups = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28828,303 +50011,220 @@ } /** - * PhraseMatchData phraseMatcher. - * @member {string} phraseMatcher - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchData - * @instance - */ - PhraseMatchData.prototype.phraseMatcher = ""; - - /** - * PhraseMatchData displayName. - * @member {string} displayName - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchData + * PhraseMatcher name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher * @instance */ - PhraseMatchData.prototype.displayName = ""; - - /** - * Creates a new PhraseMatchData instance using the specified properties. - * @function create - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchData - * @static - * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchData=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchData} PhraseMatchData instance - */ - PhraseMatchData.create = function create(properties) { - return new PhraseMatchData(properties); - }; - - /** - * Encodes the specified PhraseMatchData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchData.verify|verify} messages. - * @function encode - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchData - * @static - * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchData} message PhraseMatchData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhraseMatchData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.phraseMatcher != null && Object.hasOwnProperty.call(message, "phraseMatcher")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.phraseMatcher); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - return writer; - }; - - /** - * Encodes the specified PhraseMatchData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchData.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchData - * @static - * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchData} message PhraseMatchData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhraseMatchData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PhraseMatchData message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchData} PhraseMatchData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhraseMatchData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.PhraseMatchData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.phraseMatcher = reader.string(); - break; - } - case 2: { - message.displayName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PhraseMatchData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchData} PhraseMatchData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhraseMatchData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + PhraseMatcher.prototype.name = ""; /** - * Verifies a PhraseMatchData message. - * @function verify - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * PhraseMatcher revisionId. + * @member {string} revisionId + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @instance */ - PhraseMatchData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.phraseMatcher != null && message.hasOwnProperty("phraseMatcher")) - if (!$util.isString(message.phraseMatcher)) - return "phraseMatcher: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - return null; - }; + PhraseMatcher.prototype.revisionId = ""; /** - * Creates a PhraseMatchData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchData - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchData} PhraseMatchData + * PhraseMatcher versionTag. + * @member {string} versionTag + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @instance */ - PhraseMatchData.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.PhraseMatchData) - return object; - var message = new $root.google.cloud.contactcenterinsights.v1.PhraseMatchData(); - if (object.phraseMatcher != null) - message.phraseMatcher = String(object.phraseMatcher); - if (object.displayName != null) - message.displayName = String(object.displayName); - return message; - }; + PhraseMatcher.prototype.versionTag = ""; /** - * Creates a plain object from a PhraseMatchData message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchData - * @static - * @param {google.cloud.contactcenterinsights.v1.PhraseMatchData} message PhraseMatchData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * PhraseMatcher revisionCreateTime. + * @member {google.protobuf.ITimestamp|null|undefined} revisionCreateTime + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @instance */ - PhraseMatchData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.phraseMatcher = ""; - object.displayName = ""; - } - if (message.phraseMatcher != null && message.hasOwnProperty("phraseMatcher")) - object.phraseMatcher = message.phraseMatcher; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - return object; - }; + PhraseMatcher.prototype.revisionCreateTime = null; /** - * Converts this PhraseMatchData to JSON. - * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchData + * PhraseMatcher displayName. + * @member {string} displayName + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher * @instance - * @returns {Object.} JSON object */ - PhraseMatchData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + PhraseMatcher.prototype.displayName = ""; /** - * Gets the default type url for PhraseMatchData - * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchData - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * PhraseMatcher type. + * @member {google.cloud.contactcenterinsights.v1.PhraseMatcher.PhraseMatcherType} type + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @instance */ - PhraseMatchData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.PhraseMatchData"; - }; + PhraseMatcher.prototype.type = 0; - return PhraseMatchData; - })(); + /** + * PhraseMatcher active. + * @member {boolean} active + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @instance + */ + PhraseMatcher.prototype.active = false; - v1.DialogflowIntent = (function() { + /** + * PhraseMatcher phraseMatchRuleGroups. + * @member {Array.} phraseMatchRuleGroups + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @instance + */ + PhraseMatcher.prototype.phraseMatchRuleGroups = $util.emptyArray; /** - * Properties of a DialogflowIntent. - * @memberof google.cloud.contactcenterinsights.v1 - * @interface IDialogflowIntent - * @property {string|null} [displayName] DialogflowIntent displayName + * PhraseMatcher activationUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} activationUpdateTime + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @instance */ + PhraseMatcher.prototype.activationUpdateTime = null; /** - * Constructs a new DialogflowIntent. - * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a DialogflowIntent. - * @implements IDialogflowIntent - * @constructor - * @param {google.cloud.contactcenterinsights.v1.IDialogflowIntent=} [properties] Properties to set + * PhraseMatcher roleMatch. + * @member {google.cloud.contactcenterinsights.v1.ConversationParticipant.Role} roleMatch + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @instance */ - function DialogflowIntent(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + PhraseMatcher.prototype.roleMatch = 0; /** - * DialogflowIntent displayName. - * @member {string} displayName - * @memberof google.cloud.contactcenterinsights.v1.DialogflowIntent + * PhraseMatcher updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher * @instance */ - DialogflowIntent.prototype.displayName = ""; + PhraseMatcher.prototype.updateTime = null; /** - * Creates a new DialogflowIntent instance using the specified properties. + * Creates a new PhraseMatcher instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.DialogflowIntent + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher * @static - * @param {google.cloud.contactcenterinsights.v1.IDialogflowIntent=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.DialogflowIntent} DialogflowIntent instance + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatcher=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatcher} PhraseMatcher instance */ - DialogflowIntent.create = function create(properties) { - return new DialogflowIntent(properties); + PhraseMatcher.create = function create(properties) { + return new PhraseMatcher(properties); }; /** - * Encodes the specified DialogflowIntent message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DialogflowIntent.verify|verify} messages. + * Encodes the specified PhraseMatcher message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatcher.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.DialogflowIntent + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher * @static - * @param {google.cloud.contactcenterinsights.v1.IDialogflowIntent} message DialogflowIntent message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatcher} message PhraseMatcher message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DialogflowIntent.encode = function encode(message, writer) { + PhraseMatcher.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.revisionId != null && Object.hasOwnProperty.call(message, "revisionId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.revisionId); + if (message.versionTag != null && Object.hasOwnProperty.call(message, "versionTag")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.versionTag); + if (message.revisionCreateTime != null && Object.hasOwnProperty.call(message, "revisionCreateTime")) + $root.google.protobuf.Timestamp.encode(message.revisionCreateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.type); + if (message.active != null && Object.hasOwnProperty.call(message, "active")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.active); + if (message.phraseMatchRuleGroups != null && message.phraseMatchRuleGroups.length) + for (var i = 0; i < message.phraseMatchRuleGroups.length; ++i) + $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.encode(message.phraseMatchRuleGroups[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.activationUpdateTime != null && Object.hasOwnProperty.call(message, "activationUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.activationUpdateTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.roleMatch != null && Object.hasOwnProperty.call(message, "roleMatch")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.roleMatch); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); return writer; }; /** - * Encodes the specified DialogflowIntent message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DialogflowIntent.verify|verify} messages. + * Encodes the specified PhraseMatcher message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatcher.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.DialogflowIntent + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher * @static - * @param {google.cloud.contactcenterinsights.v1.IDialogflowIntent} message DialogflowIntent message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatcher} message PhraseMatcher message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DialogflowIntent.encodeDelimited = function encodeDelimited(message, writer) { + PhraseMatcher.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DialogflowIntent message from the specified reader or buffer. + * Decodes a PhraseMatcher message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.DialogflowIntent + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.DialogflowIntent} DialogflowIntent + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatcher} PhraseMatcher * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DialogflowIntent.decode = function decode(reader, length) { + PhraseMatcher.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.DialogflowIntent(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.PhraseMatcher(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.revisionId = reader.string(); + break; + } + case 3: { + message.versionTag = reader.string(); + break; + } + case 4: { + message.revisionCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { message.displayName = reader.string(); break; } + case 6: { + message.type = reader.int32(); + break; + } + case 7: { + message.active = reader.bool(); + break; + } + case 8: { + if (!(message.phraseMatchRuleGroups && message.phraseMatchRuleGroups.length)) + message.phraseMatchRuleGroups = []; + message.phraseMatchRuleGroups.push($root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.decode(reader, reader.uint32())); + break; + } + case 9: { + message.activationUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 10: { + message.roleMatch = reader.int32(); + break; + } + case 11: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -29134,296 +50234,312 @@ }; /** - * Decodes a DialogflowIntent message from the specified reader or buffer, length delimited. + * Decodes a PhraseMatcher message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.DialogflowIntent + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.DialogflowIntent} DialogflowIntent + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatcher} PhraseMatcher * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DialogflowIntent.decodeDelimited = function decodeDelimited(reader) { + PhraseMatcher.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DialogflowIntent message. + * Verifies a PhraseMatcher message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.DialogflowIntent + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DialogflowIntent.verify = function verify(message) { + PhraseMatcher.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.revisionId != null && message.hasOwnProperty("revisionId")) + if (!$util.isString(message.revisionId)) + return "revisionId: string expected"; + if (message.versionTag != null && message.hasOwnProperty("versionTag")) + if (!$util.isString(message.versionTag)) + return "versionTag: string expected"; + if (message.revisionCreateTime != null && message.hasOwnProperty("revisionCreateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.revisionCreateTime); + if (error) + return "revisionCreateTime." + error; + } if (message.displayName != null && message.hasOwnProperty("displayName")) if (!$util.isString(message.displayName)) return "displayName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.active != null && message.hasOwnProperty("active")) + if (typeof message.active !== "boolean") + return "active: boolean expected"; + if (message.phraseMatchRuleGroups != null && message.hasOwnProperty("phraseMatchRuleGroups")) { + if (!Array.isArray(message.phraseMatchRuleGroups)) + return "phraseMatchRuleGroups: array expected"; + for (var i = 0; i < message.phraseMatchRuleGroups.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.verify(message.phraseMatchRuleGroups[i]); + if (error) + return "phraseMatchRuleGroups." + error; + } + } + if (message.activationUpdateTime != null && message.hasOwnProperty("activationUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.activationUpdateTime); + if (error) + return "activationUpdateTime." + error; + } + if (message.roleMatch != null && message.hasOwnProperty("roleMatch")) + switch (message.roleMatch) { + default: + return "roleMatch: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + 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 DialogflowIntent message from a plain object. Also converts values to their respective internal types. + * Creates a PhraseMatcher message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.DialogflowIntent + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.DialogflowIntent} DialogflowIntent + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatcher} PhraseMatcher */ - DialogflowIntent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.DialogflowIntent) + PhraseMatcher.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.PhraseMatcher) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.DialogflowIntent(); + var message = new $root.google.cloud.contactcenterinsights.v1.PhraseMatcher(); + if (object.name != null) + message.name = String(object.name); + if (object.revisionId != null) + message.revisionId = String(object.revisionId); + if (object.versionTag != null) + message.versionTag = String(object.versionTag); + if (object.revisionCreateTime != null) { + if (typeof object.revisionCreateTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.PhraseMatcher.revisionCreateTime: object expected"); + message.revisionCreateTime = $root.google.protobuf.Timestamp.fromObject(object.revisionCreateTime); + } if (object.displayName != null) message.displayName = String(object.displayName); - return message; - }; - - /** - * Creates a plain object from a DialogflowIntent message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.DialogflowIntent - * @static - * @param {google.cloud.contactcenterinsights.v1.DialogflowIntent} message DialogflowIntent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DialogflowIntent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.displayName = ""; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - return object; - }; - - /** - * Converts this DialogflowIntent to JSON. - * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.DialogflowIntent - * @instance - * @returns {Object.} JSON object - */ - DialogflowIntent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DialogflowIntent - * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.DialogflowIntent - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DialogflowIntent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "PHRASE_MATCHER_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "ALL_OF": + case 1: + message.type = 1; + break; + case "ANY_OF": + case 2: + message.type = 2; + break; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.DialogflowIntent"; - }; - - return DialogflowIntent; - })(); - - v1.InterruptionData = (function() { - - /** - * Properties of an InterruptionData. - * @memberof google.cloud.contactcenterinsights.v1 - * @interface IInterruptionData - */ - - /** - * Constructs a new InterruptionData. - * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents an InterruptionData. - * @implements IInterruptionData - * @constructor - * @param {google.cloud.contactcenterinsights.v1.IInterruptionData=} [properties] Properties to set - */ - function InterruptionData(properties) { - if (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 InterruptionData instance using the specified properties. - * @function create - * @memberof google.cloud.contactcenterinsights.v1.InterruptionData - * @static - * @param {google.cloud.contactcenterinsights.v1.IInterruptionData=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.InterruptionData} InterruptionData instance - */ - InterruptionData.create = function create(properties) { - return new InterruptionData(properties); - }; - - /** - * Encodes the specified InterruptionData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InterruptionData.verify|verify} messages. - * @function encode - * @memberof google.cloud.contactcenterinsights.v1.InterruptionData - * @static - * @param {google.cloud.contactcenterinsights.v1.IInterruptionData} message InterruptionData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InterruptionData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified InterruptionData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InterruptionData.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.InterruptionData - * @static - * @param {google.cloud.contactcenterinsights.v1.IInterruptionData} message InterruptionData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InterruptionData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InterruptionData message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.contactcenterinsights.v1.InterruptionData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.InterruptionData} InterruptionData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InterruptionData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.InterruptionData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); + if (object.active != null) + message.active = Boolean(object.active); + if (object.phraseMatchRuleGroups) { + if (!Array.isArray(object.phraseMatchRuleGroups)) + throw TypeError(".google.cloud.contactcenterinsights.v1.PhraseMatcher.phraseMatchRuleGroups: array expected"); + message.phraseMatchRuleGroups = []; + for (var i = 0; i < object.phraseMatchRuleGroups.length; ++i) { + if (typeof object.phraseMatchRuleGroups[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.PhraseMatcher.phraseMatchRuleGroups: object expected"); + message.phraseMatchRuleGroups[i] = $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.fromObject(object.phraseMatchRuleGroups[i]); + } + } + if (object.activationUpdateTime != null) { + if (typeof object.activationUpdateTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.PhraseMatcher.activationUpdateTime: object expected"); + message.activationUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.activationUpdateTime); + } + switch (object.roleMatch) { + default: + if (typeof object.roleMatch === "number") { + message.roleMatch = object.roleMatch; break; } + break; + case "ROLE_UNSPECIFIED": + case 0: + message.roleMatch = 0; + break; + case "HUMAN_AGENT": + case 1: + message.roleMatch = 1; + break; + case "AUTOMATED_AGENT": + case 2: + message.roleMatch = 2; + break; + case "END_USER": + case 3: + message.roleMatch = 3; + break; + case "ANY_AGENT": + case 4: + message.roleMatch = 4; + break; + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.PhraseMatcher.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } return message; }; /** - * Decodes an InterruptionData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.InterruptionData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.InterruptionData} InterruptionData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InterruptionData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InterruptionData message. - * @function verify - * @memberof google.cloud.contactcenterinsights.v1.InterruptionData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InterruptionData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an InterruptionData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.InterruptionData - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.InterruptionData} InterruptionData - */ - InterruptionData.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.InterruptionData) - return object; - return new $root.google.cloud.contactcenterinsights.v1.InterruptionData(); - }; - - /** - * Creates a plain object from an InterruptionData message. Also converts values to other types if specified. + * Creates a plain object from a PhraseMatcher message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.InterruptionData + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher * @static - * @param {google.cloud.contactcenterinsights.v1.InterruptionData} message InterruptionData + * @param {google.cloud.contactcenterinsights.v1.PhraseMatcher} message PhraseMatcher * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - InterruptionData.toObject = function toObject() { - return {}; + PhraseMatcher.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.phraseMatchRuleGroups = []; + if (options.defaults) { + object.name = ""; + object.revisionId = ""; + object.versionTag = ""; + object.revisionCreateTime = null; + object.displayName = ""; + object.type = options.enums === String ? "PHRASE_MATCHER_TYPE_UNSPECIFIED" : 0; + object.active = false; + object.activationUpdateTime = null; + object.roleMatch = options.enums === String ? "ROLE_UNSPECIFIED" : 0; + object.updateTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.revisionId != null && message.hasOwnProperty("revisionId")) + object.revisionId = message.revisionId; + if (message.versionTag != null && message.hasOwnProperty("versionTag")) + object.versionTag = message.versionTag; + if (message.revisionCreateTime != null && message.hasOwnProperty("revisionCreateTime")) + object.revisionCreateTime = $root.google.protobuf.Timestamp.toObject(message.revisionCreateTime, options); + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.PhraseMatcherType[message.type] === undefined ? message.type : $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.PhraseMatcherType[message.type] : message.type; + if (message.active != null && message.hasOwnProperty("active")) + object.active = message.active; + if (message.phraseMatchRuleGroups && message.phraseMatchRuleGroups.length) { + object.phraseMatchRuleGroups = []; + for (var j = 0; j < message.phraseMatchRuleGroups.length; ++j) + object.phraseMatchRuleGroups[j] = $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.toObject(message.phraseMatchRuleGroups[j], options); + } + if (message.activationUpdateTime != null && message.hasOwnProperty("activationUpdateTime")) + object.activationUpdateTime = $root.google.protobuf.Timestamp.toObject(message.activationUpdateTime, options); + if (message.roleMatch != null && message.hasOwnProperty("roleMatch")) + object.roleMatch = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.ConversationParticipant.Role[message.roleMatch] === undefined ? message.roleMatch : $root.google.cloud.contactcenterinsights.v1.ConversationParticipant.Role[message.roleMatch] : message.roleMatch; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; }; /** - * Converts this InterruptionData to JSON. + * Converts this PhraseMatcher to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.InterruptionData + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher * @instance * @returns {Object.} JSON object */ - InterruptionData.prototype.toJSON = function toJSON() { + PhraseMatcher.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for InterruptionData + * Gets the default type url for PhraseMatcher * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.InterruptionData + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - InterruptionData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PhraseMatcher.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.InterruptionData"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.PhraseMatcher"; }; - return InterruptionData; + /** + * PhraseMatcherType enum. + * @name google.cloud.contactcenterinsights.v1.PhraseMatcher.PhraseMatcherType + * @enum {number} + * @property {number} PHRASE_MATCHER_TYPE_UNSPECIFIED=0 PHRASE_MATCHER_TYPE_UNSPECIFIED value + * @property {number} ALL_OF=1 ALL_OF value + * @property {number} ANY_OF=2 ANY_OF value + */ + PhraseMatcher.PhraseMatcherType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PHRASE_MATCHER_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ALL_OF"] = 1; + values[valuesById[2] = "ANY_OF"] = 2; + return values; + })(); + + return PhraseMatcher; })(); - v1.SilenceData = (function() { + v1.PhraseMatchRuleGroup = (function() { /** - * Properties of a SilenceData. + * Properties of a PhraseMatchRuleGroup. * @memberof google.cloud.contactcenterinsights.v1 - * @interface ISilenceData + * @interface IPhraseMatchRuleGroup + * @property {google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType|null} [type] PhraseMatchRuleGroup type + * @property {Array.|null} [phraseMatchRules] PhraseMatchRuleGroup phraseMatchRules */ /** - * Constructs a new SilenceData. + * Constructs a new PhraseMatchRuleGroup. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a SilenceData. - * @implements ISilenceData + * @classdesc Represents a PhraseMatchRuleGroup. + * @implements IPhraseMatchRuleGroup * @constructor - * @param {google.cloud.contactcenterinsights.v1.ISilenceData=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchRuleGroup=} [properties] Properties to set */ - function SilenceData(properties) { + function PhraseMatchRuleGroup(properties) { + this.phraseMatchRules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29431,63 +50547,94 @@ } /** - * Creates a new SilenceData instance using the specified properties. + * PhraseMatchRuleGroup type. + * @member {google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType} type + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup + * @instance + */ + PhraseMatchRuleGroup.prototype.type = 0; + + /** + * PhraseMatchRuleGroup phraseMatchRules. + * @member {Array.} phraseMatchRules + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup + * @instance + */ + PhraseMatchRuleGroup.prototype.phraseMatchRules = $util.emptyArray; + + /** + * Creates a new PhraseMatchRuleGroup instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.SilenceData + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup * @static - * @param {google.cloud.contactcenterinsights.v1.ISilenceData=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.SilenceData} SilenceData instance + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchRuleGroup=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup} PhraseMatchRuleGroup instance */ - SilenceData.create = function create(properties) { - return new SilenceData(properties); + PhraseMatchRuleGroup.create = function create(properties) { + return new PhraseMatchRuleGroup(properties); }; /** - * Encodes the specified SilenceData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SilenceData.verify|verify} messages. + * Encodes the specified PhraseMatchRuleGroup message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.SilenceData + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup * @static - * @param {google.cloud.contactcenterinsights.v1.ISilenceData} message SilenceData message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchRuleGroup} message PhraseMatchRuleGroup message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SilenceData.encode = function encode(message, writer) { + PhraseMatchRuleGroup.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.phraseMatchRules != null && message.phraseMatchRules.length) + for (var i = 0; i < message.phraseMatchRules.length; ++i) + $root.google.cloud.contactcenterinsights.v1.PhraseMatchRule.encode(message.phraseMatchRules[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified SilenceData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SilenceData.verify|verify} messages. + * Encodes the specified PhraseMatchRuleGroup message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.SilenceData + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup * @static - * @param {google.cloud.contactcenterinsights.v1.ISilenceData} message SilenceData message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchRuleGroup} message PhraseMatchRuleGroup message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SilenceData.encodeDelimited = function encodeDelimited(message, writer) { + PhraseMatchRuleGroup.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SilenceData message from the specified reader or buffer. + * Decodes a PhraseMatchRuleGroup message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.SilenceData + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.SilenceData} SilenceData + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup} PhraseMatchRuleGroup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SilenceData.decode = function decode(reader, length) { + PhraseMatchRuleGroup.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.SilenceData(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + if (!(message.phraseMatchRules && message.phraseMatchRules.length)) + message.phraseMatchRules = []; + message.phraseMatchRules.push($root.google.cloud.contactcenterinsights.v1.PhraseMatchRule.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -29497,108 +50644,190 @@ }; /** - * Decodes a SilenceData message from the specified reader or buffer, length delimited. + * Decodes a PhraseMatchRuleGroup message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.SilenceData + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.SilenceData} SilenceData + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup} PhraseMatchRuleGroup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SilenceData.decodeDelimited = function decodeDelimited(reader) { + PhraseMatchRuleGroup.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SilenceData message. + * Verifies a PhraseMatchRuleGroup message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.SilenceData + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SilenceData.verify = function verify(message) { + PhraseMatchRuleGroup.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: + break; + } + if (message.phraseMatchRules != null && message.hasOwnProperty("phraseMatchRules")) { + if (!Array.isArray(message.phraseMatchRules)) + return "phraseMatchRules: array expected"; + for (var i = 0; i < message.phraseMatchRules.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.PhraseMatchRule.verify(message.phraseMatchRules[i]); + if (error) + return "phraseMatchRules." + error; + } + } return null; }; /** - * Creates a SilenceData message from a plain object. Also converts values to their respective internal types. + * Creates a PhraseMatchRuleGroup message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.SilenceData + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.SilenceData} SilenceData + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup} PhraseMatchRuleGroup */ - SilenceData.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.SilenceData) + PhraseMatchRuleGroup.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup) return object; - return new $root.google.cloud.contactcenterinsights.v1.SilenceData(); + var message = new $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "PHRASE_MATCH_RULE_GROUP_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "ALL_OF": + case 1: + message.type = 1; + break; + case "ANY_OF": + case 2: + message.type = 2; + break; + } + if (object.phraseMatchRules) { + if (!Array.isArray(object.phraseMatchRules)) + throw TypeError(".google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.phraseMatchRules: array expected"); + message.phraseMatchRules = []; + for (var i = 0; i < object.phraseMatchRules.length; ++i) { + if (typeof object.phraseMatchRules[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.phraseMatchRules: object expected"); + message.phraseMatchRules[i] = $root.google.cloud.contactcenterinsights.v1.PhraseMatchRule.fromObject(object.phraseMatchRules[i]); + } + } + return message; }; /** - * Creates a plain object from a SilenceData message. Also converts values to other types if specified. + * Creates a plain object from a PhraseMatchRuleGroup message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.SilenceData + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup * @static - * @param {google.cloud.contactcenterinsights.v1.SilenceData} message SilenceData + * @param {google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup} message PhraseMatchRuleGroup * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SilenceData.toObject = function toObject() { - return {}; + PhraseMatchRuleGroup.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.phraseMatchRules = []; + if (options.defaults) + object.type = options.enums === String ? "PHRASE_MATCH_RULE_GROUP_TYPE_UNSPECIFIED" : 0; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType[message.type] === undefined ? message.type : $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType[message.type] : message.type; + if (message.phraseMatchRules && message.phraseMatchRules.length) { + object.phraseMatchRules = []; + for (var j = 0; j < message.phraseMatchRules.length; ++j) + object.phraseMatchRules[j] = $root.google.cloud.contactcenterinsights.v1.PhraseMatchRule.toObject(message.phraseMatchRules[j], options); + } + return object; }; /** - * Converts this SilenceData to JSON. + * Converts this PhraseMatchRuleGroup to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.SilenceData + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup * @instance * @returns {Object.} JSON object */ - SilenceData.prototype.toJSON = function toJSON() { + PhraseMatchRuleGroup.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SilenceData + * Gets the default type url for PhraseMatchRuleGroup * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.SilenceData + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SilenceData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PhraseMatchRuleGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.SilenceData"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup"; }; - return SilenceData; + /** + * PhraseMatchRuleGroupType enum. + * @name google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType + * @enum {number} + * @property {number} PHRASE_MATCH_RULE_GROUP_TYPE_UNSPECIFIED=0 PHRASE_MATCH_RULE_GROUP_TYPE_UNSPECIFIED value + * @property {number} ALL_OF=1 ALL_OF value + * @property {number} ANY_OF=2 ANY_OF value + */ + PhraseMatchRuleGroup.PhraseMatchRuleGroupType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PHRASE_MATCH_RULE_GROUP_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ALL_OF"] = 1; + values[valuesById[2] = "ANY_OF"] = 2; + return values; + })(); + + return PhraseMatchRuleGroup; })(); - v1.HoldData = (function() { + v1.PhraseMatchRule = (function() { /** - * Properties of a HoldData. + * Properties of a PhraseMatchRule. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IHoldData + * @interface IPhraseMatchRule + * @property {string|null} [query] PhraseMatchRule query + * @property {boolean|null} [negated] PhraseMatchRule negated + * @property {google.cloud.contactcenterinsights.v1.IPhraseMatchRuleConfig|null} [config] PhraseMatchRule config */ /** - * Constructs a new HoldData. + * Constructs a new PhraseMatchRule. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a HoldData. - * @implements IHoldData + * @classdesc Represents a PhraseMatchRule. + * @implements IPhraseMatchRule * @constructor - * @param {google.cloud.contactcenterinsights.v1.IHoldData=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchRule=} [properties] Properties to set */ - function HoldData(properties) { + function PhraseMatchRule(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29606,63 +50835,105 @@ } /** - * Creates a new HoldData instance using the specified properties. + * PhraseMatchRule query. + * @member {string} query + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule + * @instance + */ + PhraseMatchRule.prototype.query = ""; + + /** + * PhraseMatchRule negated. + * @member {boolean} negated + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule + * @instance + */ + PhraseMatchRule.prototype.negated = false; + + /** + * PhraseMatchRule config. + * @member {google.cloud.contactcenterinsights.v1.IPhraseMatchRuleConfig|null|undefined} config + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule + * @instance + */ + PhraseMatchRule.prototype.config = null; + + /** + * Creates a new PhraseMatchRule instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.HoldData + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule * @static - * @param {google.cloud.contactcenterinsights.v1.IHoldData=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.HoldData} HoldData instance + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchRule=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchRule} PhraseMatchRule instance */ - HoldData.create = function create(properties) { - return new HoldData(properties); + PhraseMatchRule.create = function create(properties) { + return new PhraseMatchRule(properties); }; /** - * Encodes the specified HoldData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.HoldData.verify|verify} messages. + * Encodes the specified PhraseMatchRule message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchRule.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.HoldData + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule * @static - * @param {google.cloud.contactcenterinsights.v1.IHoldData} message HoldData message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchRule} message PhraseMatchRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HoldData.encode = function encode(message, writer) { + PhraseMatchRule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.query); + if (message.negated != null && Object.hasOwnProperty.call(message, "negated")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.negated); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig.encode(message.config, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified HoldData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.HoldData.verify|verify} messages. + * Encodes the specified PhraseMatchRule message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchRule.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.HoldData + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule * @static - * @param {google.cloud.contactcenterinsights.v1.IHoldData} message HoldData message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchRule} message PhraseMatchRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HoldData.encodeDelimited = function encodeDelimited(message, writer) { + PhraseMatchRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HoldData message from the specified reader or buffer. + * Decodes a PhraseMatchRule message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.HoldData + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.HoldData} HoldData + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchRule} PhraseMatchRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HoldData.decode = function decode(reader, length) { + PhraseMatchRule.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.HoldData(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.PhraseMatchRule(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.query = reader.string(); + break; + } + case 2: { + message.negated = reader.bool(); + break; + } + case 3: { + message.config = $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -29672,111 +50943,144 @@ }; /** - * Decodes a HoldData message from the specified reader or buffer, length delimited. + * Decodes a PhraseMatchRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.HoldData + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.HoldData} HoldData + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchRule} PhraseMatchRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HoldData.decodeDelimited = function decodeDelimited(reader) { + PhraseMatchRule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HoldData message. + * Verifies a PhraseMatchRule message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.HoldData + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - HoldData.verify = function verify(message) { + PhraseMatchRule.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.query != null && message.hasOwnProperty("query")) + if (!$util.isString(message.query)) + return "query: string expected"; + if (message.negated != null && message.hasOwnProperty("negated")) + if (typeof message.negated !== "boolean") + return "negated: boolean expected"; + if (message.config != null && message.hasOwnProperty("config")) { + var error = $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig.verify(message.config); + if (error) + return "config." + error; + } return null; }; /** - * Creates a HoldData message from a plain object. Also converts values to their respective internal types. + * Creates a PhraseMatchRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.HoldData + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.HoldData} HoldData - */ - HoldData.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.HoldData) + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchRule} PhraseMatchRule + */ + PhraseMatchRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.PhraseMatchRule) return object; - return new $root.google.cloud.contactcenterinsights.v1.HoldData(); + var message = new $root.google.cloud.contactcenterinsights.v1.PhraseMatchRule(); + if (object.query != null) + message.query = String(object.query); + if (object.negated != null) + message.negated = Boolean(object.negated); + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.PhraseMatchRule.config: object expected"); + message.config = $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig.fromObject(object.config); + } + return message; }; /** - * Creates a plain object from a HoldData message. Also converts values to other types if specified. + * Creates a plain object from a PhraseMatchRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.HoldData + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule * @static - * @param {google.cloud.contactcenterinsights.v1.HoldData} message HoldData + * @param {google.cloud.contactcenterinsights.v1.PhraseMatchRule} message PhraseMatchRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HoldData.toObject = function toObject() { - return {}; + PhraseMatchRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.query = ""; + object.negated = false; + object.config = null; + } + if (message.query != null && message.hasOwnProperty("query")) + object.query = message.query; + if (message.negated != null && message.hasOwnProperty("negated")) + object.negated = message.negated; + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig.toObject(message.config, options); + return object; }; /** - * Converts this HoldData to JSON. + * Converts this PhraseMatchRule to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.HoldData + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule * @instance * @returns {Object.} JSON object */ - HoldData.prototype.toJSON = function toJSON() { + PhraseMatchRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for HoldData + * Gets the default type url for PhraseMatchRule * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.HoldData + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - HoldData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PhraseMatchRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.HoldData"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.PhraseMatchRule"; }; - return HoldData; + return PhraseMatchRule; })(); - v1.EntityMentionData = (function() { + v1.PhraseMatchRuleConfig = (function() { /** - * Properties of an EntityMentionData. + * Properties of a PhraseMatchRuleConfig. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IEntityMentionData - * @property {string|null} [entityUniqueId] EntityMentionData entityUniqueId - * @property {google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType|null} [type] EntityMentionData type - * @property {google.cloud.contactcenterinsights.v1.ISentimentData|null} [sentiment] EntityMentionData sentiment + * @interface IPhraseMatchRuleConfig + * @property {google.cloud.contactcenterinsights.v1.IExactMatchConfig|null} [exactMatchConfig] PhraseMatchRuleConfig exactMatchConfig */ /** - * Constructs a new EntityMentionData. + * Constructs a new PhraseMatchRuleConfig. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents an EntityMentionData. - * @implements IEntityMentionData + * @classdesc Represents a PhraseMatchRuleConfig. + * @implements IPhraseMatchRuleConfig * @constructor - * @param {google.cloud.contactcenterinsights.v1.IEntityMentionData=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchRuleConfig=} [properties] Properties to set */ - function EntityMentionData(properties) { + function PhraseMatchRuleConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29784,103 +51088,89 @@ } /** - * EntityMentionData entityUniqueId. - * @member {string} entityUniqueId - * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData + * PhraseMatchRuleConfig exactMatchConfig. + * @member {google.cloud.contactcenterinsights.v1.IExactMatchConfig|null|undefined} exactMatchConfig + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig * @instance */ - EntityMentionData.prototype.entityUniqueId = ""; + PhraseMatchRuleConfig.prototype.exactMatchConfig = null; - /** - * EntityMentionData type. - * @member {google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType} type - * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData - * @instance - */ - EntityMentionData.prototype.type = 0; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * EntityMentionData sentiment. - * @member {google.cloud.contactcenterinsights.v1.ISentimentData|null|undefined} sentiment - * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData + * PhraseMatchRuleConfig config. + * @member {"exactMatchConfig"|undefined} config + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig * @instance */ - EntityMentionData.prototype.sentiment = null; + Object.defineProperty(PhraseMatchRuleConfig.prototype, "config", { + get: $util.oneOfGetter($oneOfFields = ["exactMatchConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new EntityMentionData instance using the specified properties. + * Creates a new PhraseMatchRuleConfig instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig * @static - * @param {google.cloud.contactcenterinsights.v1.IEntityMentionData=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.EntityMentionData} EntityMentionData instance + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchRuleConfig=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig} PhraseMatchRuleConfig instance */ - EntityMentionData.create = function create(properties) { - return new EntityMentionData(properties); + PhraseMatchRuleConfig.create = function create(properties) { + return new PhraseMatchRuleConfig(properties); }; /** - * Encodes the specified EntityMentionData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.EntityMentionData.verify|verify} messages. + * Encodes the specified PhraseMatchRuleConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig * @static - * @param {google.cloud.contactcenterinsights.v1.IEntityMentionData} message EntityMentionData message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchRuleConfig} message PhraseMatchRuleConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EntityMentionData.encode = function encode(message, writer) { + PhraseMatchRuleConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.entityUniqueId != null && Object.hasOwnProperty.call(message, "entityUniqueId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.entityUniqueId); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - if (message.sentiment != null && Object.hasOwnProperty.call(message, "sentiment")) - $root.google.cloud.contactcenterinsights.v1.SentimentData.encode(message.sentiment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.exactMatchConfig != null && Object.hasOwnProperty.call(message, "exactMatchConfig")) + $root.google.cloud.contactcenterinsights.v1.ExactMatchConfig.encode(message.exactMatchConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified EntityMentionData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.EntityMentionData.verify|verify} messages. + * Encodes the specified PhraseMatchRuleConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig * @static - * @param {google.cloud.contactcenterinsights.v1.IEntityMentionData} message EntityMentionData message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchRuleConfig} message PhraseMatchRuleConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EntityMentionData.encodeDelimited = function encodeDelimited(message, writer) { + PhraseMatchRuleConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EntityMentionData message from the specified reader or buffer. + * Decodes a PhraseMatchRuleConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.EntityMentionData} EntityMentionData + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig} PhraseMatchRuleConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EntityMentionData.decode = function decode(reader, length) { + PhraseMatchRuleConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.EntityMentionData(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.entityUniqueId = reader.string(); - break; - } - case 2: { - message.type = reader.int32(); - break; - } - case 3: { - message.sentiment = $root.google.cloud.contactcenterinsights.v1.SentimentData.decode(reader, reader.uint32()); + message.exactMatchConfig = $root.google.cloud.contactcenterinsights.v1.ExactMatchConfig.decode(reader, reader.uint32()); break; } default: @@ -29892,184 +51182,132 @@ }; /** - * Decodes an EntityMentionData message from the specified reader or buffer, length delimited. + * Decodes a PhraseMatchRuleConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.EntityMentionData} EntityMentionData + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig} PhraseMatchRuleConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EntityMentionData.decodeDelimited = function decodeDelimited(reader) { + PhraseMatchRuleConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EntityMentionData message. + * Verifies a PhraseMatchRuleConfig message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EntityMentionData.verify = function verify(message) { + PhraseMatchRuleConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.entityUniqueId != null && message.hasOwnProperty("entityUniqueId")) - if (!$util.isString(message.entityUniqueId)) - return "entityUniqueId: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; + var properties = {}; + if (message.exactMatchConfig != null && message.hasOwnProperty("exactMatchConfig")) { + properties.config = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.ExactMatchConfig.verify(message.exactMatchConfig); + if (error) + return "exactMatchConfig." + error; } - if (message.sentiment != null && message.hasOwnProperty("sentiment")) { - var error = $root.google.cloud.contactcenterinsights.v1.SentimentData.verify(message.sentiment); - if (error) - return "sentiment." + error; } return null; }; /** - * Creates an EntityMentionData message from a plain object. Also converts values to their respective internal types. + * Creates a PhraseMatchRuleConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.EntityMentionData} EntityMentionData + * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig} PhraseMatchRuleConfig */ - EntityMentionData.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.EntityMentionData) + PhraseMatchRuleConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.EntityMentionData(); - if (object.entityUniqueId != null) - message.entityUniqueId = String(object.entityUniqueId); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "MENTION_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "PROPER": - case 1: - message.type = 1; - break; - case "COMMON": - case 2: - message.type = 2; - break; - } - if (object.sentiment != null) { - if (typeof object.sentiment !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.EntityMentionData.sentiment: object expected"); - message.sentiment = $root.google.cloud.contactcenterinsights.v1.SentimentData.fromObject(object.sentiment); + var message = new $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig(); + if (object.exactMatchConfig != null) { + if (typeof object.exactMatchConfig !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig.exactMatchConfig: object expected"); + message.exactMatchConfig = $root.google.cloud.contactcenterinsights.v1.ExactMatchConfig.fromObject(object.exactMatchConfig); } return message; }; /** - * Creates a plain object from an EntityMentionData message. Also converts values to other types if specified. + * Creates a plain object from a PhraseMatchRuleConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig * @static - * @param {google.cloud.contactcenterinsights.v1.EntityMentionData} message EntityMentionData + * @param {google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig} message PhraseMatchRuleConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EntityMentionData.toObject = function toObject(message, options) { + PhraseMatchRuleConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.entityUniqueId = ""; - object.type = options.enums === String ? "MENTION_TYPE_UNSPECIFIED" : 0; - object.sentiment = null; + if (message.exactMatchConfig != null && message.hasOwnProperty("exactMatchConfig")) { + object.exactMatchConfig = $root.google.cloud.contactcenterinsights.v1.ExactMatchConfig.toObject(message.exactMatchConfig, options); + if (options.oneofs) + object.config = "exactMatchConfig"; } - if (message.entityUniqueId != null && message.hasOwnProperty("entityUniqueId")) - object.entityUniqueId = message.entityUniqueId; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType[message.type] === undefined ? message.type : $root.google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType[message.type] : message.type; - if (message.sentiment != null && message.hasOwnProperty("sentiment")) - object.sentiment = $root.google.cloud.contactcenterinsights.v1.SentimentData.toObject(message.sentiment, options); return object; }; /** - * Converts this EntityMentionData to JSON. + * Converts this PhraseMatchRuleConfig to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig * @instance * @returns {Object.} JSON object */ - EntityMentionData.prototype.toJSON = function toJSON() { + PhraseMatchRuleConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EntityMentionData + * Gets the default type url for PhraseMatchRuleConfig * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.EntityMentionData + * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EntityMentionData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PhraseMatchRuleConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.EntityMentionData"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig"; }; - /** - * MentionType enum. - * @name google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType - * @enum {number} - * @property {number} MENTION_TYPE_UNSPECIFIED=0 MENTION_TYPE_UNSPECIFIED value - * @property {number} PROPER=1 PROPER value - * @property {number} COMMON=2 COMMON value - */ - EntityMentionData.MentionType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MENTION_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PROPER"] = 1; - values[valuesById[2] = "COMMON"] = 2; - return values; - })(); - - return EntityMentionData; + return PhraseMatchRuleConfig; })(); - v1.IntentMatchData = (function() { + v1.ExactMatchConfig = (function() { /** - * Properties of an IntentMatchData. + * Properties of an ExactMatchConfig. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IIntentMatchData - * @property {string|null} [intentUniqueId] IntentMatchData intentUniqueId + * @interface IExactMatchConfig + * @property {boolean|null} [caseSensitive] ExactMatchConfig caseSensitive */ /** - * Constructs a new IntentMatchData. + * Constructs a new ExactMatchConfig. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents an IntentMatchData. - * @implements IIntentMatchData + * @classdesc Represents an ExactMatchConfig. + * @implements IExactMatchConfig * @constructor - * @param {google.cloud.contactcenterinsights.v1.IIntentMatchData=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IExactMatchConfig=} [properties] Properties to set */ - function IntentMatchData(properties) { + function ExactMatchConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -30077,75 +51315,75 @@ } /** - * IntentMatchData intentUniqueId. - * @member {string} intentUniqueId - * @memberof google.cloud.contactcenterinsights.v1.IntentMatchData + * ExactMatchConfig caseSensitive. + * @member {boolean} caseSensitive + * @memberof google.cloud.contactcenterinsights.v1.ExactMatchConfig * @instance */ - IntentMatchData.prototype.intentUniqueId = ""; + ExactMatchConfig.prototype.caseSensitive = false; /** - * Creates a new IntentMatchData instance using the specified properties. + * Creates a new ExactMatchConfig instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.IntentMatchData + * @memberof google.cloud.contactcenterinsights.v1.ExactMatchConfig * @static - * @param {google.cloud.contactcenterinsights.v1.IIntentMatchData=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.IntentMatchData} IntentMatchData instance + * @param {google.cloud.contactcenterinsights.v1.IExactMatchConfig=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ExactMatchConfig} ExactMatchConfig instance */ - IntentMatchData.create = function create(properties) { - return new IntentMatchData(properties); + ExactMatchConfig.create = function create(properties) { + return new ExactMatchConfig(properties); }; /** - * Encodes the specified IntentMatchData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IntentMatchData.verify|verify} messages. + * Encodes the specified ExactMatchConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExactMatchConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.IntentMatchData + * @memberof google.cloud.contactcenterinsights.v1.ExactMatchConfig * @static - * @param {google.cloud.contactcenterinsights.v1.IIntentMatchData} message IntentMatchData message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IExactMatchConfig} message ExactMatchConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - IntentMatchData.encode = function encode(message, writer) { + ExactMatchConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.intentUniqueId != null && Object.hasOwnProperty.call(message, "intentUniqueId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.intentUniqueId); + if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.caseSensitive); return writer; }; /** - * Encodes the specified IntentMatchData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IntentMatchData.verify|verify} messages. + * Encodes the specified ExactMatchConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExactMatchConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.IntentMatchData + * @memberof google.cloud.contactcenterinsights.v1.ExactMatchConfig * @static - * @param {google.cloud.contactcenterinsights.v1.IIntentMatchData} message IntentMatchData message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IExactMatchConfig} message ExactMatchConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - IntentMatchData.encodeDelimited = function encodeDelimited(message, writer) { + ExactMatchConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an IntentMatchData message from the specified reader or buffer. + * Decodes an ExactMatchConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.IntentMatchData + * @memberof google.cloud.contactcenterinsights.v1.ExactMatchConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.IntentMatchData} IntentMatchData + * @returns {google.cloud.contactcenterinsights.v1.ExactMatchConfig} ExactMatchConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - IntentMatchData.decode = function decode(reader, length) { + ExactMatchConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.IntentMatchData(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ExactMatchConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.intentUniqueId = reader.string(); + message.caseSensitive = reader.bool(); break; } default: @@ -30157,213 +51395,339 @@ }; /** - * Decodes an IntentMatchData message from the specified reader or buffer, length delimited. + * Decodes an ExactMatchConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.IntentMatchData + * @memberof google.cloud.contactcenterinsights.v1.ExactMatchConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.IntentMatchData} IntentMatchData + * @returns {google.cloud.contactcenterinsights.v1.ExactMatchConfig} ExactMatchConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - IntentMatchData.decodeDelimited = function decodeDelimited(reader) { + ExactMatchConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an IntentMatchData message. + * Verifies an ExactMatchConfig message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.IntentMatchData + * @memberof google.cloud.contactcenterinsights.v1.ExactMatchConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - IntentMatchData.verify = function verify(message) { + ExactMatchConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.intentUniqueId != null && message.hasOwnProperty("intentUniqueId")) - if (!$util.isString(message.intentUniqueId)) - return "intentUniqueId: string expected"; + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + if (typeof message.caseSensitive !== "boolean") + return "caseSensitive: boolean expected"; return null; }; /** - * Creates an IntentMatchData message from a plain object. Also converts values to their respective internal types. + * Creates an ExactMatchConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.IntentMatchData + * @memberof google.cloud.contactcenterinsights.v1.ExactMatchConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.IntentMatchData} IntentMatchData + * @returns {google.cloud.contactcenterinsights.v1.ExactMatchConfig} ExactMatchConfig */ - IntentMatchData.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.IntentMatchData) + ExactMatchConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ExactMatchConfig) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.IntentMatchData(); - if (object.intentUniqueId != null) - message.intentUniqueId = String(object.intentUniqueId); + var message = new $root.google.cloud.contactcenterinsights.v1.ExactMatchConfig(); + if (object.caseSensitive != null) + message.caseSensitive = Boolean(object.caseSensitive); return message; }; /** - * Creates a plain object from an IntentMatchData message. Also converts values to other types if specified. + * Creates a plain object from an ExactMatchConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.IntentMatchData + * @memberof google.cloud.contactcenterinsights.v1.ExactMatchConfig * @static - * @param {google.cloud.contactcenterinsights.v1.IntentMatchData} message IntentMatchData + * @param {google.cloud.contactcenterinsights.v1.ExactMatchConfig} message ExactMatchConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - IntentMatchData.toObject = function toObject(message, options) { + ExactMatchConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.intentUniqueId = ""; - if (message.intentUniqueId != null && message.hasOwnProperty("intentUniqueId")) - object.intentUniqueId = message.intentUniqueId; + object.caseSensitive = false; + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + object.caseSensitive = message.caseSensitive; return object; }; /** - * Converts this IntentMatchData to JSON. + * Converts this ExactMatchConfig to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.IntentMatchData + * @memberof google.cloud.contactcenterinsights.v1.ExactMatchConfig * @instance * @returns {Object.} JSON object */ - IntentMatchData.prototype.toJSON = function toJSON() { + ExactMatchConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for IntentMatchData + * Gets the default type url for ExactMatchConfig * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.IntentMatchData + * @memberof google.cloud.contactcenterinsights.v1.ExactMatchConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - IntentMatchData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExactMatchConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.IntentMatchData"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ExactMatchConfig"; }; - return IntentMatchData; + return ExactMatchConfig; })(); - v1.SentimentData = (function() { + v1.Settings = (function() { /** - * Properties of a SentimentData. + * Properties of a Settings. * @memberof google.cloud.contactcenterinsights.v1 - * @interface ISentimentData - * @property {number|null} [magnitude] SentimentData magnitude - * @property {number|null} [score] SentimentData score + * @interface ISettings + * @property {string|null} [name] Settings name + * @property {google.protobuf.ITimestamp|null} [createTime] Settings createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Settings updateTime + * @property {string|null} [languageCode] Settings languageCode + * @property {google.protobuf.IDuration|null} [conversationTtl] Settings conversationTtl + * @property {Object.|null} [pubsubNotificationSettings] Settings pubsubNotificationSettings + * @property {google.cloud.contactcenterinsights.v1.Settings.IAnalysisConfig|null} [analysisConfig] Settings analysisConfig + * @property {google.cloud.contactcenterinsights.v1.IRedactionConfig|null} [redactionConfig] Settings redactionConfig + * @property {google.cloud.contactcenterinsights.v1.ISpeechConfig|null} [speechConfig] Settings speechConfig */ /** - * Constructs a new SentimentData. + * Constructs a new Settings. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a SentimentData. - * @implements ISentimentData + * @classdesc Represents a Settings. + * @implements ISettings * @constructor - * @param {google.cloud.contactcenterinsights.v1.ISentimentData=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.ISettings=} [properties] Properties to set + */ + function Settings(properties) { + this.pubsubNotificationSettings = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Settings name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.Settings + * @instance + */ + Settings.prototype.name = ""; + + /** + * Settings createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.contactcenterinsights.v1.Settings + * @instance + */ + Settings.prototype.createTime = null; + + /** + * Settings updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.contactcenterinsights.v1.Settings + * @instance + */ + Settings.prototype.updateTime = null; + + /** + * Settings languageCode. + * @member {string} languageCode + * @memberof google.cloud.contactcenterinsights.v1.Settings + * @instance + */ + Settings.prototype.languageCode = ""; + + /** + * Settings conversationTtl. + * @member {google.protobuf.IDuration|null|undefined} conversationTtl + * @memberof google.cloud.contactcenterinsights.v1.Settings + * @instance + */ + Settings.prototype.conversationTtl = null; + + /** + * Settings pubsubNotificationSettings. + * @member {Object.} pubsubNotificationSettings + * @memberof google.cloud.contactcenterinsights.v1.Settings + * @instance + */ + Settings.prototype.pubsubNotificationSettings = $util.emptyObject; + + /** + * Settings analysisConfig. + * @member {google.cloud.contactcenterinsights.v1.Settings.IAnalysisConfig|null|undefined} analysisConfig + * @memberof google.cloud.contactcenterinsights.v1.Settings + * @instance */ - function SentimentData(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Settings.prototype.analysisConfig = null; /** - * SentimentData magnitude. - * @member {number} magnitude - * @memberof google.cloud.contactcenterinsights.v1.SentimentData + * Settings redactionConfig. + * @member {google.cloud.contactcenterinsights.v1.IRedactionConfig|null|undefined} redactionConfig + * @memberof google.cloud.contactcenterinsights.v1.Settings * @instance */ - SentimentData.prototype.magnitude = 0; + Settings.prototype.redactionConfig = null; /** - * SentimentData score. - * @member {number} score - * @memberof google.cloud.contactcenterinsights.v1.SentimentData + * Settings speechConfig. + * @member {google.cloud.contactcenterinsights.v1.ISpeechConfig|null|undefined} speechConfig + * @memberof google.cloud.contactcenterinsights.v1.Settings * @instance */ - SentimentData.prototype.score = 0; + Settings.prototype.speechConfig = null; /** - * Creates a new SentimentData instance using the specified properties. + * Creates a new Settings instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.SentimentData + * @memberof google.cloud.contactcenterinsights.v1.Settings * @static - * @param {google.cloud.contactcenterinsights.v1.ISentimentData=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.SentimentData} SentimentData instance + * @param {google.cloud.contactcenterinsights.v1.ISettings=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.Settings} Settings instance */ - SentimentData.create = function create(properties) { - return new SentimentData(properties); + Settings.create = function create(properties) { + return new Settings(properties); }; /** - * Encodes the specified SentimentData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SentimentData.verify|verify} messages. + * Encodes the specified Settings message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Settings.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.SentimentData + * @memberof google.cloud.contactcenterinsights.v1.Settings * @static - * @param {google.cloud.contactcenterinsights.v1.ISentimentData} message SentimentData message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.ISettings} message Settings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SentimentData.encode = function encode(message, writer) { + Settings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.magnitude != null && Object.hasOwnProperty.call(message, "magnitude")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.magnitude); - if (message.score != null && Object.hasOwnProperty.call(message, "score")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.score); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, 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.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.languageCode); + if (message.conversationTtl != null && Object.hasOwnProperty.call(message, "conversationTtl")) + $root.google.protobuf.Duration.encode(message.conversationTtl, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.pubsubNotificationSettings != null && Object.hasOwnProperty.call(message, "pubsubNotificationSettings")) + for (var keys = Object.keys(message.pubsubNotificationSettings), i = 0; i < keys.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.pubsubNotificationSettings[keys[i]]).ldelim(); + if (message.analysisConfig != null && Object.hasOwnProperty.call(message, "analysisConfig")) + $root.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.encode(message.analysisConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.redactionConfig != null && Object.hasOwnProperty.call(message, "redactionConfig")) + $root.google.cloud.contactcenterinsights.v1.RedactionConfig.encode(message.redactionConfig, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.speechConfig != null && Object.hasOwnProperty.call(message, "speechConfig")) + $root.google.cloud.contactcenterinsights.v1.SpeechConfig.encode(message.speechConfig, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); return writer; }; /** - * Encodes the specified SentimentData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SentimentData.verify|verify} messages. + * Encodes the specified Settings message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Settings.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.SentimentData + * @memberof google.cloud.contactcenterinsights.v1.Settings * @static - * @param {google.cloud.contactcenterinsights.v1.ISentimentData} message SentimentData message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.ISettings} message Settings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SentimentData.encodeDelimited = function encodeDelimited(message, writer) { + Settings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SentimentData message from the specified reader or buffer. + * Decodes a Settings message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.SentimentData + * @memberof google.cloud.contactcenterinsights.v1.Settings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.SentimentData} SentimentData + * @returns {google.cloud.contactcenterinsights.v1.Settings} Settings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SentimentData.decode = function decode(reader, length) { + Settings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.SentimentData(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Settings(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.magnitude = reader.float(); + message.name = reader.string(); break; } case 2: { - message.score = reader.float(); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.languageCode = reader.string(); + break; + } + case 5: { + message.conversationTtl = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 6: { + if (message.pubsubNotificationSettings === $util.emptyObject) + message.pubsubNotificationSettings = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.pubsubNotificationSettings[key] = value; + break; + } + case 7: { + message.analysisConfig = $root.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.decode(reader, reader.uint32()); + break; + } + case 10: { + message.redactionConfig = $root.google.cloud.contactcenterinsights.v1.RedactionConfig.decode(reader, reader.uint32()); + break; + } + case 11: { + message.speechConfig = $root.google.cloud.contactcenterinsights.v1.SpeechConfig.decode(reader, reader.uint32()); break; } default: @@ -30375,348 +51739,494 @@ }; /** - * Decodes a SentimentData message from the specified reader or buffer, length delimited. + * Decodes a Settings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.SentimentData + * @memberof google.cloud.contactcenterinsights.v1.Settings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.SentimentData} SentimentData + * @returns {google.cloud.contactcenterinsights.v1.Settings} Settings * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SentimentData.decodeDelimited = function decodeDelimited(reader) { + Settings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SentimentData message. + * Verifies a Settings message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.SentimentData + * @memberof google.cloud.contactcenterinsights.v1.Settings * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SentimentData.verify = function verify(message) { + Settings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.magnitude != null && message.hasOwnProperty("magnitude")) - if (typeof message.magnitude !== "number") - return "magnitude: number expected"; - if (message.score != null && message.hasOwnProperty("score")) - if (typeof message.score !== "number") - return "score: number expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: 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.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.conversationTtl != null && message.hasOwnProperty("conversationTtl")) { + var error = $root.google.protobuf.Duration.verify(message.conversationTtl); + if (error) + return "conversationTtl." + error; + } + if (message.pubsubNotificationSettings != null && message.hasOwnProperty("pubsubNotificationSettings")) { + if (!$util.isObject(message.pubsubNotificationSettings)) + return "pubsubNotificationSettings: object expected"; + var key = Object.keys(message.pubsubNotificationSettings); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.pubsubNotificationSettings[key[i]])) + return "pubsubNotificationSettings: string{k:string} expected"; + } + if (message.analysisConfig != null && message.hasOwnProperty("analysisConfig")) { + var error = $root.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.verify(message.analysisConfig); + if (error) + return "analysisConfig." + error; + } + if (message.redactionConfig != null && message.hasOwnProperty("redactionConfig")) { + var error = $root.google.cloud.contactcenterinsights.v1.RedactionConfig.verify(message.redactionConfig); + if (error) + return "redactionConfig." + error; + } + if (message.speechConfig != null && message.hasOwnProperty("speechConfig")) { + var error = $root.google.cloud.contactcenterinsights.v1.SpeechConfig.verify(message.speechConfig); + if (error) + return "speechConfig." + error; + } return null; }; /** - * Creates a SentimentData message from a plain object. Also converts values to their respective internal types. + * Creates a Settings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.SentimentData + * @memberof google.cloud.contactcenterinsights.v1.Settings * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.SentimentData} SentimentData + * @returns {google.cloud.contactcenterinsights.v1.Settings} Settings */ - SentimentData.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.SentimentData) + Settings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.Settings) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.SentimentData(); - if (object.magnitude != null) - message.magnitude = Number(object.magnitude); - if (object.score != null) - message.score = Number(object.score); + var message = new $root.google.cloud.contactcenterinsights.v1.Settings(); + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Settings.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Settings.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.conversationTtl != null) { + if (typeof object.conversationTtl !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Settings.conversationTtl: object expected"); + message.conversationTtl = $root.google.protobuf.Duration.fromObject(object.conversationTtl); + } + if (object.pubsubNotificationSettings) { + if (typeof object.pubsubNotificationSettings !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Settings.pubsubNotificationSettings: object expected"); + message.pubsubNotificationSettings = {}; + for (var keys = Object.keys(object.pubsubNotificationSettings), i = 0; i < keys.length; ++i) + message.pubsubNotificationSettings[keys[i]] = String(object.pubsubNotificationSettings[keys[i]]); + } + if (object.analysisConfig != null) { + if (typeof object.analysisConfig !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Settings.analysisConfig: object expected"); + message.analysisConfig = $root.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.fromObject(object.analysisConfig); + } + if (object.redactionConfig != null) { + if (typeof object.redactionConfig !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Settings.redactionConfig: object expected"); + message.redactionConfig = $root.google.cloud.contactcenterinsights.v1.RedactionConfig.fromObject(object.redactionConfig); + } + if (object.speechConfig != null) { + if (typeof object.speechConfig !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Settings.speechConfig: object expected"); + message.speechConfig = $root.google.cloud.contactcenterinsights.v1.SpeechConfig.fromObject(object.speechConfig); + } return message; }; /** - * Creates a plain object from a SentimentData message. Also converts values to other types if specified. + * Creates a plain object from a Settings message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.SentimentData + * @memberof google.cloud.contactcenterinsights.v1.Settings * @static - * @param {google.cloud.contactcenterinsights.v1.SentimentData} message SentimentData + * @param {google.cloud.contactcenterinsights.v1.Settings} message Settings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SentimentData.toObject = function toObject(message, options) { + Settings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.pubsubNotificationSettings = {}; if (options.defaults) { - object.magnitude = 0; - object.score = 0; + object.name = ""; + object.createTime = null; + object.updateTime = null; + object.languageCode = ""; + object.conversationTtl = null; + object.analysisConfig = null; + object.redactionConfig = null; + object.speechConfig = null; } - if (message.magnitude != null && message.hasOwnProperty("magnitude")) - object.magnitude = options.json && !isFinite(message.magnitude) ? String(message.magnitude) : message.magnitude; - if (message.score != null && message.hasOwnProperty("score")) - object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.conversationTtl != null && message.hasOwnProperty("conversationTtl")) + object.conversationTtl = $root.google.protobuf.Duration.toObject(message.conversationTtl, options); + var keys2; + if (message.pubsubNotificationSettings && (keys2 = Object.keys(message.pubsubNotificationSettings)).length) { + object.pubsubNotificationSettings = {}; + for (var j = 0; j < keys2.length; ++j) + object.pubsubNotificationSettings[keys2[j]] = message.pubsubNotificationSettings[keys2[j]]; + } + if (message.analysisConfig != null && message.hasOwnProperty("analysisConfig")) + object.analysisConfig = $root.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.toObject(message.analysisConfig, options); + if (message.redactionConfig != null && message.hasOwnProperty("redactionConfig")) + object.redactionConfig = $root.google.cloud.contactcenterinsights.v1.RedactionConfig.toObject(message.redactionConfig, options); + if (message.speechConfig != null && message.hasOwnProperty("speechConfig")) + object.speechConfig = $root.google.cloud.contactcenterinsights.v1.SpeechConfig.toObject(message.speechConfig, options); return object; }; /** - * Converts this SentimentData to JSON. + * Converts this Settings to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.SentimentData + * @memberof google.cloud.contactcenterinsights.v1.Settings * @instance * @returns {Object.} JSON object */ - SentimentData.prototype.toJSON = function toJSON() { + Settings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SentimentData + * Gets the default type url for Settings * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.SentimentData + * @memberof google.cloud.contactcenterinsights.v1.Settings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SentimentData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Settings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.SentimentData"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Settings"; }; - return SentimentData; - })(); + Settings.AnalysisConfig = (function() { - v1.IssueMatchData = (function() { + /** + * Properties of an AnalysisConfig. + * @memberof google.cloud.contactcenterinsights.v1.Settings + * @interface IAnalysisConfig + * @property {number|null} [runtimeIntegrationAnalysisPercentage] AnalysisConfig runtimeIntegrationAnalysisPercentage + * @property {number|null} [uploadConversationAnalysisPercentage] AnalysisConfig uploadConversationAnalysisPercentage + * @property {google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null} [annotatorSelector] AnalysisConfig annotatorSelector + */ - /** - * Properties of an IssueMatchData. - * @memberof google.cloud.contactcenterinsights.v1 - * @interface IIssueMatchData - * @property {google.cloud.contactcenterinsights.v1.IIssueAssignment|null} [issueAssignment] IssueMatchData issueAssignment - */ + /** + * Constructs a new AnalysisConfig. + * @memberof google.cloud.contactcenterinsights.v1.Settings + * @classdesc Represents an AnalysisConfig. + * @implements IAnalysisConfig + * @constructor + * @param {google.cloud.contactcenterinsights.v1.Settings.IAnalysisConfig=} [properties] Properties to set + */ + function AnalysisConfig(properties) { + if (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 IssueMatchData. - * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents an IssueMatchData. - * @implements IIssueMatchData - * @constructor - * @param {google.cloud.contactcenterinsights.v1.IIssueMatchData=} [properties] Properties to set - */ - function IssueMatchData(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * AnalysisConfig runtimeIntegrationAnalysisPercentage. + * @member {number} runtimeIntegrationAnalysisPercentage + * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig + * @instance + */ + AnalysisConfig.prototype.runtimeIntegrationAnalysisPercentage = 0; - /** - * IssueMatchData issueAssignment. - * @member {google.cloud.contactcenterinsights.v1.IIssueAssignment|null|undefined} issueAssignment - * @memberof google.cloud.contactcenterinsights.v1.IssueMatchData - * @instance - */ - IssueMatchData.prototype.issueAssignment = null; + /** + * AnalysisConfig uploadConversationAnalysisPercentage. + * @member {number} uploadConversationAnalysisPercentage + * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig + * @instance + */ + AnalysisConfig.prototype.uploadConversationAnalysisPercentage = 0; - /** - * Creates a new IssueMatchData instance using the specified properties. - * @function create - * @memberof google.cloud.contactcenterinsights.v1.IssueMatchData - * @static - * @param {google.cloud.contactcenterinsights.v1.IIssueMatchData=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.IssueMatchData} IssueMatchData instance - */ - IssueMatchData.create = function create(properties) { - return new IssueMatchData(properties); - }; + /** + * AnalysisConfig annotatorSelector. + * @member {google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null|undefined} annotatorSelector + * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig + * @instance + */ + AnalysisConfig.prototype.annotatorSelector = null; - /** - * Encodes the specified IssueMatchData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueMatchData.verify|verify} messages. - * @function encode - * @memberof google.cloud.contactcenterinsights.v1.IssueMatchData - * @static - * @param {google.cloud.contactcenterinsights.v1.IIssueMatchData} message IssueMatchData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IssueMatchData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.issueAssignment != null && Object.hasOwnProperty.call(message, "issueAssignment")) - $root.google.cloud.contactcenterinsights.v1.IssueAssignment.encode(message.issueAssignment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * Creates a new AnalysisConfig instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.Settings.IAnalysisConfig=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig} AnalysisConfig instance + */ + AnalysisConfig.create = function create(properties) { + return new AnalysisConfig(properties); + }; - /** - * Encodes the specified IssueMatchData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueMatchData.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.IssueMatchData - * @static - * @param {google.cloud.contactcenterinsights.v1.IIssueMatchData} message IssueMatchData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IssueMatchData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified AnalysisConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.Settings.IAnalysisConfig} message AnalysisConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalysisConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.runtimeIntegrationAnalysisPercentage != null && Object.hasOwnProperty.call(message, "runtimeIntegrationAnalysisPercentage")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.runtimeIntegrationAnalysisPercentage); + if (message.annotatorSelector != null && Object.hasOwnProperty.call(message, "annotatorSelector")) + $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.encode(message.annotatorSelector, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.uploadConversationAnalysisPercentage != null && Object.hasOwnProperty.call(message, "uploadConversationAnalysisPercentage")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.uploadConversationAnalysisPercentage); + return writer; + }; - /** - * Decodes an IssueMatchData message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.contactcenterinsights.v1.IssueMatchData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.IssueMatchData} IssueMatchData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IssueMatchData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.IssueMatchData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.issueAssignment = $root.google.cloud.contactcenterinsights.v1.IssueAssignment.decode(reader, reader.uint32()); + /** + * Encodes the specified AnalysisConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.Settings.IAnalysisConfig} message AnalysisConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalysisConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnalysisConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig} AnalysisConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalysisConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.runtimeIntegrationAnalysisPercentage = reader.double(); + break; + } + case 6: { + message.uploadConversationAnalysisPercentage = reader.double(); + break; + } + case 5: { + message.annotatorSelector = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes an IssueMatchData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.IssueMatchData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.IssueMatchData} IssueMatchData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IssueMatchData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an AnalysisConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig} AnalysisConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalysisConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an IssueMatchData message. - * @function verify - * @memberof google.cloud.contactcenterinsights.v1.IssueMatchData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IssueMatchData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.issueAssignment != null && message.hasOwnProperty("issueAssignment")) { - var error = $root.google.cloud.contactcenterinsights.v1.IssueAssignment.verify(message.issueAssignment); - if (error) - return "issueAssignment." + error; - } - return null; - }; + /** + * Verifies an AnalysisConfig message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnalysisConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.runtimeIntegrationAnalysisPercentage != null && message.hasOwnProperty("runtimeIntegrationAnalysisPercentage")) + if (typeof message.runtimeIntegrationAnalysisPercentage !== "number") + return "runtimeIntegrationAnalysisPercentage: number expected"; + if (message.uploadConversationAnalysisPercentage != null && message.hasOwnProperty("uploadConversationAnalysisPercentage")) + if (typeof message.uploadConversationAnalysisPercentage !== "number") + return "uploadConversationAnalysisPercentage: number expected"; + if (message.annotatorSelector != null && message.hasOwnProperty("annotatorSelector")) { + var error = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.verify(message.annotatorSelector); + if (error) + return "annotatorSelector." + error; + } + return null; + }; - /** - * Creates an IssueMatchData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.IssueMatchData - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.IssueMatchData} IssueMatchData - */ - IssueMatchData.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.IssueMatchData) + /** + * Creates an AnalysisConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig} AnalysisConfig + */ + AnalysisConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig(); + if (object.runtimeIntegrationAnalysisPercentage != null) + message.runtimeIntegrationAnalysisPercentage = Number(object.runtimeIntegrationAnalysisPercentage); + if (object.uploadConversationAnalysisPercentage != null) + message.uploadConversationAnalysisPercentage = Number(object.uploadConversationAnalysisPercentage); + if (object.annotatorSelector != null) { + if (typeof object.annotatorSelector !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.annotatorSelector: object expected"); + message.annotatorSelector = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.fromObject(object.annotatorSelector); + } + return message; + }; + + /** + * Creates a plain object from an AnalysisConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig} message AnalysisConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnalysisConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.runtimeIntegrationAnalysisPercentage = 0; + object.annotatorSelector = null; + object.uploadConversationAnalysisPercentage = 0; + } + if (message.runtimeIntegrationAnalysisPercentage != null && message.hasOwnProperty("runtimeIntegrationAnalysisPercentage")) + object.runtimeIntegrationAnalysisPercentage = options.json && !isFinite(message.runtimeIntegrationAnalysisPercentage) ? String(message.runtimeIntegrationAnalysisPercentage) : message.runtimeIntegrationAnalysisPercentage; + if (message.annotatorSelector != null && message.hasOwnProperty("annotatorSelector")) + object.annotatorSelector = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.toObject(message.annotatorSelector, options); + if (message.uploadConversationAnalysisPercentage != null && message.hasOwnProperty("uploadConversationAnalysisPercentage")) + object.uploadConversationAnalysisPercentage = options.json && !isFinite(message.uploadConversationAnalysisPercentage) ? String(message.uploadConversationAnalysisPercentage) : message.uploadConversationAnalysisPercentage; return object; - var message = new $root.google.cloud.contactcenterinsights.v1.IssueMatchData(); - if (object.issueAssignment != null) { - if (typeof object.issueAssignment !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.IssueMatchData.issueAssignment: object expected"); - message.issueAssignment = $root.google.cloud.contactcenterinsights.v1.IssueAssignment.fromObject(object.issueAssignment); - } - return message; - }; + }; - /** - * Creates a plain object from an IssueMatchData message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.IssueMatchData - * @static - * @param {google.cloud.contactcenterinsights.v1.IssueMatchData} message IssueMatchData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IssueMatchData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.issueAssignment = null; - if (message.issueAssignment != null && message.hasOwnProperty("issueAssignment")) - object.issueAssignment = $root.google.cloud.contactcenterinsights.v1.IssueAssignment.toObject(message.issueAssignment, options); - return object; - }; + /** + * Converts this AnalysisConfig to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig + * @instance + * @returns {Object.} JSON object + */ + AnalysisConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this IssueMatchData to JSON. - * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.IssueMatchData - * @instance - * @returns {Object.} JSON object - */ - IssueMatchData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for AnalysisConfig + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnalysisConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig"; + }; - /** - * Gets the default type url for IssueMatchData - * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.IssueMatchData - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - IssueMatchData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.IssueMatchData"; - }; + return AnalysisConfig; + })(); - return IssueMatchData; + return Settings; })(); - v1.IssueModel = (function() { + v1.AnalysisRule = (function() { /** - * Properties of an IssueModel. + * Properties of an AnalysisRule. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IIssueModel - * @property {string|null} [name] IssueModel name - * @property {string|null} [displayName] IssueModel displayName - * @property {google.protobuf.ITimestamp|null} [createTime] IssueModel createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] IssueModel updateTime - * @property {number|Long|null} [issueCount] IssueModel issueCount - * @property {google.cloud.contactcenterinsights.v1.IssueModel.State|null} [state] IssueModel state - * @property {google.cloud.contactcenterinsights.v1.IssueModel.IInputDataConfig|null} [inputDataConfig] IssueModel inputDataConfig - * @property {google.cloud.contactcenterinsights.v1.IIssueModelLabelStats|null} [trainingStats] IssueModel trainingStats - * @property {google.cloud.contactcenterinsights.v1.IssueModel.ModelType|null} [modelType] IssueModel modelType - * @property {string|null} [languageCode] IssueModel languageCode + * @interface IAnalysisRule + * @property {string|null} [name] AnalysisRule name + * @property {google.protobuf.ITimestamp|null} [createTime] AnalysisRule createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] AnalysisRule updateTime + * @property {string|null} [displayName] AnalysisRule displayName + * @property {string|null} [conversationFilter] AnalysisRule conversationFilter + * @property {google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null} [annotatorSelector] AnalysisRule annotatorSelector + * @property {number|null} [analysisPercentage] AnalysisRule analysisPercentage + * @property {boolean|null} [active] AnalysisRule active */ /** - * Constructs a new IssueModel. + * Constructs a new AnalysisRule. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents an IssueModel. - * @implements IIssueModel + * @classdesc Represents an AnalysisRule. + * @implements IAnalysisRule * @constructor - * @param {google.cloud.contactcenterinsights.v1.IIssueModel=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IAnalysisRule=} [properties] Properties to set */ - function IssueModel(properties) { + function AnalysisRule(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -30724,160 +52234,154 @@ } /** - * IssueModel name. + * AnalysisRule name. * @member {string} name - * @memberof google.cloud.contactcenterinsights.v1.IssueModel - * @instance - */ - IssueModel.prototype.name = ""; - - /** - * IssueModel displayName. - * @member {string} displayName - * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @memberof google.cloud.contactcenterinsights.v1.AnalysisRule * @instance */ - IssueModel.prototype.displayName = ""; + AnalysisRule.prototype.name = ""; /** - * IssueModel createTime. + * AnalysisRule createTime. * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @memberof google.cloud.contactcenterinsights.v1.AnalysisRule * @instance */ - IssueModel.prototype.createTime = null; + AnalysisRule.prototype.createTime = null; /** - * IssueModel updateTime. + * AnalysisRule updateTime. * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @memberof google.cloud.contactcenterinsights.v1.AnalysisRule * @instance */ - IssueModel.prototype.updateTime = null; + AnalysisRule.prototype.updateTime = null; /** - * IssueModel issueCount. - * @member {number|Long} issueCount - * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * AnalysisRule displayName. + * @member {string|null|undefined} displayName + * @memberof google.cloud.contactcenterinsights.v1.AnalysisRule * @instance */ - IssueModel.prototype.issueCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + AnalysisRule.prototype.displayName = null; /** - * IssueModel state. - * @member {google.cloud.contactcenterinsights.v1.IssueModel.State} state - * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * AnalysisRule conversationFilter. + * @member {string} conversationFilter + * @memberof google.cloud.contactcenterinsights.v1.AnalysisRule * @instance */ - IssueModel.prototype.state = 0; + AnalysisRule.prototype.conversationFilter = ""; /** - * IssueModel inputDataConfig. - * @member {google.cloud.contactcenterinsights.v1.IssueModel.IInputDataConfig|null|undefined} inputDataConfig - * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * AnalysisRule annotatorSelector. + * @member {google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null|undefined} annotatorSelector + * @memberof google.cloud.contactcenterinsights.v1.AnalysisRule * @instance */ - IssueModel.prototype.inputDataConfig = null; + AnalysisRule.prototype.annotatorSelector = null; /** - * IssueModel trainingStats. - * @member {google.cloud.contactcenterinsights.v1.IIssueModelLabelStats|null|undefined} trainingStats - * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * AnalysisRule analysisPercentage. + * @member {number} analysisPercentage + * @memberof google.cloud.contactcenterinsights.v1.AnalysisRule * @instance */ - IssueModel.prototype.trainingStats = null; + AnalysisRule.prototype.analysisPercentage = 0; /** - * IssueModel modelType. - * @member {google.cloud.contactcenterinsights.v1.IssueModel.ModelType} modelType - * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * AnalysisRule active. + * @member {boolean} active + * @memberof google.cloud.contactcenterinsights.v1.AnalysisRule * @instance */ - IssueModel.prototype.modelType = 0; + AnalysisRule.prototype.active = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * IssueModel languageCode. - * @member {string} languageCode - * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * AnalysisRule _displayName. + * @member {"displayName"|undefined} _displayName + * @memberof google.cloud.contactcenterinsights.v1.AnalysisRule * @instance */ - IssueModel.prototype.languageCode = ""; + Object.defineProperty(AnalysisRule.prototype, "_displayName", { + get: $util.oneOfGetter($oneOfFields = ["displayName"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new IssueModel instance using the specified properties. + * Creates a new AnalysisRule instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @memberof google.cloud.contactcenterinsights.v1.AnalysisRule * @static - * @param {google.cloud.contactcenterinsights.v1.IIssueModel=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.IssueModel} IssueModel instance + * @param {google.cloud.contactcenterinsights.v1.IAnalysisRule=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.AnalysisRule} AnalysisRule instance */ - IssueModel.create = function create(properties) { - return new IssueModel(properties); + AnalysisRule.create = function create(properties) { + return new AnalysisRule(properties); }; /** - * Encodes the specified IssueModel message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModel.verify|verify} messages. + * Encodes the specified AnalysisRule message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnalysisRule.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @memberof google.cloud.contactcenterinsights.v1.AnalysisRule * @static - * @param {google.cloud.contactcenterinsights.v1.IIssueModel} message IssueModel message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IAnalysisRule} message AnalysisRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - IssueModel.encode = function encode(message, writer) { + AnalysisRule.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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.createTime, 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 4, wireType 2 =*/34).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); - if (message.inputDataConfig != null && Object.hasOwnProperty.call(message, "inputDataConfig")) - $root.google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig.encode(message.inputDataConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.trainingStats != null && Object.hasOwnProperty.call(message, "trainingStats")) - $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.encode(message.trainingStats, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.issueCount != null && Object.hasOwnProperty.call(message, "issueCount")) - writer.uint32(/* id 8, wireType 0 =*/64).int64(message.issueCount); - if (message.modelType != null && Object.hasOwnProperty.call(message, "modelType")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.modelType); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.languageCode); + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.displayName); + if (message.conversationFilter != null && Object.hasOwnProperty.call(message, "conversationFilter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.conversationFilter); + if (message.annotatorSelector != null && Object.hasOwnProperty.call(message, "annotatorSelector")) + $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.encode(message.annotatorSelector, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.analysisPercentage != null && Object.hasOwnProperty.call(message, "analysisPercentage")) + writer.uint32(/* id 7, wireType 1 =*/57).double(message.analysisPercentage); + if (message.active != null && Object.hasOwnProperty.call(message, "active")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.active); return writer; }; /** - * Encodes the specified IssueModel message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModel.verify|verify} messages. + * Encodes the specified AnalysisRule message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnalysisRule.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @memberof google.cloud.contactcenterinsights.v1.AnalysisRule * @static - * @param {google.cloud.contactcenterinsights.v1.IIssueModel} message IssueModel message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IAnalysisRule} message AnalysisRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - IssueModel.encodeDelimited = function encodeDelimited(message, writer) { + AnalysisRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an IssueModel message from the specified reader or buffer. + * Decodes an AnalysisRule message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @memberof google.cloud.contactcenterinsights.v1.AnalysisRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.IssueModel} IssueModel + * @returns {google.cloud.contactcenterinsights.v1.AnalysisRule} AnalysisRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - IssueModel.decode = function decode(reader, length) { + AnalysisRule.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.IssueModel(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.AnalysisRule(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -30886,39 +52390,31 @@ break; } case 2: { - message.displayName = reader.string(); - break; - } - case 3: { message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } - case 4: { + case 3: { message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } - case 8: { - message.issueCount = reader.int64(); + case 4: { + message.displayName = reader.string(); break; } case 5: { - message.state = reader.int32(); + message.conversationFilter = reader.string(); break; } case 6: { - message.inputDataConfig = $root.google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig.decode(reader, reader.uint32()); + message.annotatorSelector = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.decode(reader, reader.uint32()); break; } case 7: { - message.trainingStats = $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.decode(reader, reader.uint32()); - break; - } - case 9: { - message.modelType = reader.int32(); + message.analysisPercentage = reader.double(); break; } - case 10: { - message.languageCode = reader.string(); + case 8: { + message.active = reader.bool(); break; } default: @@ -30930,38 +52426,36 @@ }; /** - * Decodes an IssueModel message from the specified reader or buffer, length delimited. + * Decodes an AnalysisRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @memberof google.cloud.contactcenterinsights.v1.AnalysisRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.IssueModel} IssueModel + * @returns {google.cloud.contactcenterinsights.v1.AnalysisRule} AnalysisRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - IssueModel.decodeDelimited = function decodeDelimited(reader) { + AnalysisRule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an IssueModel message. + * Verifies an AnalysisRule message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @memberof google.cloud.contactcenterinsights.v1.AnalysisRule * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - IssueModel.verify = function verify(message) { + AnalysisRule.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.createTime != null && message.hasOwnProperty("createTime")) { var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) @@ -30972,582 +52466,387 @@ if (error) return "updateTime." + error; } - if (message.issueCount != null && message.hasOwnProperty("issueCount")) - if (!$util.isInteger(message.issueCount) && !(message.issueCount && $util.isInteger(message.issueCount.low) && $util.isInteger(message.issueCount.high))) - return "issueCount: integer|Long expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.inputDataConfig != null && message.hasOwnProperty("inputDataConfig")) { - var error = $root.google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig.verify(message.inputDataConfig); - if (error) - return "inputDataConfig." + error; + if (message.displayName != null && message.hasOwnProperty("displayName")) { + properties._displayName = 1; + if (!$util.isString(message.displayName)) + return "displayName: string expected"; } - if (message.trainingStats != null && message.hasOwnProperty("trainingStats")) { - var error = $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.verify(message.trainingStats); + if (message.conversationFilter != null && message.hasOwnProperty("conversationFilter")) + if (!$util.isString(message.conversationFilter)) + return "conversationFilter: string expected"; + if (message.annotatorSelector != null && message.hasOwnProperty("annotatorSelector")) { + var error = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.verify(message.annotatorSelector); if (error) - return "trainingStats." + error; + return "annotatorSelector." + error; } - if (message.modelType != null && message.hasOwnProperty("modelType")) - switch (message.modelType) { - default: - return "modelType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; + if (message.analysisPercentage != null && message.hasOwnProperty("analysisPercentage")) + if (typeof message.analysisPercentage !== "number") + return "analysisPercentage: number expected"; + if (message.active != null && message.hasOwnProperty("active")) + if (typeof message.active !== "boolean") + return "active: boolean expected"; return null; }; /** - * Creates an IssueModel message from a plain object. Also converts values to their respective internal types. + * Creates an AnalysisRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @memberof google.cloud.contactcenterinsights.v1.AnalysisRule * @static - * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.IssueModel} IssueModel - */ - IssueModel.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.IssueModel) - return object; - var message = new $root.google.cloud.contactcenterinsights.v1.IssueModel(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.IssueModel.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.IssueModel.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.issueCount != null) - if ($util.Long) - (message.issueCount = $util.Long.fromValue(object.issueCount)).unsigned = false; - else if (typeof object.issueCount === "string") - message.issueCount = parseInt(object.issueCount, 10); - else if (typeof object.issueCount === "number") - message.issueCount = object.issueCount; - else if (typeof object.issueCount === "object") - message.issueCount = new $util.LongBits(object.issueCount.low >>> 0, object.issueCount.high >>> 0).toNumber(); - 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 "UNDEPLOYED": - case 1: - message.state = 1; - break; - case "DEPLOYING": - case 2: - message.state = 2; - break; - case "DEPLOYED": - case 3: - message.state = 3; - break; - case "UNDEPLOYING": - case 4: - message.state = 4; - break; - case "DELETING": - case 5: - message.state = 5; - break; - } - if (object.inputDataConfig != null) { - if (typeof object.inputDataConfig !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.IssueModel.inputDataConfig: object expected"); - message.inputDataConfig = $root.google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig.fromObject(object.inputDataConfig); - } - if (object.trainingStats != null) { - if (typeof object.trainingStats !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.IssueModel.trainingStats: object expected"); - message.trainingStats = $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.fromObject(object.trainingStats); - } - 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 "TYPE_V1": - case 1: - message.modelType = 1; - break; - case "TYPE_V2": - case 2: - message.modelType = 2; - break; + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.AnalysisRule} AnalysisRule + */ + AnalysisRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.AnalysisRule) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.AnalysisRule(); + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisRule.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisRule.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.conversationFilter != null) + message.conversationFilter = String(object.conversationFilter); + if (object.annotatorSelector != null) { + if (typeof object.annotatorSelector !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisRule.annotatorSelector: object expected"); + message.annotatorSelector = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.fromObject(object.annotatorSelector); + } + if (object.analysisPercentage != null) + message.analysisPercentage = Number(object.analysisPercentage); + if (object.active != null) + message.active = Boolean(object.active); return message; }; /** - * Creates a plain object from an IssueModel message. Also converts values to other types if specified. + * Creates a plain object from an AnalysisRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @memberof google.cloud.contactcenterinsights.v1.AnalysisRule * @static - * @param {google.cloud.contactcenterinsights.v1.IssueModel} message IssueModel + * @param {google.cloud.contactcenterinsights.v1.AnalysisRule} message AnalysisRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - IssueModel.toObject = function toObject(message, options) { + AnalysisRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.name = ""; - object.displayName = ""; object.createTime = null; object.updateTime = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.inputDataConfig = null; - object.trainingStats = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.issueCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.issueCount = options.longs === String ? "0" : 0; - object.modelType = options.enums === String ? "MODEL_TYPE_UNSPECIFIED" : 0; - object.languageCode = ""; + object.conversationFilter = ""; + object.annotatorSelector = null; + object.analysisPercentage = 0; + object.active = 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.createTime != null && message.hasOwnProperty("createTime")) object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); if (message.updateTime != null && message.hasOwnProperty("updateTime")) object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.IssueModel.State[message.state] === undefined ? message.state : $root.google.cloud.contactcenterinsights.v1.IssueModel.State[message.state] : message.state; - if (message.inputDataConfig != null && message.hasOwnProperty("inputDataConfig")) - object.inputDataConfig = $root.google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig.toObject(message.inputDataConfig, options); - if (message.trainingStats != null && message.hasOwnProperty("trainingStats")) - object.trainingStats = $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.toObject(message.trainingStats, options); - if (message.issueCount != null && message.hasOwnProperty("issueCount")) - if (typeof message.issueCount === "number") - object.issueCount = options.longs === String ? String(message.issueCount) : message.issueCount; - else - object.issueCount = options.longs === String ? $util.Long.prototype.toString.call(message.issueCount) : options.longs === Number ? new $util.LongBits(message.issueCount.low >>> 0, message.issueCount.high >>> 0).toNumber() : message.issueCount; - if (message.modelType != null && message.hasOwnProperty("modelType")) - object.modelType = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.IssueModel.ModelType[message.modelType] === undefined ? message.modelType : $root.google.cloud.contactcenterinsights.v1.IssueModel.ModelType[message.modelType] : message.modelType; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; + if (message.displayName != null && message.hasOwnProperty("displayName")) { + object.displayName = message.displayName; + if (options.oneofs) + object._displayName = "displayName"; + } + if (message.conversationFilter != null && message.hasOwnProperty("conversationFilter")) + object.conversationFilter = message.conversationFilter; + if (message.annotatorSelector != null && message.hasOwnProperty("annotatorSelector")) + object.annotatorSelector = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.toObject(message.annotatorSelector, options); + if (message.analysisPercentage != null && message.hasOwnProperty("analysisPercentage")) + object.analysisPercentage = options.json && !isFinite(message.analysisPercentage) ? String(message.analysisPercentage) : message.analysisPercentage; + if (message.active != null && message.hasOwnProperty("active")) + object.active = message.active; return object; }; /** - * Converts this IssueModel to JSON. + * Converts this AnalysisRule to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @memberof google.cloud.contactcenterinsights.v1.AnalysisRule * @instance * @returns {Object.} JSON object */ - IssueModel.prototype.toJSON = function toJSON() { + AnalysisRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for IssueModel + * Gets the default type url for AnalysisRule * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.IssueModel + * @memberof google.cloud.contactcenterinsights.v1.AnalysisRule * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - IssueModel.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AnalysisRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.IssueModel"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.AnalysisRule"; }; - IssueModel.InputDataConfig = (function() { + return AnalysisRule; + })(); - /** - * Properties of an InputDataConfig. - * @memberof google.cloud.contactcenterinsights.v1.IssueModel - * @interface IInputDataConfig - * @property {google.cloud.contactcenterinsights.v1.Conversation.Medium|null} [medium] InputDataConfig medium - * @property {number|Long|null} [trainingConversationsCount] InputDataConfig trainingConversationsCount - * @property {string|null} [filter] InputDataConfig filter - */ + v1.EncryptionSpec = (function() { - /** - * Constructs a new InputDataConfig. - * @memberof google.cloud.contactcenterinsights.v1.IssueModel - * @classdesc Represents an InputDataConfig. - * @implements IInputDataConfig - * @constructor - * @param {google.cloud.contactcenterinsights.v1.IssueModel.IInputDataConfig=} [properties] Properties to set - */ - function InputDataConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of an EncryptionSpec. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IEncryptionSpec + * @property {string|null} [name] EncryptionSpec name + * @property {string|null} [kmsKey] EncryptionSpec kmsKey + */ - /** - * InputDataConfig medium. - * @member {google.cloud.contactcenterinsights.v1.Conversation.Medium} medium - * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig - * @instance - */ - InputDataConfig.prototype.medium = 0; + /** + * Constructs a new EncryptionSpec. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an EncryptionSpec. + * @implements IEncryptionSpec + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IEncryptionSpec=} [properties] Properties to set + */ + function EncryptionSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * InputDataConfig trainingConversationsCount. - * @member {number|Long} trainingConversationsCount - * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig - * @instance - */ - InputDataConfig.prototype.trainingConversationsCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * EncryptionSpec name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.EncryptionSpec + * @instance + */ + EncryptionSpec.prototype.name = ""; - /** - * InputDataConfig filter. - * @member {string} filter - * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig - * @instance - */ - InputDataConfig.prototype.filter = ""; + /** + * EncryptionSpec kmsKey. + * @member {string} kmsKey + * @memberof google.cloud.contactcenterinsights.v1.EncryptionSpec + * @instance + */ + EncryptionSpec.prototype.kmsKey = ""; - /** - * Creates a new InputDataConfig instance using the specified properties. - * @function create - * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig - * @static - * @param {google.cloud.contactcenterinsights.v1.IssueModel.IInputDataConfig=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig} InputDataConfig instance - */ - InputDataConfig.create = function create(properties) { - return new InputDataConfig(properties); - }; + /** + * Creates a new EncryptionSpec instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.EncryptionSpec + * @static + * @param {google.cloud.contactcenterinsights.v1.IEncryptionSpec=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.EncryptionSpec} EncryptionSpec instance + */ + EncryptionSpec.create = function create(properties) { + return new EncryptionSpec(properties); + }; - /** - * Encodes the specified InputDataConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig - * @static - * @param {google.cloud.contactcenterinsights.v1.IssueModel.IInputDataConfig} message InputDataConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InputDataConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.medium != null && Object.hasOwnProperty.call(message, "medium")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.medium); - if (message.trainingConversationsCount != null && Object.hasOwnProperty.call(message, "trainingConversationsCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.trainingConversationsCount); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter); - return writer; - }; + /** + * Encodes the specified EncryptionSpec message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.EncryptionSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.EncryptionSpec + * @static + * @param {google.cloud.contactcenterinsights.v1.IEncryptionSpec} message EncryptionSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptionSpec.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.kmsKey != null && Object.hasOwnProperty.call(message, "kmsKey")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.kmsKey); + return writer; + }; - /** - * Encodes the specified InputDataConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig - * @static - * @param {google.cloud.contactcenterinsights.v1.IssueModel.IInputDataConfig} message InputDataConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InputDataConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified EncryptionSpec message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.EncryptionSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.EncryptionSpec + * @static + * @param {google.cloud.contactcenterinsights.v1.IEncryptionSpec} message EncryptionSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptionSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes an InputDataConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig} InputDataConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InputDataConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.medium = reader.int32(); - break; - } - case 2: { - message.trainingConversationsCount = reader.int64(); - break; - } - case 3: { - message.filter = reader.string(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Decodes an EncryptionSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.EncryptionSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.EncryptionSpec} EncryptionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptionSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.EncryptionSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); break; } - } - return message; - }; - - /** - * Decodes an InputDataConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig} InputDataConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InputDataConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InputDataConfig message. - * @function verify - * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InputDataConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.medium != null && message.hasOwnProperty("medium")) - switch (message.medium) { - default: - return "medium: enum value expected"; - case 0: - case 1: - case 2: + case 2: { + message.kmsKey = reader.string(); break; } - if (message.trainingConversationsCount != null && message.hasOwnProperty("trainingConversationsCount")) - if (!$util.isInteger(message.trainingConversationsCount) && !(message.trainingConversationsCount && $util.isInteger(message.trainingConversationsCount.low) && $util.isInteger(message.trainingConversationsCount.high))) - return "trainingConversationsCount: integer|Long expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - return null; - }; - - /** - * Creates an InputDataConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig} InputDataConfig - */ - InputDataConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig) - return object; - var message = new $root.google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig(); - switch (object.medium) { default: - if (typeof object.medium === "number") { - message.medium = object.medium; - break; - } - break; - case "MEDIUM_UNSPECIFIED": - case 0: - message.medium = 0; - break; - case "PHONE_CALL": - case 1: - message.medium = 1; - break; - case "CHAT": - case 2: - message.medium = 2; + reader.skipType(tag & 7); break; } - if (object.trainingConversationsCount != null) - if ($util.Long) - (message.trainingConversationsCount = $util.Long.fromValue(object.trainingConversationsCount)).unsigned = false; - else if (typeof object.trainingConversationsCount === "string") - message.trainingConversationsCount = parseInt(object.trainingConversationsCount, 10); - else if (typeof object.trainingConversationsCount === "number") - message.trainingConversationsCount = object.trainingConversationsCount; - else if (typeof object.trainingConversationsCount === "object") - message.trainingConversationsCount = new $util.LongBits(object.trainingConversationsCount.low >>> 0, object.trainingConversationsCount.high >>> 0).toNumber(); - if (object.filter != null) - message.filter = String(object.filter); - return message; - }; + } + return message; + }; - /** - * Creates a plain object from an InputDataConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig - * @static - * @param {google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig} message InputDataConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InputDataConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.medium = options.enums === String ? "MEDIUM_UNSPECIFIED" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.trainingConversationsCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.trainingConversationsCount = options.longs === String ? "0" : 0; - object.filter = ""; - } - if (message.medium != null && message.hasOwnProperty("medium")) - object.medium = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.Conversation.Medium[message.medium] === undefined ? message.medium : $root.google.cloud.contactcenterinsights.v1.Conversation.Medium[message.medium] : message.medium; - if (message.trainingConversationsCount != null && message.hasOwnProperty("trainingConversationsCount")) - if (typeof message.trainingConversationsCount === "number") - object.trainingConversationsCount = options.longs === String ? String(message.trainingConversationsCount) : message.trainingConversationsCount; - else - object.trainingConversationsCount = options.longs === String ? $util.Long.prototype.toString.call(message.trainingConversationsCount) : options.longs === Number ? new $util.LongBits(message.trainingConversationsCount.low >>> 0, message.trainingConversationsCount.high >>> 0).toNumber() : message.trainingConversationsCount; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - return object; - }; + /** + * Decodes an EncryptionSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.EncryptionSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.EncryptionSpec} EncryptionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptionSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this InputDataConfig to JSON. - * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig - * @instance - * @returns {Object.} JSON object - */ - InputDataConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies an EncryptionSpec message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.EncryptionSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EncryptionSpec.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.kmsKey != null && message.hasOwnProperty("kmsKey")) + if (!$util.isString(message.kmsKey)) + return "kmsKey: string expected"; + return null; + }; - /** - * Gets the default type url for InputDataConfig - * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InputDataConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig"; - }; + /** + * Creates an EncryptionSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.EncryptionSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.EncryptionSpec} EncryptionSpec + */ + EncryptionSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.EncryptionSpec) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.EncryptionSpec(); + if (object.name != null) + message.name = String(object.name); + if (object.kmsKey != null) + message.kmsKey = String(object.kmsKey); + return message; + }; - return InputDataConfig; - })(); + /** + * Creates a plain object from an EncryptionSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.EncryptionSpec + * @static + * @param {google.cloud.contactcenterinsights.v1.EncryptionSpec} message EncryptionSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EncryptionSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.kmsKey = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.kmsKey != null && message.hasOwnProperty("kmsKey")) + object.kmsKey = message.kmsKey; + return object; + }; /** - * State enum. - * @name google.cloud.contactcenterinsights.v1.IssueModel.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} UNDEPLOYED=1 UNDEPLOYED value - * @property {number} DEPLOYING=2 DEPLOYING value - * @property {number} DEPLOYED=3 DEPLOYED value - * @property {number} UNDEPLOYING=4 UNDEPLOYING value - * @property {number} DELETING=5 DELETING value + * Converts this EncryptionSpec to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.EncryptionSpec + * @instance + * @returns {Object.} JSON object */ - IssueModel.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "UNDEPLOYED"] = 1; - values[valuesById[2] = "DEPLOYING"] = 2; - values[valuesById[3] = "DEPLOYED"] = 3; - values[valuesById[4] = "UNDEPLOYING"] = 4; - values[valuesById[5] = "DELETING"] = 5; - return values; - })(); + EncryptionSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * ModelType enum. - * @name google.cloud.contactcenterinsights.v1.IssueModel.ModelType - * @enum {number} - * @property {number} MODEL_TYPE_UNSPECIFIED=0 MODEL_TYPE_UNSPECIFIED value - * @property {number} TYPE_V1=1 TYPE_V1 value - * @property {number} TYPE_V2=2 TYPE_V2 value + * Gets the default type url for EncryptionSpec + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.EncryptionSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - IssueModel.ModelType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MODEL_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "TYPE_V1"] = 1; - values[valuesById[2] = "TYPE_V2"] = 2; - return values; - })(); + EncryptionSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.EncryptionSpec"; + }; - return IssueModel; + return EncryptionSpec; })(); - v1.Issue = (function() { + v1.RedactionConfig = (function() { /** - * Properties of an Issue. + * Properties of a RedactionConfig. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IIssue - * @property {string|null} [name] Issue name - * @property {string|null} [displayName] Issue displayName - * @property {google.protobuf.ITimestamp|null} [createTime] Issue createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Issue updateTime - * @property {Array.|null} [sampleUtterances] Issue sampleUtterances - * @property {string|null} [displayDescription] Issue displayDescription + * @interface IRedactionConfig + * @property {string|null} [deidentifyTemplate] RedactionConfig deidentifyTemplate + * @property {string|null} [inspectTemplate] RedactionConfig inspectTemplate */ /** - * Constructs a new Issue. + * Constructs a new RedactionConfig. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents an Issue. - * @implements IIssue + * @classdesc Represents a RedactionConfig. + * @implements IRedactionConfig * @constructor - * @param {google.cloud.contactcenterinsights.v1.IIssue=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IRedactionConfig=} [properties] Properties to set */ - function Issue(properties) { - this.sampleUtterances = []; + function RedactionConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31555,148 +52854,89 @@ } /** - * Issue name. - * @member {string} name - * @memberof google.cloud.contactcenterinsights.v1.Issue - * @instance - */ - Issue.prototype.name = ""; - - /** - * Issue displayName. - * @member {string} displayName - * @memberof google.cloud.contactcenterinsights.v1.Issue - * @instance - */ - Issue.prototype.displayName = ""; - - /** - * Issue createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.contactcenterinsights.v1.Issue - * @instance - */ - Issue.prototype.createTime = null; - - /** - * Issue updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.contactcenterinsights.v1.Issue - * @instance - */ - Issue.prototype.updateTime = null; - - /** - * Issue sampleUtterances. - * @member {Array.} sampleUtterances - * @memberof google.cloud.contactcenterinsights.v1.Issue + * RedactionConfig deidentifyTemplate. + * @member {string} deidentifyTemplate + * @memberof google.cloud.contactcenterinsights.v1.RedactionConfig * @instance */ - Issue.prototype.sampleUtterances = $util.emptyArray; + RedactionConfig.prototype.deidentifyTemplate = ""; /** - * Issue displayDescription. - * @member {string} displayDescription - * @memberof google.cloud.contactcenterinsights.v1.Issue + * RedactionConfig inspectTemplate. + * @member {string} inspectTemplate + * @memberof google.cloud.contactcenterinsights.v1.RedactionConfig * @instance */ - Issue.prototype.displayDescription = ""; + RedactionConfig.prototype.inspectTemplate = ""; /** - * Creates a new Issue instance using the specified properties. + * Creates a new RedactionConfig instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.Issue + * @memberof google.cloud.contactcenterinsights.v1.RedactionConfig * @static - * @param {google.cloud.contactcenterinsights.v1.IIssue=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.Issue} Issue instance + * @param {google.cloud.contactcenterinsights.v1.IRedactionConfig=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.RedactionConfig} RedactionConfig instance */ - Issue.create = function create(properties) { - return new Issue(properties); + RedactionConfig.create = function create(properties) { + return new RedactionConfig(properties); }; /** - * Encodes the specified Issue message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Issue.verify|verify} messages. + * Encodes the specified RedactionConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.RedactionConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.Issue + * @memberof google.cloud.contactcenterinsights.v1.RedactionConfig * @static - * @param {google.cloud.contactcenterinsights.v1.IIssue} message Issue message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IRedactionConfig} message RedactionConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Issue.encode = function encode(message, writer) { + RedactionConfig.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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.sampleUtterances != null && message.sampleUtterances.length) - for (var i = 0; i < message.sampleUtterances.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.sampleUtterances[i]); - if (message.displayDescription != null && Object.hasOwnProperty.call(message, "displayDescription")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.displayDescription); + if (message.deidentifyTemplate != null && Object.hasOwnProperty.call(message, "deidentifyTemplate")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.deidentifyTemplate); + if (message.inspectTemplate != null && Object.hasOwnProperty.call(message, "inspectTemplate")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inspectTemplate); return writer; }; /** - * Encodes the specified Issue message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Issue.verify|verify} messages. + * Encodes the specified RedactionConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.RedactionConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.Issue + * @memberof google.cloud.contactcenterinsights.v1.RedactionConfig * @static - * @param {google.cloud.contactcenterinsights.v1.IIssue} message Issue message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IRedactionConfig} message RedactionConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Issue.encodeDelimited = function encodeDelimited(message, writer) { + RedactionConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Issue message from the specified reader or buffer. + * Decodes a RedactionConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.Issue + * @memberof google.cloud.contactcenterinsights.v1.RedactionConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.Issue} Issue + * @returns {google.cloud.contactcenterinsights.v1.RedactionConfig} RedactionConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Issue.decode = function decode(reader, length) { + RedactionConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Issue(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.RedactionConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.deidentifyTemplate = reader.string(); break; } case 2: { - message.displayName = reader.string(); - break; - } - case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - if (!(message.sampleUtterances && message.sampleUtterances.length)) - message.sampleUtterances = []; - message.sampleUtterances.push(reader.string()); - break; - } - case 14: { - message.displayDescription = reader.string(); + message.inspectTemplate = reader.string(); break; } default: @@ -31708,189 +52948,131 @@ }; /** - * Decodes an Issue message from the specified reader or buffer, length delimited. + * Decodes a RedactionConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.Issue + * @memberof google.cloud.contactcenterinsights.v1.RedactionConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.Issue} Issue + * @returns {google.cloud.contactcenterinsights.v1.RedactionConfig} RedactionConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Issue.decodeDelimited = function decodeDelimited(reader) { + RedactionConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Issue message. + * Verifies a RedactionConfig message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.Issue + * @memberof google.cloud.contactcenterinsights.v1.RedactionConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Issue.verify = function verify(message) { + RedactionConfig.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.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.sampleUtterances != null && message.hasOwnProperty("sampleUtterances")) { - if (!Array.isArray(message.sampleUtterances)) - return "sampleUtterances: array expected"; - for (var i = 0; i < message.sampleUtterances.length; ++i) - if (!$util.isString(message.sampleUtterances[i])) - return "sampleUtterances: string[] expected"; - } - if (message.displayDescription != null && message.hasOwnProperty("displayDescription")) - if (!$util.isString(message.displayDescription)) - return "displayDescription: string expected"; + if (message.deidentifyTemplate != null && message.hasOwnProperty("deidentifyTemplate")) + if (!$util.isString(message.deidentifyTemplate)) + return "deidentifyTemplate: string expected"; + if (message.inspectTemplate != null && message.hasOwnProperty("inspectTemplate")) + if (!$util.isString(message.inspectTemplate)) + return "inspectTemplate: string expected"; return null; }; /** - * Creates an Issue message from a plain object. Also converts values to their respective internal types. + * Creates a RedactionConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.Issue + * @memberof google.cloud.contactcenterinsights.v1.RedactionConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.Issue} Issue + * @returns {google.cloud.contactcenterinsights.v1.RedactionConfig} RedactionConfig */ - Issue.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.Issue) + RedactionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.RedactionConfig) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.Issue(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Issue.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Issue.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.sampleUtterances) { - if (!Array.isArray(object.sampleUtterances)) - throw TypeError(".google.cloud.contactcenterinsights.v1.Issue.sampleUtterances: array expected"); - message.sampleUtterances = []; - for (var i = 0; i < object.sampleUtterances.length; ++i) - message.sampleUtterances[i] = String(object.sampleUtterances[i]); - } - if (object.displayDescription != null) - message.displayDescription = String(object.displayDescription); + var message = new $root.google.cloud.contactcenterinsights.v1.RedactionConfig(); + if (object.deidentifyTemplate != null) + message.deidentifyTemplate = String(object.deidentifyTemplate); + if (object.inspectTemplate != null) + message.inspectTemplate = String(object.inspectTemplate); return message; }; /** - * Creates a plain object from an Issue message. Also converts values to other types if specified. + * Creates a plain object from a RedactionConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.Issue + * @memberof google.cloud.contactcenterinsights.v1.RedactionConfig * @static - * @param {google.cloud.contactcenterinsights.v1.Issue} message Issue + * @param {google.cloud.contactcenterinsights.v1.RedactionConfig} message RedactionConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Issue.toObject = function toObject(message, options) { + RedactionConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.sampleUtterances = []; if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.createTime = null; - object.updateTime = null; - object.displayDescription = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.sampleUtterances && message.sampleUtterances.length) { - object.sampleUtterances = []; - for (var j = 0; j < message.sampleUtterances.length; ++j) - object.sampleUtterances[j] = message.sampleUtterances[j]; + object.deidentifyTemplate = ""; + object.inspectTemplate = ""; } - if (message.displayDescription != null && message.hasOwnProperty("displayDescription")) - object.displayDescription = message.displayDescription; + if (message.deidentifyTemplate != null && message.hasOwnProperty("deidentifyTemplate")) + object.deidentifyTemplate = message.deidentifyTemplate; + if (message.inspectTemplate != null && message.hasOwnProperty("inspectTemplate")) + object.inspectTemplate = message.inspectTemplate; return object; }; /** - * Converts this Issue to JSON. + * Converts this RedactionConfig to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.Issue + * @memberof google.cloud.contactcenterinsights.v1.RedactionConfig * @instance * @returns {Object.} JSON object */ - Issue.prototype.toJSON = function toJSON() { + RedactionConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Issue + * Gets the default type url for RedactionConfig * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.Issue + * @memberof google.cloud.contactcenterinsights.v1.RedactionConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Issue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RedactionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Issue"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.RedactionConfig"; }; - return Issue; + return RedactionConfig; })(); - v1.IssueModelLabelStats = (function() { + v1.SpeechConfig = (function() { /** - * Properties of an IssueModelLabelStats. + * Properties of a SpeechConfig. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IIssueModelLabelStats - * @property {number|Long|null} [analyzedConversationsCount] IssueModelLabelStats analyzedConversationsCount - * @property {number|Long|null} [unclassifiedConversationsCount] IssueModelLabelStats unclassifiedConversationsCount - * @property {Object.|null} [issueStats] IssueModelLabelStats issueStats + * @interface ISpeechConfig + * @property {string|null} [speechRecognizer] SpeechConfig speechRecognizer */ /** - * Constructs a new IssueModelLabelStats. + * Constructs a new SpeechConfig. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents an IssueModelLabelStats. - * @implements IIssueModelLabelStats + * @classdesc Represents a SpeechConfig. + * @implements ISpeechConfig * @constructor - * @param {google.cloud.contactcenterinsights.v1.IIssueModelLabelStats=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.ISpeechConfig=} [properties] Properties to set */ - function IssueModelLabelStats(properties) { - this.issueStats = {}; + function SpeechConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31898,125 +53080,75 @@ } /** - * IssueModelLabelStats analyzedConversationsCount. - * @member {number|Long} analyzedConversationsCount - * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats - * @instance - */ - IssueModelLabelStats.prototype.analyzedConversationsCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * IssueModelLabelStats unclassifiedConversationsCount. - * @member {number|Long} unclassifiedConversationsCount - * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats - * @instance - */ - IssueModelLabelStats.prototype.unclassifiedConversationsCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * IssueModelLabelStats issueStats. - * @member {Object.} issueStats - * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats + * SpeechConfig speechRecognizer. + * @member {string} speechRecognizer + * @memberof google.cloud.contactcenterinsights.v1.SpeechConfig * @instance */ - IssueModelLabelStats.prototype.issueStats = $util.emptyObject; + SpeechConfig.prototype.speechRecognizer = ""; /** - * Creates a new IssueModelLabelStats instance using the specified properties. + * Creates a new SpeechConfig instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats + * @memberof google.cloud.contactcenterinsights.v1.SpeechConfig * @static - * @param {google.cloud.contactcenterinsights.v1.IIssueModelLabelStats=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.IssueModelLabelStats} IssueModelLabelStats instance + * @param {google.cloud.contactcenterinsights.v1.ISpeechConfig=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.SpeechConfig} SpeechConfig instance */ - IssueModelLabelStats.create = function create(properties) { - return new IssueModelLabelStats(properties); + SpeechConfig.create = function create(properties) { + return new SpeechConfig(properties); }; /** - * Encodes the specified IssueModelLabelStats message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModelLabelStats.verify|verify} messages. + * Encodes the specified SpeechConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SpeechConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats + * @memberof google.cloud.contactcenterinsights.v1.SpeechConfig * @static - * @param {google.cloud.contactcenterinsights.v1.IIssueModelLabelStats} message IssueModelLabelStats message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.ISpeechConfig} message SpeechConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - IssueModelLabelStats.encode = function encode(message, writer) { + SpeechConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.analyzedConversationsCount != null && Object.hasOwnProperty.call(message, "analyzedConversationsCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.analyzedConversationsCount); - if (message.unclassifiedConversationsCount != null && Object.hasOwnProperty.call(message, "unclassifiedConversationsCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.unclassifiedConversationsCount); - if (message.issueStats != null && Object.hasOwnProperty.call(message, "issueStats")) - for (var keys = Object.keys(message.issueStats), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats.encode(message.issueStats[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.speechRecognizer != null && Object.hasOwnProperty.call(message, "speechRecognizer")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.speechRecognizer); return writer; }; /** - * Encodes the specified IssueModelLabelStats message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModelLabelStats.verify|verify} messages. + * Encodes the specified SpeechConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SpeechConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats + * @memberof google.cloud.contactcenterinsights.v1.SpeechConfig * @static - * @param {google.cloud.contactcenterinsights.v1.IIssueModelLabelStats} message IssueModelLabelStats message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.ISpeechConfig} message SpeechConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - IssueModelLabelStats.encodeDelimited = function encodeDelimited(message, writer) { + SpeechConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an IssueModelLabelStats message from the specified reader or buffer. + * Decodes a SpeechConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats + * @memberof google.cloud.contactcenterinsights.v1.SpeechConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.IssueModelLabelStats} IssueModelLabelStats + * @returns {google.cloud.contactcenterinsights.v1.SpeechConfig} SpeechConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - IssueModelLabelStats.decode = function decode(reader, length) { + SpeechConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.SpeechConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.analyzedConversationsCount = reader.int64(); - break; - } - case 2: { - message.unclassifiedConversationsCount = reader.int64(); - break; - } - case 3: { - if (message.issueStats === $util.emptyObject) - message.issueStats = {}; - 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.contactcenterinsights.v1.IssueModelLabelStats.IssueStats.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.issueStats[key] = value; + message.speechRecognizer = reader.string(); break; } default: @@ -32028,462 +53160,133 @@ }; /** - * Decodes an IssueModelLabelStats message from the specified reader or buffer, length delimited. + * Decodes a SpeechConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats + * @memberof google.cloud.contactcenterinsights.v1.SpeechConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.IssueModelLabelStats} IssueModelLabelStats + * @returns {google.cloud.contactcenterinsights.v1.SpeechConfig} SpeechConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - IssueModelLabelStats.decodeDelimited = function decodeDelimited(reader) { + SpeechConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IssueModelLabelStats message. - * @function verify - * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IssueModelLabelStats.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.analyzedConversationsCount != null && message.hasOwnProperty("analyzedConversationsCount")) - if (!$util.isInteger(message.analyzedConversationsCount) && !(message.analyzedConversationsCount && $util.isInteger(message.analyzedConversationsCount.low) && $util.isInteger(message.analyzedConversationsCount.high))) - return "analyzedConversationsCount: integer|Long expected"; - if (message.unclassifiedConversationsCount != null && message.hasOwnProperty("unclassifiedConversationsCount")) - if (!$util.isInteger(message.unclassifiedConversationsCount) && !(message.unclassifiedConversationsCount && $util.isInteger(message.unclassifiedConversationsCount.low) && $util.isInteger(message.unclassifiedConversationsCount.high))) - return "unclassifiedConversationsCount: integer|Long expected"; - if (message.issueStats != null && message.hasOwnProperty("issueStats")) { - if (!$util.isObject(message.issueStats)) - return "issueStats: object expected"; - var key = Object.keys(message.issueStats); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats.verify(message.issueStats[key[i]]); - if (error) - return "issueStats." + error; - } - } + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SpeechConfig message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.SpeechConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SpeechConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.speechRecognizer != null && message.hasOwnProperty("speechRecognizer")) + if (!$util.isString(message.speechRecognizer)) + return "speechRecognizer: string expected"; return null; }; /** - * Creates an IssueModelLabelStats message from a plain object. Also converts values to their respective internal types. + * Creates a SpeechConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats + * @memberof google.cloud.contactcenterinsights.v1.SpeechConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.IssueModelLabelStats} IssueModelLabelStats + * @returns {google.cloud.contactcenterinsights.v1.SpeechConfig} SpeechConfig */ - IssueModelLabelStats.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats) + SpeechConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.SpeechConfig) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats(); - if (object.analyzedConversationsCount != null) - if ($util.Long) - (message.analyzedConversationsCount = $util.Long.fromValue(object.analyzedConversationsCount)).unsigned = false; - else if (typeof object.analyzedConversationsCount === "string") - message.analyzedConversationsCount = parseInt(object.analyzedConversationsCount, 10); - else if (typeof object.analyzedConversationsCount === "number") - message.analyzedConversationsCount = object.analyzedConversationsCount; - else if (typeof object.analyzedConversationsCount === "object") - message.analyzedConversationsCount = new $util.LongBits(object.analyzedConversationsCount.low >>> 0, object.analyzedConversationsCount.high >>> 0).toNumber(); - if (object.unclassifiedConversationsCount != null) - if ($util.Long) - (message.unclassifiedConversationsCount = $util.Long.fromValue(object.unclassifiedConversationsCount)).unsigned = false; - else if (typeof object.unclassifiedConversationsCount === "string") - message.unclassifiedConversationsCount = parseInt(object.unclassifiedConversationsCount, 10); - else if (typeof object.unclassifiedConversationsCount === "number") - message.unclassifiedConversationsCount = object.unclassifiedConversationsCount; - else if (typeof object.unclassifiedConversationsCount === "object") - message.unclassifiedConversationsCount = new $util.LongBits(object.unclassifiedConversationsCount.low >>> 0, object.unclassifiedConversationsCount.high >>> 0).toNumber(); - if (object.issueStats) { - if (typeof object.issueStats !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.IssueModelLabelStats.issueStats: object expected"); - message.issueStats = {}; - for (var keys = Object.keys(object.issueStats), i = 0; i < keys.length; ++i) { - if (typeof object.issueStats[keys[i]] !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.IssueModelLabelStats.issueStats: object expected"); - message.issueStats[keys[i]] = $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats.fromObject(object.issueStats[keys[i]]); - } - } + var message = new $root.google.cloud.contactcenterinsights.v1.SpeechConfig(); + if (object.speechRecognizer != null) + message.speechRecognizer = String(object.speechRecognizer); return message; }; /** - * Creates a plain object from an IssueModelLabelStats message. Also converts values to other types if specified. + * Creates a plain object from a SpeechConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats + * @memberof google.cloud.contactcenterinsights.v1.SpeechConfig * @static - * @param {google.cloud.contactcenterinsights.v1.IssueModelLabelStats} message IssueModelLabelStats + * @param {google.cloud.contactcenterinsights.v1.SpeechConfig} message SpeechConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - IssueModelLabelStats.toObject = function toObject(message, options) { + SpeechConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.issueStats = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.analyzedConversationsCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.analyzedConversationsCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.unclassifiedConversationsCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.unclassifiedConversationsCount = options.longs === String ? "0" : 0; - } - if (message.analyzedConversationsCount != null && message.hasOwnProperty("analyzedConversationsCount")) - if (typeof message.analyzedConversationsCount === "number") - object.analyzedConversationsCount = options.longs === String ? String(message.analyzedConversationsCount) : message.analyzedConversationsCount; - else - object.analyzedConversationsCount = options.longs === String ? $util.Long.prototype.toString.call(message.analyzedConversationsCount) : options.longs === Number ? new $util.LongBits(message.analyzedConversationsCount.low >>> 0, message.analyzedConversationsCount.high >>> 0).toNumber() : message.analyzedConversationsCount; - if (message.unclassifiedConversationsCount != null && message.hasOwnProperty("unclassifiedConversationsCount")) - if (typeof message.unclassifiedConversationsCount === "number") - object.unclassifiedConversationsCount = options.longs === String ? String(message.unclassifiedConversationsCount) : message.unclassifiedConversationsCount; - else - object.unclassifiedConversationsCount = options.longs === String ? $util.Long.prototype.toString.call(message.unclassifiedConversationsCount) : options.longs === Number ? new $util.LongBits(message.unclassifiedConversationsCount.low >>> 0, message.unclassifiedConversationsCount.high >>> 0).toNumber() : message.unclassifiedConversationsCount; - var keys2; - if (message.issueStats && (keys2 = Object.keys(message.issueStats)).length) { - object.issueStats = {}; - for (var j = 0; j < keys2.length; ++j) - object.issueStats[keys2[j]] = $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats.toObject(message.issueStats[keys2[j]], options); - } + if (options.defaults) + object.speechRecognizer = ""; + if (message.speechRecognizer != null && message.hasOwnProperty("speechRecognizer")) + object.speechRecognizer = message.speechRecognizer; return object; }; /** - * Converts this IssueModelLabelStats to JSON. + * Converts this SpeechConfig to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats + * @memberof google.cloud.contactcenterinsights.v1.SpeechConfig * @instance * @returns {Object.} JSON object */ - IssueModelLabelStats.prototype.toJSON = function toJSON() { + SpeechConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for IssueModelLabelStats + * Gets the default type url for SpeechConfig * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats + * @memberof google.cloud.contactcenterinsights.v1.SpeechConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - IssueModelLabelStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SpeechConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.IssueModelLabelStats"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.SpeechConfig"; }; - IssueModelLabelStats.IssueStats = (function() { - - /** - * Properties of an IssueStats. - * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats - * @interface IIssueStats - * @property {string|null} [issue] IssueStats issue - * @property {number|Long|null} [labeledConversationsCount] IssueStats labeledConversationsCount - * @property {string|null} [displayName] IssueStats displayName - */ - - /** - * Constructs a new IssueStats. - * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats - * @classdesc Represents an IssueStats. - * @implements IIssueStats - * @constructor - * @param {google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IIssueStats=} [properties] Properties to set - */ - function IssueStats(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * IssueStats issue. - * @member {string} issue - * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats - * @instance - */ - IssueStats.prototype.issue = ""; - - /** - * IssueStats labeledConversationsCount. - * @member {number|Long} labeledConversationsCount - * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats - * @instance - */ - IssueStats.prototype.labeledConversationsCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * IssueStats displayName. - * @member {string} displayName - * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats - * @instance - */ - IssueStats.prototype.displayName = ""; - - /** - * Creates a new IssueStats instance using the specified properties. - * @function create - * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats - * @static - * @param {google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IIssueStats=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats} IssueStats instance - */ - IssueStats.create = function create(properties) { - return new IssueStats(properties); - }; - - /** - * Encodes the specified IssueStats message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats.verify|verify} messages. - * @function encode - * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats - * @static - * @param {google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IIssueStats} message IssueStats message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IssueStats.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.issue != null && Object.hasOwnProperty.call(message, "issue")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.issue); - if (message.labeledConversationsCount != null && Object.hasOwnProperty.call(message, "labeledConversationsCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.labeledConversationsCount); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); - return writer; - }; - - /** - * Encodes the specified IssueStats message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats - * @static - * @param {google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IIssueStats} message IssueStats message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IssueStats.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an IssueStats message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats} IssueStats - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IssueStats.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.issue = reader.string(); - break; - } - case 2: { - message.labeledConversationsCount = reader.int64(); - break; - } - case 3: { - message.displayName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an IssueStats message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats} IssueStats - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IssueStats.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IssueStats message. - * @function verify - * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IssueStats.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.issue != null && message.hasOwnProperty("issue")) - if (!$util.isString(message.issue)) - return "issue: string expected"; - if (message.labeledConversationsCount != null && message.hasOwnProperty("labeledConversationsCount")) - if (!$util.isInteger(message.labeledConversationsCount) && !(message.labeledConversationsCount && $util.isInteger(message.labeledConversationsCount.low) && $util.isInteger(message.labeledConversationsCount.high))) - return "labeledConversationsCount: integer|Long expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - return null; - }; - - /** - * Creates an IssueStats message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats} IssueStats - */ - IssueStats.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats) - return object; - var message = new $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats(); - if (object.issue != null) - message.issue = String(object.issue); - if (object.labeledConversationsCount != null) - if ($util.Long) - (message.labeledConversationsCount = $util.Long.fromValue(object.labeledConversationsCount)).unsigned = false; - else if (typeof object.labeledConversationsCount === "string") - message.labeledConversationsCount = parseInt(object.labeledConversationsCount, 10); - else if (typeof object.labeledConversationsCount === "number") - message.labeledConversationsCount = object.labeledConversationsCount; - else if (typeof object.labeledConversationsCount === "object") - message.labeledConversationsCount = new $util.LongBits(object.labeledConversationsCount.low >>> 0, object.labeledConversationsCount.high >>> 0).toNumber(); - if (object.displayName != null) - message.displayName = String(object.displayName); - return message; - }; - - /** - * Creates a plain object from an IssueStats message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats - * @static - * @param {google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats} message IssueStats - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IssueStats.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.issue = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.labeledConversationsCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.labeledConversationsCount = options.longs === String ? "0" : 0; - object.displayName = ""; - } - if (message.issue != null && message.hasOwnProperty("issue")) - object.issue = message.issue; - if (message.labeledConversationsCount != null && message.hasOwnProperty("labeledConversationsCount")) - if (typeof message.labeledConversationsCount === "number") - object.labeledConversationsCount = options.longs === String ? String(message.labeledConversationsCount) : message.labeledConversationsCount; - else - object.labeledConversationsCount = options.longs === String ? $util.Long.prototype.toString.call(message.labeledConversationsCount) : options.longs === Number ? new $util.LongBits(message.labeledConversationsCount.low >>> 0, message.labeledConversationsCount.high >>> 0).toNumber() : message.labeledConversationsCount; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - return object; - }; - - /** - * Converts this IssueStats to JSON. - * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats - * @instance - * @returns {Object.} JSON object - */ - IssueStats.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for IssueStats - * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - IssueStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats"; - }; - - return IssueStats; - })(); - - return IssueModelLabelStats; + return SpeechConfig; })(); - v1.PhraseMatcher = (function() { + v1.RuntimeAnnotation = (function() { /** - * Properties of a PhraseMatcher. + * Properties of a RuntimeAnnotation. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IPhraseMatcher - * @property {string|null} [name] PhraseMatcher name - * @property {string|null} [revisionId] PhraseMatcher revisionId - * @property {string|null} [versionTag] PhraseMatcher versionTag - * @property {google.protobuf.ITimestamp|null} [revisionCreateTime] PhraseMatcher revisionCreateTime - * @property {string|null} [displayName] PhraseMatcher displayName - * @property {google.cloud.contactcenterinsights.v1.PhraseMatcher.PhraseMatcherType|null} [type] PhraseMatcher type - * @property {boolean|null} [active] PhraseMatcher active - * @property {Array.|null} [phraseMatchRuleGroups] PhraseMatcher phraseMatchRuleGroups - * @property {google.protobuf.ITimestamp|null} [activationUpdateTime] PhraseMatcher activationUpdateTime - * @property {google.cloud.contactcenterinsights.v1.ConversationParticipant.Role|null} [roleMatch] PhraseMatcher roleMatch - * @property {google.protobuf.ITimestamp|null} [updateTime] PhraseMatcher updateTime + * @interface IRuntimeAnnotation + * @property {google.cloud.contactcenterinsights.v1.IArticleSuggestionData|null} [articleSuggestion] RuntimeAnnotation articleSuggestion + * @property {google.cloud.contactcenterinsights.v1.IFaqAnswerData|null} [faqAnswer] RuntimeAnnotation faqAnswer + * @property {google.cloud.contactcenterinsights.v1.ISmartReplyData|null} [smartReply] RuntimeAnnotation smartReply + * @property {google.cloud.contactcenterinsights.v1.ISmartComposeSuggestionData|null} [smartComposeSuggestion] RuntimeAnnotation smartComposeSuggestion + * @property {google.cloud.contactcenterinsights.v1.IDialogflowInteractionData|null} [dialogflowInteraction] RuntimeAnnotation dialogflowInteraction + * @property {google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData|null} [conversationSummarizationSuggestion] RuntimeAnnotation conversationSummarizationSuggestion + * @property {string|null} [annotationId] RuntimeAnnotation annotationId + * @property {google.protobuf.ITimestamp|null} [createTime] RuntimeAnnotation createTime + * @property {google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null} [startBoundary] RuntimeAnnotation startBoundary + * @property {google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null} [endBoundary] RuntimeAnnotation endBoundary + * @property {google.cloud.contactcenterinsights.v1.IAnswerFeedback|null} [answerFeedback] RuntimeAnnotation answerFeedback + * @property {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.IUserInput|null} [userInput] RuntimeAnnotation userInput */ /** - * Constructs a new PhraseMatcher. + * Constructs a new RuntimeAnnotation. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a PhraseMatcher. - * @implements IPhraseMatcher + * @classdesc Represents a RuntimeAnnotation. + * @implements IRuntimeAnnotation * @constructor - * @param {google.cloud.contactcenterinsights.v1.IPhraseMatcher=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IRuntimeAnnotation=} [properties] Properties to set */ - function PhraseMatcher(properties) { - this.phraseMatchRuleGroups = []; + function RuntimeAnnotation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -32491,218 +53294,243 @@ } /** - * PhraseMatcher name. - * @member {string} name - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * RuntimeAnnotation articleSuggestion. + * @member {google.cloud.contactcenterinsights.v1.IArticleSuggestionData|null|undefined} articleSuggestion + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation * @instance */ - PhraseMatcher.prototype.name = ""; + RuntimeAnnotation.prototype.articleSuggestion = null; /** - * PhraseMatcher revisionId. - * @member {string} revisionId - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * RuntimeAnnotation faqAnswer. + * @member {google.cloud.contactcenterinsights.v1.IFaqAnswerData|null|undefined} faqAnswer + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation * @instance */ - PhraseMatcher.prototype.revisionId = ""; + RuntimeAnnotation.prototype.faqAnswer = null; /** - * PhraseMatcher versionTag. - * @member {string} versionTag - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * RuntimeAnnotation smartReply. + * @member {google.cloud.contactcenterinsights.v1.ISmartReplyData|null|undefined} smartReply + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation * @instance */ - PhraseMatcher.prototype.versionTag = ""; + RuntimeAnnotation.prototype.smartReply = null; /** - * PhraseMatcher revisionCreateTime. - * @member {google.protobuf.ITimestamp|null|undefined} revisionCreateTime - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * RuntimeAnnotation smartComposeSuggestion. + * @member {google.cloud.contactcenterinsights.v1.ISmartComposeSuggestionData|null|undefined} smartComposeSuggestion + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation * @instance */ - PhraseMatcher.prototype.revisionCreateTime = null; + RuntimeAnnotation.prototype.smartComposeSuggestion = null; /** - * PhraseMatcher displayName. - * @member {string} displayName - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * RuntimeAnnotation dialogflowInteraction. + * @member {google.cloud.contactcenterinsights.v1.IDialogflowInteractionData|null|undefined} dialogflowInteraction + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation * @instance */ - PhraseMatcher.prototype.displayName = ""; + RuntimeAnnotation.prototype.dialogflowInteraction = null; /** - * PhraseMatcher type. - * @member {google.cloud.contactcenterinsights.v1.PhraseMatcher.PhraseMatcherType} type - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * RuntimeAnnotation conversationSummarizationSuggestion. + * @member {google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData|null|undefined} conversationSummarizationSuggestion + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation * @instance */ - PhraseMatcher.prototype.type = 0; + RuntimeAnnotation.prototype.conversationSummarizationSuggestion = null; /** - * PhraseMatcher active. - * @member {boolean} active - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * RuntimeAnnotation annotationId. + * @member {string} annotationId + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation * @instance */ - PhraseMatcher.prototype.active = false; + RuntimeAnnotation.prototype.annotationId = ""; /** - * PhraseMatcher phraseMatchRuleGroups. - * @member {Array.} phraseMatchRuleGroups - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * RuntimeAnnotation createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation * @instance */ - PhraseMatcher.prototype.phraseMatchRuleGroups = $util.emptyArray; + RuntimeAnnotation.prototype.createTime = null; /** - * PhraseMatcher activationUpdateTime. - * @member {google.protobuf.ITimestamp|null|undefined} activationUpdateTime - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * RuntimeAnnotation startBoundary. + * @member {google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null|undefined} startBoundary + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation * @instance */ - PhraseMatcher.prototype.activationUpdateTime = null; + RuntimeAnnotation.prototype.startBoundary = null; /** - * PhraseMatcher roleMatch. - * @member {google.cloud.contactcenterinsights.v1.ConversationParticipant.Role} roleMatch - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * RuntimeAnnotation endBoundary. + * @member {google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null|undefined} endBoundary + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @instance + */ + RuntimeAnnotation.prototype.endBoundary = null; + + /** + * RuntimeAnnotation answerFeedback. + * @member {google.cloud.contactcenterinsights.v1.IAnswerFeedback|null|undefined} answerFeedback + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @instance + */ + RuntimeAnnotation.prototype.answerFeedback = null; + + /** + * RuntimeAnnotation userInput. + * @member {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.IUserInput|null|undefined} userInput + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation * @instance */ - PhraseMatcher.prototype.roleMatch = 0; + RuntimeAnnotation.prototype.userInput = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * PhraseMatcher updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * RuntimeAnnotation data. + * @member {"articleSuggestion"|"faqAnswer"|"smartReply"|"smartComposeSuggestion"|"dialogflowInteraction"|"conversationSummarizationSuggestion"|undefined} data + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation * @instance */ - PhraseMatcher.prototype.updateTime = null; + Object.defineProperty(RuntimeAnnotation.prototype, "data", { + get: $util.oneOfGetter($oneOfFields = ["articleSuggestion", "faqAnswer", "smartReply", "smartComposeSuggestion", "dialogflowInteraction", "conversationSummarizationSuggestion"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new PhraseMatcher instance using the specified properties. + * Creates a new RuntimeAnnotation instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation * @static - * @param {google.cloud.contactcenterinsights.v1.IPhraseMatcher=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.PhraseMatcher} PhraseMatcher instance + * @param {google.cloud.contactcenterinsights.v1.IRuntimeAnnotation=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.RuntimeAnnotation} RuntimeAnnotation instance */ - PhraseMatcher.create = function create(properties) { - return new PhraseMatcher(properties); + RuntimeAnnotation.create = function create(properties) { + return new RuntimeAnnotation(properties); }; /** - * Encodes the specified PhraseMatcher message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatcher.verify|verify} messages. + * Encodes the specified RuntimeAnnotation message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.RuntimeAnnotation.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation * @static - * @param {google.cloud.contactcenterinsights.v1.IPhraseMatcher} message PhraseMatcher message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IRuntimeAnnotation} message RuntimeAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PhraseMatcher.encode = function encode(message, writer) { + RuntimeAnnotation.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.revisionId != null && Object.hasOwnProperty.call(message, "revisionId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.revisionId); - if (message.versionTag != null && Object.hasOwnProperty.call(message, "versionTag")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.versionTag); - if (message.revisionCreateTime != null && Object.hasOwnProperty.call(message, "revisionCreateTime")) - $root.google.protobuf.Timestamp.encode(message.revisionCreateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.type); - if (message.active != null && Object.hasOwnProperty.call(message, "active")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.active); - if (message.phraseMatchRuleGroups != null && message.phraseMatchRuleGroups.length) - for (var i = 0; i < message.phraseMatchRuleGroups.length; ++i) - $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.encode(message.phraseMatchRuleGroups[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.activationUpdateTime != null && Object.hasOwnProperty.call(message, "activationUpdateTime")) - $root.google.protobuf.Timestamp.encode(message.activationUpdateTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.roleMatch != null && Object.hasOwnProperty.call(message, "roleMatch")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.roleMatch); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.annotationId != null && Object.hasOwnProperty.call(message, "annotationId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.annotationId); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.startBoundary != null && Object.hasOwnProperty.call(message, "startBoundary")) + $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.encode(message.startBoundary, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.endBoundary != null && Object.hasOwnProperty.call(message, "endBoundary")) + $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.encode(message.endBoundary, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.answerFeedback != null && Object.hasOwnProperty.call(message, "answerFeedback")) + $root.google.cloud.contactcenterinsights.v1.AnswerFeedback.encode(message.answerFeedback, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.articleSuggestion != null && Object.hasOwnProperty.call(message, "articleSuggestion")) + $root.google.cloud.contactcenterinsights.v1.ArticleSuggestionData.encode(message.articleSuggestion, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.faqAnswer != null && Object.hasOwnProperty.call(message, "faqAnswer")) + $root.google.cloud.contactcenterinsights.v1.FaqAnswerData.encode(message.faqAnswer, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.smartReply != null && Object.hasOwnProperty.call(message, "smartReply")) + $root.google.cloud.contactcenterinsights.v1.SmartReplyData.encode(message.smartReply, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.smartComposeSuggestion != null && Object.hasOwnProperty.call(message, "smartComposeSuggestion")) + $root.google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData.encode(message.smartComposeSuggestion, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.dialogflowInteraction != null && Object.hasOwnProperty.call(message, "dialogflowInteraction")) + $root.google.cloud.contactcenterinsights.v1.DialogflowInteractionData.encode(message.dialogflowInteraction, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.conversationSummarizationSuggestion != null && Object.hasOwnProperty.call(message, "conversationSummarizationSuggestion")) + $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.encode(message.conversationSummarizationSuggestion, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.userInput != null && Object.hasOwnProperty.call(message, "userInput")) + $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.encode(message.userInput, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); return writer; }; /** - * Encodes the specified PhraseMatcher message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatcher.verify|verify} messages. + * Encodes the specified RuntimeAnnotation message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.RuntimeAnnotation.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation * @static - * @param {google.cloud.contactcenterinsights.v1.IPhraseMatcher} message PhraseMatcher message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IRuntimeAnnotation} message RuntimeAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PhraseMatcher.encodeDelimited = function encodeDelimited(message, writer) { + RuntimeAnnotation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PhraseMatcher message from the specified reader or buffer. + * Decodes a RuntimeAnnotation message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.PhraseMatcher} PhraseMatcher + * @returns {google.cloud.contactcenterinsights.v1.RuntimeAnnotation} RuntimeAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PhraseMatcher.decode = function decode(reader, length) { + RuntimeAnnotation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.PhraseMatcher(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.name = reader.string(); + case 6: { + message.articleSuggestion = $root.google.cloud.contactcenterinsights.v1.ArticleSuggestionData.decode(reader, reader.uint32()); break; } - case 2: { - message.revisionId = reader.string(); + case 7: { + message.faqAnswer = $root.google.cloud.contactcenterinsights.v1.FaqAnswerData.decode(reader, reader.uint32()); break; } - case 3: { - message.versionTag = reader.string(); + case 8: { + message.smartReply = $root.google.cloud.contactcenterinsights.v1.SmartReplyData.decode(reader, reader.uint32()); break; } - case 4: { - message.revisionCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 9: { + message.smartComposeSuggestion = $root.google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData.decode(reader, reader.uint32()); break; } - case 5: { - message.displayName = reader.string(); + case 10: { + message.dialogflowInteraction = $root.google.cloud.contactcenterinsights.v1.DialogflowInteractionData.decode(reader, reader.uint32()); break; } - case 6: { - message.type = reader.int32(); + case 12: { + message.conversationSummarizationSuggestion = $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.decode(reader, reader.uint32()); break; } - case 7: { - message.active = reader.bool(); + case 1: { + message.annotationId = reader.string(); break; } - case 8: { - if (!(message.phraseMatchRuleGroups && message.phraseMatchRuleGroups.length)) - message.phraseMatchRuleGroups = []; - message.phraseMatchRuleGroups.push($root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.decode(reader, reader.uint32())); + case 2: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } - case 9: { - message.activationUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 3: { + message.startBoundary = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.decode(reader, reader.uint32()); break; } - case 10: { - message.roleMatch = reader.int32(); + case 4: { + message.endBoundary = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.decode(reader, reader.uint32()); break; } - case 11: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 5: { + message.answerFeedback = $root.google.cloud.contactcenterinsights.v1.AnswerFeedback.decode(reader, reader.uint32()); + break; + } + case 16: { + message.userInput = $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.decode(reader, reader.uint32()); break; } default: @@ -32714,600 +53542,599 @@ }; /** - * Decodes a PhraseMatcher message from the specified reader or buffer, length delimited. + * Decodes a RuntimeAnnotation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.PhraseMatcher} PhraseMatcher + * @returns {google.cloud.contactcenterinsights.v1.RuntimeAnnotation} RuntimeAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PhraseMatcher.decodeDelimited = function decodeDelimited(reader) { + RuntimeAnnotation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PhraseMatcher message. + * Verifies a RuntimeAnnotation message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PhraseMatcher.verify = function verify(message) { + RuntimeAnnotation.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.revisionId != null && message.hasOwnProperty("revisionId")) - if (!$util.isString(message.revisionId)) - return "revisionId: string expected"; - if (message.versionTag != null && message.hasOwnProperty("versionTag")) - if (!$util.isString(message.versionTag)) - return "versionTag: string expected"; - if (message.revisionCreateTime != null && message.hasOwnProperty("revisionCreateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.revisionCreateTime); - if (error) - return "revisionCreateTime." + error; + var properties = {}; + if (message.articleSuggestion != null && message.hasOwnProperty("articleSuggestion")) { + properties.data = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.ArticleSuggestionData.verify(message.articleSuggestion); + if (error) + return "articleSuggestion." + error; + } } - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; + if (message.faqAnswer != null && message.hasOwnProperty("faqAnswer")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.FaqAnswerData.verify(message.faqAnswer); + if (error) + return "faqAnswer." + error; } - if (message.active != null && message.hasOwnProperty("active")) - if (typeof message.active !== "boolean") - return "active: boolean expected"; - if (message.phraseMatchRuleGroups != null && message.hasOwnProperty("phraseMatchRuleGroups")) { - if (!Array.isArray(message.phraseMatchRuleGroups)) - return "phraseMatchRuleGroups: array expected"; - for (var i = 0; i < message.phraseMatchRuleGroups.length; ++i) { - var error = $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.verify(message.phraseMatchRuleGroups[i]); + } + if (message.smartReply != null && message.hasOwnProperty("smartReply")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.SmartReplyData.verify(message.smartReply); if (error) - return "phraseMatchRuleGroups." + error; + return "smartReply." + error; } } - if (message.activationUpdateTime != null && message.hasOwnProperty("activationUpdateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.activationUpdateTime); - if (error) - return "activationUpdateTime." + error; + if (message.smartComposeSuggestion != null && message.hasOwnProperty("smartComposeSuggestion")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData.verify(message.smartComposeSuggestion); + if (error) + return "smartComposeSuggestion." + error; + } } - if (message.roleMatch != null && message.hasOwnProperty("roleMatch")) - switch (message.roleMatch) { - default: - return "roleMatch: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; + if (message.dialogflowInteraction != null && message.hasOwnProperty("dialogflowInteraction")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.DialogflowInteractionData.verify(message.dialogflowInteraction); + if (error) + return "dialogflowInteraction." + error; } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + } + if (message.conversationSummarizationSuggestion != null && message.hasOwnProperty("conversationSummarizationSuggestion")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.verify(message.conversationSummarizationSuggestion); + if (error) + return "conversationSummarizationSuggestion." + error; + } + } + if (message.annotationId != null && message.hasOwnProperty("annotationId")) + if (!$util.isString(message.annotationId)) + return "annotationId: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) - return "updateTime." + error; + return "createTime." + error; + } + if (message.startBoundary != null && message.hasOwnProperty("startBoundary")) { + var error = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.verify(message.startBoundary); + if (error) + return "startBoundary." + error; + } + if (message.endBoundary != null && message.hasOwnProperty("endBoundary")) { + var error = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.verify(message.endBoundary); + if (error) + return "endBoundary." + error; + } + if (message.answerFeedback != null && message.hasOwnProperty("answerFeedback")) { + var error = $root.google.cloud.contactcenterinsights.v1.AnswerFeedback.verify(message.answerFeedback); + if (error) + return "answerFeedback." + error; + } + if (message.userInput != null && message.hasOwnProperty("userInput")) { + var error = $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.verify(message.userInput); + if (error) + return "userInput." + error; } return null; }; /** - * Creates a PhraseMatcher message from a plain object. Also converts values to their respective internal types. + * Creates a RuntimeAnnotation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.PhraseMatcher} PhraseMatcher + * @returns {google.cloud.contactcenterinsights.v1.RuntimeAnnotation} RuntimeAnnotation */ - PhraseMatcher.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.PhraseMatcher) + RuntimeAnnotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.PhraseMatcher(); - if (object.name != null) - message.name = String(object.name); - if (object.revisionId != null) - message.revisionId = String(object.revisionId); - if (object.versionTag != null) - message.versionTag = String(object.versionTag); - if (object.revisionCreateTime != null) { - if (typeof object.revisionCreateTime !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.PhraseMatcher.revisionCreateTime: object expected"); - message.revisionCreateTime = $root.google.protobuf.Timestamp.fromObject(object.revisionCreateTime); + var message = new $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation(); + if (object.articleSuggestion != null) { + if (typeof object.articleSuggestion !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.RuntimeAnnotation.articleSuggestion: object expected"); + message.articleSuggestion = $root.google.cloud.contactcenterinsights.v1.ArticleSuggestionData.fromObject(object.articleSuggestion); } - if (object.displayName != null) - message.displayName = String(object.displayName); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "PHRASE_MATCHER_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "ALL_OF": - case 1: - message.type = 1; - break; - case "ANY_OF": - case 2: - message.type = 2; - break; + if (object.faqAnswer != null) { + if (typeof object.faqAnswer !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.RuntimeAnnotation.faqAnswer: object expected"); + message.faqAnswer = $root.google.cloud.contactcenterinsights.v1.FaqAnswerData.fromObject(object.faqAnswer); } - if (object.active != null) - message.active = Boolean(object.active); - if (object.phraseMatchRuleGroups) { - if (!Array.isArray(object.phraseMatchRuleGroups)) - throw TypeError(".google.cloud.contactcenterinsights.v1.PhraseMatcher.phraseMatchRuleGroups: array expected"); - message.phraseMatchRuleGroups = []; - for (var i = 0; i < object.phraseMatchRuleGroups.length; ++i) { - if (typeof object.phraseMatchRuleGroups[i] !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.PhraseMatcher.phraseMatchRuleGroups: object expected"); - message.phraseMatchRuleGroups[i] = $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.fromObject(object.phraseMatchRuleGroups[i]); - } + if (object.smartReply != null) { + if (typeof object.smartReply !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.RuntimeAnnotation.smartReply: object expected"); + message.smartReply = $root.google.cloud.contactcenterinsights.v1.SmartReplyData.fromObject(object.smartReply); } - if (object.activationUpdateTime != null) { - if (typeof object.activationUpdateTime !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.PhraseMatcher.activationUpdateTime: object expected"); - message.activationUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.activationUpdateTime); + if (object.smartComposeSuggestion != null) { + if (typeof object.smartComposeSuggestion !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.RuntimeAnnotation.smartComposeSuggestion: object expected"); + message.smartComposeSuggestion = $root.google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData.fromObject(object.smartComposeSuggestion); } - switch (object.roleMatch) { - default: - if (typeof object.roleMatch === "number") { - message.roleMatch = object.roleMatch; - break; - } - break; - case "ROLE_UNSPECIFIED": - case 0: - message.roleMatch = 0; - break; - case "HUMAN_AGENT": - case 1: - message.roleMatch = 1; - break; - case "AUTOMATED_AGENT": - case 2: - message.roleMatch = 2; - break; - case "END_USER": - case 3: - message.roleMatch = 3; - break; - case "ANY_AGENT": - case 4: - message.roleMatch = 4; - break; + if (object.dialogflowInteraction != null) { + if (typeof object.dialogflowInteraction !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.RuntimeAnnotation.dialogflowInteraction: object expected"); + message.dialogflowInteraction = $root.google.cloud.contactcenterinsights.v1.DialogflowInteractionData.fromObject(object.dialogflowInteraction); } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.PhraseMatcher.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + if (object.conversationSummarizationSuggestion != null) { + if (typeof object.conversationSummarizationSuggestion !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.RuntimeAnnotation.conversationSummarizationSuggestion: object expected"); + message.conversationSummarizationSuggestion = $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.fromObject(object.conversationSummarizationSuggestion); + } + if (object.annotationId != null) + message.annotationId = String(object.annotationId); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.RuntimeAnnotation.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.startBoundary != null) { + if (typeof object.startBoundary !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.RuntimeAnnotation.startBoundary: object expected"); + message.startBoundary = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.fromObject(object.startBoundary); + } + if (object.endBoundary != null) { + if (typeof object.endBoundary !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.RuntimeAnnotation.endBoundary: object expected"); + message.endBoundary = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.fromObject(object.endBoundary); + } + if (object.answerFeedback != null) { + if (typeof object.answerFeedback !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.RuntimeAnnotation.answerFeedback: object expected"); + message.answerFeedback = $root.google.cloud.contactcenterinsights.v1.AnswerFeedback.fromObject(object.answerFeedback); + } + if (object.userInput != null) { + if (typeof object.userInput !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.RuntimeAnnotation.userInput: object expected"); + message.userInput = $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.fromObject(object.userInput); } return message; }; /** - * Creates a plain object from a PhraseMatcher message. Also converts values to other types if specified. + * Creates a plain object from a RuntimeAnnotation message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation * @static - * @param {google.cloud.contactcenterinsights.v1.PhraseMatcher} message PhraseMatcher + * @param {google.cloud.contactcenterinsights.v1.RuntimeAnnotation} message RuntimeAnnotation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PhraseMatcher.toObject = function toObject(message, options) { + RuntimeAnnotation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.phraseMatchRuleGroups = []; if (options.defaults) { - object.name = ""; - object.revisionId = ""; - object.versionTag = ""; - object.revisionCreateTime = null; - object.displayName = ""; - object.type = options.enums === String ? "PHRASE_MATCHER_TYPE_UNSPECIFIED" : 0; - object.active = false; - object.activationUpdateTime = null; - object.roleMatch = options.enums === String ? "ROLE_UNSPECIFIED" : 0; - object.updateTime = null; + object.annotationId = ""; + object.createTime = null; + object.startBoundary = null; + object.endBoundary = null; + object.answerFeedback = null; + object.userInput = null; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.revisionId != null && message.hasOwnProperty("revisionId")) - object.revisionId = message.revisionId; - if (message.versionTag != null && message.hasOwnProperty("versionTag")) - object.versionTag = message.versionTag; - if (message.revisionCreateTime != null && message.hasOwnProperty("revisionCreateTime")) - object.revisionCreateTime = $root.google.protobuf.Timestamp.toObject(message.revisionCreateTime, options); - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.PhraseMatcherType[message.type] === undefined ? message.type : $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.PhraseMatcherType[message.type] : message.type; - if (message.active != null && message.hasOwnProperty("active")) - object.active = message.active; - if (message.phraseMatchRuleGroups && message.phraseMatchRuleGroups.length) { - object.phraseMatchRuleGroups = []; - for (var j = 0; j < message.phraseMatchRuleGroups.length; ++j) - object.phraseMatchRuleGroups[j] = $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.toObject(message.phraseMatchRuleGroups[j], options); + if (message.annotationId != null && message.hasOwnProperty("annotationId")) + object.annotationId = message.annotationId; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.startBoundary != null && message.hasOwnProperty("startBoundary")) + object.startBoundary = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.toObject(message.startBoundary, options); + if (message.endBoundary != null && message.hasOwnProperty("endBoundary")) + object.endBoundary = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.toObject(message.endBoundary, options); + if (message.answerFeedback != null && message.hasOwnProperty("answerFeedback")) + object.answerFeedback = $root.google.cloud.contactcenterinsights.v1.AnswerFeedback.toObject(message.answerFeedback, options); + if (message.articleSuggestion != null && message.hasOwnProperty("articleSuggestion")) { + object.articleSuggestion = $root.google.cloud.contactcenterinsights.v1.ArticleSuggestionData.toObject(message.articleSuggestion, options); + if (options.oneofs) + object.data = "articleSuggestion"; + } + if (message.faqAnswer != null && message.hasOwnProperty("faqAnswer")) { + object.faqAnswer = $root.google.cloud.contactcenterinsights.v1.FaqAnswerData.toObject(message.faqAnswer, options); + if (options.oneofs) + object.data = "faqAnswer"; + } + if (message.smartReply != null && message.hasOwnProperty("smartReply")) { + object.smartReply = $root.google.cloud.contactcenterinsights.v1.SmartReplyData.toObject(message.smartReply, options); + if (options.oneofs) + object.data = "smartReply"; + } + if (message.smartComposeSuggestion != null && message.hasOwnProperty("smartComposeSuggestion")) { + object.smartComposeSuggestion = $root.google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData.toObject(message.smartComposeSuggestion, options); + if (options.oneofs) + object.data = "smartComposeSuggestion"; + } + if (message.dialogflowInteraction != null && message.hasOwnProperty("dialogflowInteraction")) { + object.dialogflowInteraction = $root.google.cloud.contactcenterinsights.v1.DialogflowInteractionData.toObject(message.dialogflowInteraction, options); + if (options.oneofs) + object.data = "dialogflowInteraction"; } - if (message.activationUpdateTime != null && message.hasOwnProperty("activationUpdateTime")) - object.activationUpdateTime = $root.google.protobuf.Timestamp.toObject(message.activationUpdateTime, options); - if (message.roleMatch != null && message.hasOwnProperty("roleMatch")) - object.roleMatch = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.ConversationParticipant.Role[message.roleMatch] === undefined ? message.roleMatch : $root.google.cloud.contactcenterinsights.v1.ConversationParticipant.Role[message.roleMatch] : message.roleMatch; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.conversationSummarizationSuggestion != null && message.hasOwnProperty("conversationSummarizationSuggestion")) { + object.conversationSummarizationSuggestion = $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.toObject(message.conversationSummarizationSuggestion, options); + if (options.oneofs) + object.data = "conversationSummarizationSuggestion"; + } + if (message.userInput != null && message.hasOwnProperty("userInput")) + object.userInput = $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.toObject(message.userInput, options); return object; }; /** - * Converts this PhraseMatcher to JSON. + * Converts this RuntimeAnnotation to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation * @instance * @returns {Object.} JSON object */ - PhraseMatcher.prototype.toJSON = function toJSON() { + RuntimeAnnotation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PhraseMatcher + * Gets the default type url for RuntimeAnnotation * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatcher + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PhraseMatcher.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RuntimeAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.PhraseMatcher"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.RuntimeAnnotation"; }; - /** - * PhraseMatcherType enum. - * @name google.cloud.contactcenterinsights.v1.PhraseMatcher.PhraseMatcherType - * @enum {number} - * @property {number} PHRASE_MATCHER_TYPE_UNSPECIFIED=0 PHRASE_MATCHER_TYPE_UNSPECIFIED value - * @property {number} ALL_OF=1 ALL_OF value - * @property {number} ANY_OF=2 ANY_OF value - */ - PhraseMatcher.PhraseMatcherType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PHRASE_MATCHER_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ALL_OF"] = 1; - values[valuesById[2] = "ANY_OF"] = 2; - return values; - })(); - - return PhraseMatcher; - })(); + RuntimeAnnotation.UserInput = (function() { - v1.PhraseMatchRuleGroup = (function() { + /** + * Properties of a UserInput. + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @interface IUserInput + * @property {string|null} [query] UserInput query + * @property {string|null} [generatorName] UserInput generatorName + * @property {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.QuerySource|null} [querySource] UserInput querySource + */ - /** - * Properties of a PhraseMatchRuleGroup. - * @memberof google.cloud.contactcenterinsights.v1 - * @interface IPhraseMatchRuleGroup - * @property {google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType|null} [type] PhraseMatchRuleGroup type - * @property {Array.|null} [phraseMatchRules] PhraseMatchRuleGroup phraseMatchRules - */ + /** + * Constructs a new UserInput. + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @classdesc Represents a UserInput. + * @implements IUserInput + * @constructor + * @param {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.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]]; + } - /** - * Constructs a new PhraseMatchRuleGroup. - * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a PhraseMatchRuleGroup. - * @implements IPhraseMatchRuleGroup - * @constructor - * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchRuleGroup=} [properties] Properties to set - */ - function PhraseMatchRuleGroup(properties) { - this.phraseMatchRules = []; - if (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 query. + * @member {string} query + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput + * @instance + */ + UserInput.prototype.query = ""; - /** - * PhraseMatchRuleGroup type. - * @member {google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType} type - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup - * @instance - */ - PhraseMatchRuleGroup.prototype.type = 0; + /** + * UserInput generatorName. + * @member {string} generatorName + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput + * @instance + */ + UserInput.prototype.generatorName = ""; - /** - * PhraseMatchRuleGroup phraseMatchRules. - * @member {Array.} phraseMatchRules - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup - * @instance - */ - PhraseMatchRuleGroup.prototype.phraseMatchRules = $util.emptyArray; + /** + * UserInput querySource. + * @member {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.QuerySource} querySource + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput + * @instance + */ + UserInput.prototype.querySource = 0; - /** - * Creates a new PhraseMatchRuleGroup instance using the specified properties. - * @function create - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup - * @static - * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchRuleGroup=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup} PhraseMatchRuleGroup instance - */ - PhraseMatchRuleGroup.create = function create(properties) { - return new PhraseMatchRuleGroup(properties); - }; + /** + * Creates a new UserInput instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput + * @static + * @param {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.IUserInput=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput} UserInput instance + */ + UserInput.create = function create(properties) { + return new UserInput(properties); + }; - /** - * Encodes the specified PhraseMatchRuleGroup message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.verify|verify} messages. - * @function encode - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup - * @static - * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchRuleGroup} message PhraseMatchRuleGroup message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhraseMatchRuleGroup.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.phraseMatchRules != null && message.phraseMatchRules.length) - for (var i = 0; i < message.phraseMatchRules.length; ++i) - $root.google.cloud.contactcenterinsights.v1.PhraseMatchRule.encode(message.phraseMatchRules[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified UserInput message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput + * @static + * @param {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.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.query != null && Object.hasOwnProperty.call(message, "query")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.query); + if (message.generatorName != null && Object.hasOwnProperty.call(message, "generatorName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.generatorName); + if (message.querySource != null && Object.hasOwnProperty.call(message, "querySource")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.querySource); + return writer; + }; - /** - * Encodes the specified PhraseMatchRuleGroup message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup - * @static - * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchRuleGroup} message PhraseMatchRuleGroup message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhraseMatchRuleGroup.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified UserInput message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput + * @static + * @param {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.IUserInput} message UserInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserInput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a PhraseMatchRuleGroup message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup} PhraseMatchRuleGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhraseMatchRuleGroup.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.int32(); - break; - } - case 2: { - if (!(message.phraseMatchRules && message.phraseMatchRules.length)) - message.phraseMatchRules = []; - message.phraseMatchRules.push($root.google.cloud.contactcenterinsights.v1.PhraseMatchRule.decode(reader, reader.uint32())); + /** + * Decodes a UserInput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.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.contactcenterinsights.v1.RuntimeAnnotation.UserInput(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.query = reader.string(); + break; + } + case 2: { + message.generatorName = reader.string(); + break; + } + case 3: { + message.querySource = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a PhraseMatchRuleGroup message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup} PhraseMatchRuleGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhraseMatchRuleGroup.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a UserInput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput} UserInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserInput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a PhraseMatchRuleGroup message. - * @function verify - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PhraseMatchRuleGroup.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { + /** + * Verifies a UserInput message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.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.query != null && message.hasOwnProperty("query")) + if (!$util.isString(message.query)) + return "query: string expected"; + if (message.generatorName != null && message.hasOwnProperty("generatorName")) + if (!$util.isString(message.generatorName)) + return "generatorName: string expected"; + if (message.querySource != null && message.hasOwnProperty("querySource")) + switch (message.querySource) { + default: + return "querySource: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a UserInput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput} UserInput + */ + UserInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput(); + if (object.query != null) + message.query = String(object.query); + if (object.generatorName != null) + message.generatorName = String(object.generatorName); + switch (object.querySource) { default: - return "type: enum value expected"; + if (typeof object.querySource === "number") { + message.querySource = object.querySource; + break; + } + break; + case "QUERY_SOURCE_UNSPECIFIED": case 0: + message.querySource = 0; + break; + case "AGENT_QUERY": case 1: + message.querySource = 1; + break; + case "SUGGESTED_QUERY": case 2: + message.querySource = 2; break; } - if (message.phraseMatchRules != null && message.hasOwnProperty("phraseMatchRules")) { - if (!Array.isArray(message.phraseMatchRules)) - return "phraseMatchRules: array expected"; - for (var i = 0; i < message.phraseMatchRules.length; ++i) { - var error = $root.google.cloud.contactcenterinsights.v1.PhraseMatchRule.verify(message.phraseMatchRules[i]); - if (error) - return "phraseMatchRules." + error; - } - } - return null; - }; + return message; + }; - /** - * Creates a PhraseMatchRuleGroup message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup} PhraseMatchRuleGroup - */ - PhraseMatchRuleGroup.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup) - return object; - var message = new $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup(); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "PHRASE_MATCH_RULE_GROUP_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "ALL_OF": - case 1: - message.type = 1; - break; - case "ANY_OF": - case 2: - message.type = 2; - break; - } - if (object.phraseMatchRules) { - if (!Array.isArray(object.phraseMatchRules)) - throw TypeError(".google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.phraseMatchRules: array expected"); - message.phraseMatchRules = []; - for (var i = 0; i < object.phraseMatchRules.length; ++i) { - if (typeof object.phraseMatchRules[i] !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.phraseMatchRules: object expected"); - message.phraseMatchRules[i] = $root.google.cloud.contactcenterinsights.v1.PhraseMatchRule.fromObject(object.phraseMatchRules[i]); + /** + * Creates a plain object from a UserInput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput + * @static + * @param {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.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.query = ""; + object.generatorName = ""; + object.querySource = options.enums === String ? "QUERY_SOURCE_UNSPECIFIED" : 0; } - } - return message; - }; + if (message.query != null && message.hasOwnProperty("query")) + object.query = message.query; + if (message.generatorName != null && message.hasOwnProperty("generatorName")) + object.generatorName = message.generatorName; + if (message.querySource != null && message.hasOwnProperty("querySource")) + object.querySource = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.QuerySource[message.querySource] === undefined ? message.querySource : $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.QuerySource[message.querySource] : message.querySource; + return object; + }; - /** - * Creates a plain object from a PhraseMatchRuleGroup message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup - * @static - * @param {google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup} message PhraseMatchRuleGroup - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PhraseMatchRuleGroup.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.phraseMatchRules = []; - if (options.defaults) - object.type = options.enums === String ? "PHRASE_MATCH_RULE_GROUP_TYPE_UNSPECIFIED" : 0; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType[message.type] === undefined ? message.type : $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType[message.type] : message.type; - if (message.phraseMatchRules && message.phraseMatchRules.length) { - object.phraseMatchRules = []; - for (var j = 0; j < message.phraseMatchRules.length; ++j) - object.phraseMatchRules[j] = $root.google.cloud.contactcenterinsights.v1.PhraseMatchRule.toObject(message.phraseMatchRules[j], options); - } - return object; - }; + /** + * Converts this UserInput to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput + * @instance + * @returns {Object.} JSON object + */ + UserInput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this PhraseMatchRuleGroup to JSON. - * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup - * @instance - * @returns {Object.} JSON object - */ - PhraseMatchRuleGroup.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for UserInput + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.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.contactcenterinsights.v1.RuntimeAnnotation.UserInput"; + }; - /** - * Gets the default type url for PhraseMatchRuleGroup - * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PhraseMatchRuleGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup"; - }; + /** + * QuerySource enum. + * @name google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.QuerySource + * @enum {number} + * @property {number} QUERY_SOURCE_UNSPECIFIED=0 QUERY_SOURCE_UNSPECIFIED value + * @property {number} AGENT_QUERY=1 AGENT_QUERY value + * @property {number} SUGGESTED_QUERY=2 SUGGESTED_QUERY value + */ + UserInput.QuerySource = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "QUERY_SOURCE_UNSPECIFIED"] = 0; + values[valuesById[1] = "AGENT_QUERY"] = 1; + values[valuesById[2] = "SUGGESTED_QUERY"] = 2; + return values; + })(); - /** - * PhraseMatchRuleGroupType enum. - * @name google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType - * @enum {number} - * @property {number} PHRASE_MATCH_RULE_GROUP_TYPE_UNSPECIFIED=0 PHRASE_MATCH_RULE_GROUP_TYPE_UNSPECIFIED value - * @property {number} ALL_OF=1 ALL_OF value - * @property {number} ANY_OF=2 ANY_OF value - */ - PhraseMatchRuleGroup.PhraseMatchRuleGroupType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PHRASE_MATCH_RULE_GROUP_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ALL_OF"] = 1; - values[valuesById[2] = "ANY_OF"] = 2; - return values; + return UserInput; })(); - return PhraseMatchRuleGroup; + return RuntimeAnnotation; })(); - v1.PhraseMatchRule = (function() { + v1.AnswerFeedback = (function() { /** - * Properties of a PhraseMatchRule. + * Properties of an AnswerFeedback. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IPhraseMatchRule - * @property {string|null} [query] PhraseMatchRule query - * @property {boolean|null} [negated] PhraseMatchRule negated - * @property {google.cloud.contactcenterinsights.v1.IPhraseMatchRuleConfig|null} [config] PhraseMatchRule config + * @interface IAnswerFeedback + * @property {google.cloud.contactcenterinsights.v1.AnswerFeedback.CorrectnessLevel|null} [correctnessLevel] AnswerFeedback correctnessLevel + * @property {boolean|null} [clicked] AnswerFeedback clicked + * @property {boolean|null} [displayed] AnswerFeedback displayed */ /** - * Constructs a new PhraseMatchRule. + * Constructs a new AnswerFeedback. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a PhraseMatchRule. - * @implements IPhraseMatchRule + * @classdesc Represents an AnswerFeedback. + * @implements IAnswerFeedback * @constructor - * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchRule=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IAnswerFeedback=} [properties] Properties to set */ - function PhraseMatchRule(properties) { + function AnswerFeedback(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -33315,103 +54142,103 @@ } /** - * PhraseMatchRule query. - * @member {string} query - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule + * AnswerFeedback correctnessLevel. + * @member {google.cloud.contactcenterinsights.v1.AnswerFeedback.CorrectnessLevel} correctnessLevel + * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback * @instance */ - PhraseMatchRule.prototype.query = ""; + AnswerFeedback.prototype.correctnessLevel = 0; /** - * PhraseMatchRule negated. - * @member {boolean} negated - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule + * AnswerFeedback clicked. + * @member {boolean} clicked + * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback * @instance */ - PhraseMatchRule.prototype.negated = false; + AnswerFeedback.prototype.clicked = false; /** - * PhraseMatchRule config. - * @member {google.cloud.contactcenterinsights.v1.IPhraseMatchRuleConfig|null|undefined} config - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule + * AnswerFeedback displayed. + * @member {boolean} displayed + * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback * @instance */ - PhraseMatchRule.prototype.config = null; + AnswerFeedback.prototype.displayed = false; /** - * Creates a new PhraseMatchRule instance using the specified properties. + * Creates a new AnswerFeedback instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule + * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback * @static - * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchRule=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchRule} PhraseMatchRule instance + * @param {google.cloud.contactcenterinsights.v1.IAnswerFeedback=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.AnswerFeedback} AnswerFeedback instance */ - PhraseMatchRule.create = function create(properties) { - return new PhraseMatchRule(properties); + AnswerFeedback.create = function create(properties) { + return new AnswerFeedback(properties); }; /** - * Encodes the specified PhraseMatchRule message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchRule.verify|verify} messages. + * Encodes the specified AnswerFeedback message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnswerFeedback.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule + * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback * @static - * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchRule} message PhraseMatchRule message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IAnswerFeedback} message AnswerFeedback message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PhraseMatchRule.encode = function encode(message, writer) { + AnswerFeedback.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.query); - if (message.negated != null && Object.hasOwnProperty.call(message, "negated")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.negated); - if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig.encode(message.config, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.correctnessLevel != null && Object.hasOwnProperty.call(message, "correctnessLevel")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.correctnessLevel); + if (message.clicked != null && Object.hasOwnProperty.call(message, "clicked")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.clicked); + if (message.displayed != null && Object.hasOwnProperty.call(message, "displayed")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.displayed); return writer; }; /** - * Encodes the specified PhraseMatchRule message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchRule.verify|verify} messages. + * Encodes the specified AnswerFeedback message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnswerFeedback.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule + * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback * @static - * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchRule} message PhraseMatchRule message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IAnswerFeedback} message AnswerFeedback message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PhraseMatchRule.encodeDelimited = function encodeDelimited(message, writer) { + AnswerFeedback.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PhraseMatchRule message from the specified reader or buffer. + * Decodes an AnswerFeedback message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule + * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchRule} PhraseMatchRule + * @returns {google.cloud.contactcenterinsights.v1.AnswerFeedback} AnswerFeedback * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PhraseMatchRule.decode = function decode(reader, length) { + 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.contactcenterinsights.v1.PhraseMatchRule(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.AnswerFeedback(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.query = reader.string(); + message.correctnessLevel = reader.int32(); break; } case 2: { - message.negated = reader.bool(); + message.clicked = reader.bool(); break; } case 3: { - message.config = $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig.decode(reader, reader.uint32()); + message.displayed = reader.bool(); break; } default: @@ -33423,371 +54250,192 @@ }; /** - * Decodes a PhraseMatchRule message from the specified reader or buffer, length delimited. + * Decodes an AnswerFeedback message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule + * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchRule} PhraseMatchRule + * @returns {google.cloud.contactcenterinsights.v1.AnswerFeedback} AnswerFeedback * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PhraseMatchRule.decodeDelimited = function decodeDelimited(reader) { + AnswerFeedback.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PhraseMatchRule message. + * Verifies an AnswerFeedback message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule + * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PhraseMatchRule.verify = function verify(message) { + AnswerFeedback.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.query != null && message.hasOwnProperty("query")) - if (!$util.isString(message.query)) - return "query: string expected"; - if (message.negated != null && message.hasOwnProperty("negated")) - if (typeof message.negated !== "boolean") - return "negated: boolean expected"; - if (message.config != null && message.hasOwnProperty("config")) { - var error = $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig.verify(message.config); - if (error) - return "config." + error; - } + if (message.correctnessLevel != null && message.hasOwnProperty("correctnessLevel")) + switch (message.correctnessLevel) { + default: + return "correctnessLevel: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.clicked != null && message.hasOwnProperty("clicked")) + if (typeof message.clicked !== "boolean") + return "clicked: boolean expected"; + if (message.displayed != null && message.hasOwnProperty("displayed")) + if (typeof message.displayed !== "boolean") + return "displayed: boolean expected"; return null; }; /** - * Creates a PhraseMatchRule message from a plain object. Also converts values to their respective internal types. + * Creates an AnswerFeedback message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule + * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchRule} PhraseMatchRule + * @returns {google.cloud.contactcenterinsights.v1.AnswerFeedback} AnswerFeedback */ - PhraseMatchRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.PhraseMatchRule) + AnswerFeedback.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.AnswerFeedback) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.PhraseMatchRule(); - if (object.query != null) - message.query = String(object.query); - if (object.negated != null) - message.negated = Boolean(object.negated); - if (object.config != null) { - if (typeof object.config !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.PhraseMatchRule.config: object expected"); - message.config = $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig.fromObject(object.config); + var message = new $root.google.cloud.contactcenterinsights.v1.AnswerFeedback(); + switch (object.correctnessLevel) { + default: + if (typeof object.correctnessLevel === "number") { + message.correctnessLevel = object.correctnessLevel; + break; + } + break; + case "CORRECTNESS_LEVEL_UNSPECIFIED": + case 0: + message.correctnessLevel = 0; + break; + case "NOT_CORRECT": + case 1: + message.correctnessLevel = 1; + break; + case "PARTIALLY_CORRECT": + case 2: + message.correctnessLevel = 2; + break; + case "FULLY_CORRECT": + case 3: + message.correctnessLevel = 3; + break; } + if (object.clicked != null) + message.clicked = Boolean(object.clicked); + if (object.displayed != null) + message.displayed = Boolean(object.displayed); return message; }; /** - * Creates a plain object from a PhraseMatchRule message. Also converts values to other types if specified. + * Creates a plain object from an AnswerFeedback message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule + * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback * @static - * @param {google.cloud.contactcenterinsights.v1.PhraseMatchRule} message PhraseMatchRule + * @param {google.cloud.contactcenterinsights.v1.AnswerFeedback} message AnswerFeedback * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PhraseMatchRule.toObject = function toObject(message, options) { + AnswerFeedback.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.query = ""; - object.negated = false; - object.config = null; + object.correctnessLevel = options.enums === String ? "CORRECTNESS_LEVEL_UNSPECIFIED" : 0; + object.clicked = false; + object.displayed = false; } - if (message.query != null && message.hasOwnProperty("query")) - object.query = message.query; - if (message.negated != null && message.hasOwnProperty("negated")) - object.negated = message.negated; - if (message.config != null && message.hasOwnProperty("config")) - object.config = $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig.toObject(message.config, options); + if (message.correctnessLevel != null && message.hasOwnProperty("correctnessLevel")) + object.correctnessLevel = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.AnswerFeedback.CorrectnessLevel[message.correctnessLevel] === undefined ? message.correctnessLevel : $root.google.cloud.contactcenterinsights.v1.AnswerFeedback.CorrectnessLevel[message.correctnessLevel] : message.correctnessLevel; + if (message.clicked != null && message.hasOwnProperty("clicked")) + object.clicked = message.clicked; + if (message.displayed != null && message.hasOwnProperty("displayed")) + object.displayed = message.displayed; return object; }; /** - * Converts this PhraseMatchRule to JSON. + * Converts this AnswerFeedback to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule + * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback * @instance * @returns {Object.} JSON object */ - PhraseMatchRule.prototype.toJSON = function toJSON() { + AnswerFeedback.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PhraseMatchRule + * Gets the default type url for AnswerFeedback * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRule + * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PhraseMatchRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AnswerFeedback.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.PhraseMatchRule"; - }; - - return PhraseMatchRule; - })(); - - v1.PhraseMatchRuleConfig = (function() { - - /** - * Properties of a PhraseMatchRuleConfig. - * @memberof google.cloud.contactcenterinsights.v1 - * @interface IPhraseMatchRuleConfig - * @property {google.cloud.contactcenterinsights.v1.IExactMatchConfig|null} [exactMatchConfig] PhraseMatchRuleConfig exactMatchConfig - */ - - /** - * Constructs a new PhraseMatchRuleConfig. - * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a PhraseMatchRuleConfig. - * @implements IPhraseMatchRuleConfig - * @constructor - * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchRuleConfig=} [properties] Properties to set - */ - function PhraseMatchRuleConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PhraseMatchRuleConfig exactMatchConfig. - * @member {google.cloud.contactcenterinsights.v1.IExactMatchConfig|null|undefined} exactMatchConfig - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig - * @instance - */ - PhraseMatchRuleConfig.prototype.exactMatchConfig = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * PhraseMatchRuleConfig config. - * @member {"exactMatchConfig"|undefined} config - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig - * @instance - */ - Object.defineProperty(PhraseMatchRuleConfig.prototype, "config", { - get: $util.oneOfGetter($oneOfFields = ["exactMatchConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new PhraseMatchRuleConfig instance using the specified properties. - * @function create - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig - * @static - * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchRuleConfig=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig} PhraseMatchRuleConfig instance - */ - PhraseMatchRuleConfig.create = function create(properties) { - return new PhraseMatchRuleConfig(properties); - }; - - /** - * Encodes the specified PhraseMatchRuleConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig - * @static - * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchRuleConfig} message PhraseMatchRuleConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhraseMatchRuleConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.exactMatchConfig != null && Object.hasOwnProperty.call(message, "exactMatchConfig")) - $root.google.cloud.contactcenterinsights.v1.ExactMatchConfig.encode(message.exactMatchConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PhraseMatchRuleConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig - * @static - * @param {google.cloud.contactcenterinsights.v1.IPhraseMatchRuleConfig} message PhraseMatchRuleConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhraseMatchRuleConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PhraseMatchRuleConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig} PhraseMatchRuleConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhraseMatchRuleConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.exactMatchConfig = $root.google.cloud.contactcenterinsights.v1.ExactMatchConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PhraseMatchRuleConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig} PhraseMatchRuleConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhraseMatchRuleConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PhraseMatchRuleConfig message. - * @function verify - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PhraseMatchRuleConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.exactMatchConfig != null && message.hasOwnProperty("exactMatchConfig")) { - properties.config = 1; - { - var error = $root.google.cloud.contactcenterinsights.v1.ExactMatchConfig.verify(message.exactMatchConfig); - if (error) - return "exactMatchConfig." + error; - } - } - return null; - }; - - /** - * Creates a PhraseMatchRuleConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig} PhraseMatchRuleConfig - */ - PhraseMatchRuleConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig) - return object; - var message = new $root.google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig(); - if (object.exactMatchConfig != null) { - if (typeof object.exactMatchConfig !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig.exactMatchConfig: object expected"); - message.exactMatchConfig = $root.google.cloud.contactcenterinsights.v1.ExactMatchConfig.fromObject(object.exactMatchConfig); - } - return message; - }; - - /** - * Creates a plain object from a PhraseMatchRuleConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig - * @static - * @param {google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig} message PhraseMatchRuleConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PhraseMatchRuleConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.exactMatchConfig != null && message.hasOwnProperty("exactMatchConfig")) { - object.exactMatchConfig = $root.google.cloud.contactcenterinsights.v1.ExactMatchConfig.toObject(message.exactMatchConfig, options); - if (options.oneofs) - object.config = "exactMatchConfig"; - } - return object; - }; - - /** - * Converts this PhraseMatchRuleConfig to JSON. - * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig - * @instance - * @returns {Object.} JSON object - */ - PhraseMatchRuleConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.AnswerFeedback"; }; /** - * Gets the default type url for PhraseMatchRuleConfig - * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * CorrectnessLevel enum. + * @name google.cloud.contactcenterinsights.v1.AnswerFeedback.CorrectnessLevel + * @enum {number} + * @property {number} CORRECTNESS_LEVEL_UNSPECIFIED=0 CORRECTNESS_LEVEL_UNSPECIFIED value + * @property {number} NOT_CORRECT=1 NOT_CORRECT value + * @property {number} PARTIALLY_CORRECT=2 PARTIALLY_CORRECT value + * @property {number} FULLY_CORRECT=3 FULLY_CORRECT value */ - PhraseMatchRuleConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig"; - }; + AnswerFeedback.CorrectnessLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CORRECTNESS_LEVEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "NOT_CORRECT"] = 1; + values[valuesById[2] = "PARTIALLY_CORRECT"] = 2; + values[valuesById[3] = "FULLY_CORRECT"] = 3; + return values; + })(); - return PhraseMatchRuleConfig; + return AnswerFeedback; })(); - v1.ExactMatchConfig = (function() { + v1.ArticleSuggestionData = (function() { /** - * Properties of an ExactMatchConfig. + * Properties of an ArticleSuggestionData. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IExactMatchConfig - * @property {boolean|null} [caseSensitive] ExactMatchConfig caseSensitive + * @interface IArticleSuggestionData + * @property {string|null} [title] ArticleSuggestionData title + * @property {string|null} [uri] ArticleSuggestionData uri + * @property {number|null} [confidenceScore] ArticleSuggestionData confidenceScore + * @property {Object.|null} [metadata] ArticleSuggestionData metadata + * @property {string|null} [queryRecord] ArticleSuggestionData queryRecord + * @property {string|null} [source] ArticleSuggestionData source */ /** - * Constructs a new ExactMatchConfig. + * Constructs a new ArticleSuggestionData. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents an ExactMatchConfig. - * @implements IExactMatchConfig + * @classdesc Represents an ArticleSuggestionData. + * @implements IArticleSuggestionData * @constructor - * @param {google.cloud.contactcenterinsights.v1.IExactMatchConfig=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IArticleSuggestionData=} [properties] Properties to set */ - function ExactMatchConfig(properties) { + function ArticleSuggestionData(properties) { + this.metadata = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -33795,75 +54443,165 @@ } /** - * ExactMatchConfig caseSensitive. - * @member {boolean} caseSensitive - * @memberof google.cloud.contactcenterinsights.v1.ExactMatchConfig + * ArticleSuggestionData title. + * @member {string} title + * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData * @instance */ - ExactMatchConfig.prototype.caseSensitive = false; + ArticleSuggestionData.prototype.title = ""; /** - * Creates a new ExactMatchConfig instance using the specified properties. + * ArticleSuggestionData uri. + * @member {string} uri + * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData + * @instance + */ + ArticleSuggestionData.prototype.uri = ""; + + /** + * ArticleSuggestionData confidenceScore. + * @member {number} confidenceScore + * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData + * @instance + */ + ArticleSuggestionData.prototype.confidenceScore = 0; + + /** + * ArticleSuggestionData metadata. + * @member {Object.} metadata + * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData + * @instance + */ + ArticleSuggestionData.prototype.metadata = $util.emptyObject; + + /** + * ArticleSuggestionData queryRecord. + * @member {string} queryRecord + * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData + * @instance + */ + ArticleSuggestionData.prototype.queryRecord = ""; + + /** + * ArticleSuggestionData source. + * @member {string} source + * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData + * @instance + */ + ArticleSuggestionData.prototype.source = ""; + + /** + * Creates a new ArticleSuggestionData instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.ExactMatchConfig + * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData * @static - * @param {google.cloud.contactcenterinsights.v1.IExactMatchConfig=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.ExactMatchConfig} ExactMatchConfig instance + * @param {google.cloud.contactcenterinsights.v1.IArticleSuggestionData=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ArticleSuggestionData} ArticleSuggestionData instance */ - ExactMatchConfig.create = function create(properties) { - return new ExactMatchConfig(properties); + ArticleSuggestionData.create = function create(properties) { + return new ArticleSuggestionData(properties); }; /** - * Encodes the specified ExactMatchConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExactMatchConfig.verify|verify} messages. + * Encodes the specified ArticleSuggestionData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ArticleSuggestionData.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.ExactMatchConfig + * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData * @static - * @param {google.cloud.contactcenterinsights.v1.IExactMatchConfig} message ExactMatchConfig message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IArticleSuggestionData} message ArticleSuggestionData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExactMatchConfig.encode = function encode(message, writer) { + ArticleSuggestionData.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.caseSensitive); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.confidenceScore != null && Object.hasOwnProperty.call(message, "confidenceScore")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.confidenceScore); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); + if (message.queryRecord != null && Object.hasOwnProperty.call(message, "queryRecord")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.queryRecord); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.source); return writer; }; /** - * Encodes the specified ExactMatchConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExactMatchConfig.verify|verify} messages. + * Encodes the specified ArticleSuggestionData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ArticleSuggestionData.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.ExactMatchConfig + * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData * @static - * @param {google.cloud.contactcenterinsights.v1.IExactMatchConfig} message ExactMatchConfig message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IArticleSuggestionData} message ArticleSuggestionData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExactMatchConfig.encodeDelimited = function encodeDelimited(message, writer) { + ArticleSuggestionData.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExactMatchConfig message from the specified reader or buffer. + * Decodes an ArticleSuggestionData message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.ExactMatchConfig + * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.ExactMatchConfig} ExactMatchConfig + * @returns {google.cloud.contactcenterinsights.v1.ArticleSuggestionData} ArticleSuggestionData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExactMatchConfig.decode = function decode(reader, length) { + ArticleSuggestionData.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ExactMatchConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ArticleSuggestionData(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.caseSensitive = reader.bool(); + message.title = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.confidenceScore = reader.float(); + break; + } + case 4: { + if (message.metadata === $util.emptyObject) + message.metadata = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.metadata[key] = value; + break; + } + case 5: { + message.queryRecord = reader.string(); + break; + } + case 6: { + message.source = reader.string(); break; } default: @@ -33875,131 +54613,184 @@ }; /** - * Decodes an ExactMatchConfig message from the specified reader or buffer, length delimited. + * Decodes an ArticleSuggestionData message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.ExactMatchConfig + * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.ExactMatchConfig} ExactMatchConfig + * @returns {google.cloud.contactcenterinsights.v1.ArticleSuggestionData} ArticleSuggestionData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExactMatchConfig.decodeDelimited = function decodeDelimited(reader) { + ArticleSuggestionData.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExactMatchConfig message. + * Verifies an ArticleSuggestionData message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.ExactMatchConfig + * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExactMatchConfig.verify = function verify(message) { + ArticleSuggestionData.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) - if (typeof message.caseSensitive !== "boolean") - return "caseSensitive: boolean expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.confidenceScore != null && message.hasOwnProperty("confidenceScore")) + if (typeof message.confidenceScore !== "number") + return "confidenceScore: number expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (!$util.isObject(message.metadata)) + return "metadata: object expected"; + var key = Object.keys(message.metadata); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.metadata[key[i]])) + return "metadata: string{k:string} expected"; + } + if (message.queryRecord != null && message.hasOwnProperty("queryRecord")) + if (!$util.isString(message.queryRecord)) + return "queryRecord: string expected"; + if (message.source != null && message.hasOwnProperty("source")) + if (!$util.isString(message.source)) + return "source: string expected"; return null; }; /** - * Creates an ExactMatchConfig message from a plain object. Also converts values to their respective internal types. + * Creates an ArticleSuggestionData message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.ExactMatchConfig + * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.ExactMatchConfig} ExactMatchConfig + * @returns {google.cloud.contactcenterinsights.v1.ArticleSuggestionData} ArticleSuggestionData */ - ExactMatchConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.ExactMatchConfig) + ArticleSuggestionData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ArticleSuggestionData) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.ExactMatchConfig(); - if (object.caseSensitive != null) - message.caseSensitive = Boolean(object.caseSensitive); + var message = new $root.google.cloud.contactcenterinsights.v1.ArticleSuggestionData(); + if (object.title != null) + message.title = String(object.title); + if (object.uri != null) + message.uri = String(object.uri); + if (object.confidenceScore != null) + message.confidenceScore = Number(object.confidenceScore); + if (object.metadata) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ArticleSuggestionData.metadata: object expected"); + message.metadata = {}; + for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) + message.metadata[keys[i]] = String(object.metadata[keys[i]]); + } + if (object.queryRecord != null) + message.queryRecord = String(object.queryRecord); + if (object.source != null) + message.source = String(object.source); return message; }; /** - * Creates a plain object from an ExactMatchConfig message. Also converts values to other types if specified. + * Creates a plain object from an ArticleSuggestionData message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.ExactMatchConfig + * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData * @static - * @param {google.cloud.contactcenterinsights.v1.ExactMatchConfig} message ExactMatchConfig + * @param {google.cloud.contactcenterinsights.v1.ArticleSuggestionData} message ArticleSuggestionData * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExactMatchConfig.toObject = function toObject(message, options) { + ArticleSuggestionData.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.caseSensitive = false; - if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) - object.caseSensitive = message.caseSensitive; + if (options.objects || options.defaults) + object.metadata = {}; + if (options.defaults) { + object.title = ""; + object.uri = ""; + object.confidenceScore = 0; + object.queryRecord = ""; + object.source = ""; + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.confidenceScore != null && message.hasOwnProperty("confidenceScore")) + object.confidenceScore = options.json && !isFinite(message.confidenceScore) ? String(message.confidenceScore) : message.confidenceScore; + var keys2; + if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { + object.metadata = {}; + for (var j = 0; j < keys2.length; ++j) + object.metadata[keys2[j]] = message.metadata[keys2[j]]; + } + if (message.queryRecord != null && message.hasOwnProperty("queryRecord")) + object.queryRecord = message.queryRecord; + if (message.source != null && message.hasOwnProperty("source")) + object.source = message.source; return object; }; /** - * Converts this ExactMatchConfig to JSON. + * Converts this ArticleSuggestionData to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.ExactMatchConfig + * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData * @instance * @returns {Object.} JSON object */ - ExactMatchConfig.prototype.toJSON = function toJSON() { + ArticleSuggestionData.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExactMatchConfig + * Gets the default type url for ArticleSuggestionData * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.ExactMatchConfig + * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExactMatchConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ArticleSuggestionData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ExactMatchConfig"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ArticleSuggestionData"; }; - return ExactMatchConfig; + return ArticleSuggestionData; })(); - v1.Settings = (function() { + v1.FaqAnswerData = (function() { /** - * Properties of a Settings. + * Properties of a FaqAnswerData. * @memberof google.cloud.contactcenterinsights.v1 - * @interface ISettings - * @property {string|null} [name] Settings name - * @property {google.protobuf.ITimestamp|null} [createTime] Settings createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Settings updateTime - * @property {string|null} [languageCode] Settings languageCode - * @property {google.protobuf.IDuration|null} [conversationTtl] Settings conversationTtl - * @property {Object.|null} [pubsubNotificationSettings] Settings pubsubNotificationSettings - * @property {google.cloud.contactcenterinsights.v1.Settings.IAnalysisConfig|null} [analysisConfig] Settings analysisConfig - * @property {google.cloud.contactcenterinsights.v1.IRedactionConfig|null} [redactionConfig] Settings redactionConfig - * @property {google.cloud.contactcenterinsights.v1.ISpeechConfig|null} [speechConfig] Settings speechConfig + * @interface IFaqAnswerData + * @property {string|null} [answer] FaqAnswerData answer + * @property {number|null} [confidenceScore] FaqAnswerData confidenceScore + * @property {string|null} [question] FaqAnswerData question + * @property {Object.|null} [metadata] FaqAnswerData metadata + * @property {string|null} [queryRecord] FaqAnswerData queryRecord + * @property {string|null} [source] FaqAnswerData source */ /** - * Constructs a new Settings. + * Constructs a new FaqAnswerData. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a Settings. - * @implements ISettings + * @classdesc Represents a FaqAnswerData. + * @implements IFaqAnswerData * @constructor - * @param {google.cloud.contactcenterinsights.v1.ISettings=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IFaqAnswerData=} [properties] Properties to set */ - function Settings(properties) { - this.pubsubNotificationSettings = {}; + function FaqAnswerData(properties) { + this.metadata = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34007,177 +54798,139 @@ } /** - * Settings name. - * @member {string} name - * @memberof google.cloud.contactcenterinsights.v1.Settings - * @instance - */ - Settings.prototype.name = ""; - - /** - * Settings createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.contactcenterinsights.v1.Settings - * @instance - */ - Settings.prototype.createTime = null; - - /** - * Settings updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.contactcenterinsights.v1.Settings - * @instance - */ - Settings.prototype.updateTime = null; - - /** - * Settings languageCode. - * @member {string} languageCode - * @memberof google.cloud.contactcenterinsights.v1.Settings + * FaqAnswerData answer. + * @member {string} answer + * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData * @instance */ - Settings.prototype.languageCode = ""; + FaqAnswerData.prototype.answer = ""; /** - * Settings conversationTtl. - * @member {google.protobuf.IDuration|null|undefined} conversationTtl - * @memberof google.cloud.contactcenterinsights.v1.Settings + * FaqAnswerData confidenceScore. + * @member {number} confidenceScore + * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData * @instance */ - Settings.prototype.conversationTtl = null; + FaqAnswerData.prototype.confidenceScore = 0; /** - * Settings pubsubNotificationSettings. - * @member {Object.} pubsubNotificationSettings - * @memberof google.cloud.contactcenterinsights.v1.Settings + * FaqAnswerData question. + * @member {string} question + * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData * @instance */ - Settings.prototype.pubsubNotificationSettings = $util.emptyObject; + FaqAnswerData.prototype.question = ""; /** - * Settings analysisConfig. - * @member {google.cloud.contactcenterinsights.v1.Settings.IAnalysisConfig|null|undefined} analysisConfig - * @memberof google.cloud.contactcenterinsights.v1.Settings + * FaqAnswerData metadata. + * @member {Object.} metadata + * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData * @instance */ - Settings.prototype.analysisConfig = null; + FaqAnswerData.prototype.metadata = $util.emptyObject; /** - * Settings redactionConfig. - * @member {google.cloud.contactcenterinsights.v1.IRedactionConfig|null|undefined} redactionConfig - * @memberof google.cloud.contactcenterinsights.v1.Settings + * FaqAnswerData queryRecord. + * @member {string} queryRecord + * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData * @instance */ - Settings.prototype.redactionConfig = null; + FaqAnswerData.prototype.queryRecord = ""; /** - * Settings speechConfig. - * @member {google.cloud.contactcenterinsights.v1.ISpeechConfig|null|undefined} speechConfig - * @memberof google.cloud.contactcenterinsights.v1.Settings + * FaqAnswerData source. + * @member {string} source + * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData * @instance */ - Settings.prototype.speechConfig = null; + FaqAnswerData.prototype.source = ""; /** - * Creates a new Settings instance using the specified properties. + * Creates a new FaqAnswerData instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.Settings + * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData * @static - * @param {google.cloud.contactcenterinsights.v1.ISettings=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.Settings} Settings instance + * @param {google.cloud.contactcenterinsights.v1.IFaqAnswerData=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.FaqAnswerData} FaqAnswerData instance */ - Settings.create = function create(properties) { - return new Settings(properties); + FaqAnswerData.create = function create(properties) { + return new FaqAnswerData(properties); }; /** - * Encodes the specified Settings message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Settings.verify|verify} messages. + * Encodes the specified FaqAnswerData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.FaqAnswerData.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.Settings + * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData * @static - * @param {google.cloud.contactcenterinsights.v1.ISettings} message Settings message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IFaqAnswerData} message FaqAnswerData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Settings.encode = function encode(message, writer) { + FaqAnswerData.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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, 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.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.languageCode); - if (message.conversationTtl != null && Object.hasOwnProperty.call(message, "conversationTtl")) - $root.google.protobuf.Duration.encode(message.conversationTtl, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.pubsubNotificationSettings != null && Object.hasOwnProperty.call(message, "pubsubNotificationSettings")) - for (var keys = Object.keys(message.pubsubNotificationSettings), i = 0; i < keys.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.pubsubNotificationSettings[keys[i]]).ldelim(); - if (message.analysisConfig != null && Object.hasOwnProperty.call(message, "analysisConfig")) - $root.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.encode(message.analysisConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.redactionConfig != null && Object.hasOwnProperty.call(message, "redactionConfig")) - $root.google.cloud.contactcenterinsights.v1.RedactionConfig.encode(message.redactionConfig, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.speechConfig != null && Object.hasOwnProperty.call(message, "speechConfig")) - $root.google.cloud.contactcenterinsights.v1.SpeechConfig.encode(message.speechConfig, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.answer != null && Object.hasOwnProperty.call(message, "answer")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.answer); + if (message.confidenceScore != null && Object.hasOwnProperty.call(message, "confidenceScore")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidenceScore); + if (message.question != null && Object.hasOwnProperty.call(message, "question")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.question); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); + if (message.queryRecord != null && Object.hasOwnProperty.call(message, "queryRecord")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.queryRecord); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.source); return writer; }; /** - * Encodes the specified Settings message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Settings.verify|verify} messages. + * Encodes the specified FaqAnswerData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.FaqAnswerData.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.Settings + * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData * @static - * @param {google.cloud.contactcenterinsights.v1.ISettings} message Settings message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IFaqAnswerData} message FaqAnswerData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Settings.encodeDelimited = function encodeDelimited(message, writer) { + FaqAnswerData.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Settings message from the specified reader or buffer. + * Decodes a FaqAnswerData message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.Settings + * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.Settings} Settings + * @returns {google.cloud.contactcenterinsights.v1.FaqAnswerData} FaqAnswerData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Settings.decode = function decode(reader, length) { + FaqAnswerData.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Settings(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.FaqAnswerData(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.answer = reader.string(); break; } case 2: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.confidenceScore = reader.float(); break; } case 3: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.question = reader.string(); break; } case 4: { - message.languageCode = reader.string(); - break; - } - case 5: { - message.conversationTtl = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 6: { - if (message.pubsubNotificationSettings === $util.emptyObject) - message.pubsubNotificationSettings = {}; + if (message.metadata === $util.emptyObject) + message.metadata = {}; var end2 = reader.uint32() + reader.pos; key = ""; value = ""; @@ -34195,19 +54948,15 @@ break; } } - message.pubsubNotificationSettings[key] = value; - break; - } - case 7: { - message.analysisConfig = $root.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.decode(reader, reader.uint32()); + message.metadata[key] = value; break; } - case 10: { - message.redactionConfig = $root.google.cloud.contactcenterinsights.v1.RedactionConfig.decode(reader, reader.uint32()); + case 5: { + message.queryRecord = reader.string(); break; } - case 11: { - message.speechConfig = $root.google.cloud.contactcenterinsights.v1.SpeechConfig.decode(reader, reader.uint32()); + case 6: { + message.source = reader.string(); break; } default: @@ -34219,488 +54968,182 @@ }; /** - * Decodes a Settings message from the specified reader or buffer, length delimited. + * Decodes a FaqAnswerData message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.Settings + * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.Settings} Settings + * @returns {google.cloud.contactcenterinsights.v1.FaqAnswerData} FaqAnswerData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Settings.decodeDelimited = function decodeDelimited(reader) { + FaqAnswerData.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Settings message. + * Verifies a FaqAnswerData message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.Settings + * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Settings.verify = function verify(message) { + FaqAnswerData.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.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - if (message.conversationTtl != null && message.hasOwnProperty("conversationTtl")) { - var error = $root.google.protobuf.Duration.verify(message.conversationTtl); - if (error) - return "conversationTtl." + error; - } - if (message.pubsubNotificationSettings != null && message.hasOwnProperty("pubsubNotificationSettings")) { - if (!$util.isObject(message.pubsubNotificationSettings)) - return "pubsubNotificationSettings: object expected"; - var key = Object.keys(message.pubsubNotificationSettings); + if (message.answer != null && message.hasOwnProperty("answer")) + if (!$util.isString(message.answer)) + return "answer: string expected"; + if (message.confidenceScore != null && message.hasOwnProperty("confidenceScore")) + if (typeof message.confidenceScore !== "number") + return "confidenceScore: number expected"; + if (message.question != null && message.hasOwnProperty("question")) + if (!$util.isString(message.question)) + return "question: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (!$util.isObject(message.metadata)) + return "metadata: object expected"; + var key = Object.keys(message.metadata); for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.pubsubNotificationSettings[key[i]])) - return "pubsubNotificationSettings: string{k:string} expected"; - } - if (message.analysisConfig != null && message.hasOwnProperty("analysisConfig")) { - var error = $root.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.verify(message.analysisConfig); - if (error) - return "analysisConfig." + error; - } - if (message.redactionConfig != null && message.hasOwnProperty("redactionConfig")) { - var error = $root.google.cloud.contactcenterinsights.v1.RedactionConfig.verify(message.redactionConfig); - if (error) - return "redactionConfig." + error; - } - if (message.speechConfig != null && message.hasOwnProperty("speechConfig")) { - var error = $root.google.cloud.contactcenterinsights.v1.SpeechConfig.verify(message.speechConfig); - if (error) - return "speechConfig." + error; + if (!$util.isString(message.metadata[key[i]])) + return "metadata: string{k:string} expected"; } + if (message.queryRecord != null && message.hasOwnProperty("queryRecord")) + if (!$util.isString(message.queryRecord)) + return "queryRecord: string expected"; + if (message.source != null && message.hasOwnProperty("source")) + if (!$util.isString(message.source)) + return "source: string expected"; return null; }; /** - * Creates a Settings message from a plain object. Also converts values to their respective internal types. + * Creates a FaqAnswerData message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.Settings + * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.Settings} Settings + * @returns {google.cloud.contactcenterinsights.v1.FaqAnswerData} FaqAnswerData */ - Settings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.Settings) + FaqAnswerData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.FaqAnswerData) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.Settings(); - if (object.name != null) - message.name = String(object.name); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Settings.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Settings.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - if (object.conversationTtl != null) { - if (typeof object.conversationTtl !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Settings.conversationTtl: object expected"); - message.conversationTtl = $root.google.protobuf.Duration.fromObject(object.conversationTtl); - } - if (object.pubsubNotificationSettings) { - if (typeof object.pubsubNotificationSettings !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Settings.pubsubNotificationSettings: object expected"); - message.pubsubNotificationSettings = {}; - for (var keys = Object.keys(object.pubsubNotificationSettings), i = 0; i < keys.length; ++i) - message.pubsubNotificationSettings[keys[i]] = String(object.pubsubNotificationSettings[keys[i]]); - } - if (object.analysisConfig != null) { - if (typeof object.analysisConfig !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Settings.analysisConfig: object expected"); - message.analysisConfig = $root.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.fromObject(object.analysisConfig); - } - if (object.redactionConfig != null) { - if (typeof object.redactionConfig !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Settings.redactionConfig: object expected"); - message.redactionConfig = $root.google.cloud.contactcenterinsights.v1.RedactionConfig.fromObject(object.redactionConfig); - } - if (object.speechConfig != null) { - if (typeof object.speechConfig !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Settings.speechConfig: object expected"); - message.speechConfig = $root.google.cloud.contactcenterinsights.v1.SpeechConfig.fromObject(object.speechConfig); + var message = new $root.google.cloud.contactcenterinsights.v1.FaqAnswerData(); + if (object.answer != null) + message.answer = String(object.answer); + if (object.confidenceScore != null) + message.confidenceScore = Number(object.confidenceScore); + if (object.question != null) + message.question = String(object.question); + if (object.metadata) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.FaqAnswerData.metadata: object expected"); + message.metadata = {}; + for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) + message.metadata[keys[i]] = String(object.metadata[keys[i]]); } + if (object.queryRecord != null) + message.queryRecord = String(object.queryRecord); + if (object.source != null) + message.source = String(object.source); return message; }; /** - * Creates a plain object from a Settings message. Also converts values to other types if specified. + * Creates a plain object from a FaqAnswerData message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.Settings + * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData * @static - * @param {google.cloud.contactcenterinsights.v1.Settings} message Settings + * @param {google.cloud.contactcenterinsights.v1.FaqAnswerData} message FaqAnswerData * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Settings.toObject = function toObject(message, options) { + FaqAnswerData.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.objects || options.defaults) - object.pubsubNotificationSettings = {}; + object.metadata = {}; if (options.defaults) { - object.name = ""; - object.createTime = null; - object.updateTime = null; - object.languageCode = ""; - object.conversationTtl = null; - object.analysisConfig = null; - object.redactionConfig = null; - object.speechConfig = null; + object.answer = ""; + object.confidenceScore = 0; + object.question = ""; + object.queryRecord = ""; + object.source = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - if (message.conversationTtl != null && message.hasOwnProperty("conversationTtl")) - object.conversationTtl = $root.google.protobuf.Duration.toObject(message.conversationTtl, options); + if (message.answer != null && message.hasOwnProperty("answer")) + object.answer = message.answer; + if (message.confidenceScore != null && message.hasOwnProperty("confidenceScore")) + object.confidenceScore = options.json && !isFinite(message.confidenceScore) ? String(message.confidenceScore) : message.confidenceScore; + if (message.question != null && message.hasOwnProperty("question")) + object.question = message.question; var keys2; - if (message.pubsubNotificationSettings && (keys2 = Object.keys(message.pubsubNotificationSettings)).length) { - object.pubsubNotificationSettings = {}; + if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { + object.metadata = {}; for (var j = 0; j < keys2.length; ++j) - object.pubsubNotificationSettings[keys2[j]] = message.pubsubNotificationSettings[keys2[j]]; + object.metadata[keys2[j]] = message.metadata[keys2[j]]; } - if (message.analysisConfig != null && message.hasOwnProperty("analysisConfig")) - object.analysisConfig = $root.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.toObject(message.analysisConfig, options); - if (message.redactionConfig != null && message.hasOwnProperty("redactionConfig")) - object.redactionConfig = $root.google.cloud.contactcenterinsights.v1.RedactionConfig.toObject(message.redactionConfig, options); - if (message.speechConfig != null && message.hasOwnProperty("speechConfig")) - object.speechConfig = $root.google.cloud.contactcenterinsights.v1.SpeechConfig.toObject(message.speechConfig, options); + if (message.queryRecord != null && message.hasOwnProperty("queryRecord")) + object.queryRecord = message.queryRecord; + if (message.source != null && message.hasOwnProperty("source")) + object.source = message.source; return object; }; /** - * Converts this Settings to JSON. + * Converts this FaqAnswerData to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.Settings + * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData * @instance * @returns {Object.} JSON object */ - Settings.prototype.toJSON = function toJSON() { + FaqAnswerData.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Settings + * Gets the default type url for FaqAnswerData * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.Settings + * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Settings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FaqAnswerData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Settings"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.FaqAnswerData"; }; - Settings.AnalysisConfig = (function() { - - /** - * Properties of an AnalysisConfig. - * @memberof google.cloud.contactcenterinsights.v1.Settings - * @interface IAnalysisConfig - * @property {number|null} [runtimeIntegrationAnalysisPercentage] AnalysisConfig runtimeIntegrationAnalysisPercentage - * @property {number|null} [uploadConversationAnalysisPercentage] AnalysisConfig uploadConversationAnalysisPercentage - * @property {google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null} [annotatorSelector] AnalysisConfig annotatorSelector - */ - - /** - * Constructs a new AnalysisConfig. - * @memberof google.cloud.contactcenterinsights.v1.Settings - * @classdesc Represents an AnalysisConfig. - * @implements IAnalysisConfig - * @constructor - * @param {google.cloud.contactcenterinsights.v1.Settings.IAnalysisConfig=} [properties] Properties to set - */ - function AnalysisConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AnalysisConfig runtimeIntegrationAnalysisPercentage. - * @member {number} runtimeIntegrationAnalysisPercentage - * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig - * @instance - */ - AnalysisConfig.prototype.runtimeIntegrationAnalysisPercentage = 0; - - /** - * AnalysisConfig uploadConversationAnalysisPercentage. - * @member {number} uploadConversationAnalysisPercentage - * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig - * @instance - */ - AnalysisConfig.prototype.uploadConversationAnalysisPercentage = 0; - - /** - * AnalysisConfig annotatorSelector. - * @member {google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null|undefined} annotatorSelector - * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig - * @instance - */ - AnalysisConfig.prototype.annotatorSelector = null; - - /** - * Creates a new AnalysisConfig instance using the specified properties. - * @function create - * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig - * @static - * @param {google.cloud.contactcenterinsights.v1.Settings.IAnalysisConfig=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig} AnalysisConfig instance - */ - AnalysisConfig.create = function create(properties) { - return new AnalysisConfig(properties); - }; - - /** - * Encodes the specified AnalysisConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig - * @static - * @param {google.cloud.contactcenterinsights.v1.Settings.IAnalysisConfig} message AnalysisConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AnalysisConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.runtimeIntegrationAnalysisPercentage != null && Object.hasOwnProperty.call(message, "runtimeIntegrationAnalysisPercentage")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.runtimeIntegrationAnalysisPercentage); - if (message.annotatorSelector != null && Object.hasOwnProperty.call(message, "annotatorSelector")) - $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.encode(message.annotatorSelector, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.uploadConversationAnalysisPercentage != null && Object.hasOwnProperty.call(message, "uploadConversationAnalysisPercentage")) - writer.uint32(/* id 6, wireType 1 =*/49).double(message.uploadConversationAnalysisPercentage); - return writer; - }; - - /** - * Encodes the specified AnalysisConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig - * @static - * @param {google.cloud.contactcenterinsights.v1.Settings.IAnalysisConfig} message AnalysisConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AnalysisConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AnalysisConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig} AnalysisConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AnalysisConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.runtimeIntegrationAnalysisPercentage = reader.double(); - break; - } - case 6: { - message.uploadConversationAnalysisPercentage = reader.double(); - break; - } - case 5: { - message.annotatorSelector = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AnalysisConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig} AnalysisConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AnalysisConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AnalysisConfig message. - * @function verify - * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AnalysisConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.runtimeIntegrationAnalysisPercentage != null && message.hasOwnProperty("runtimeIntegrationAnalysisPercentage")) - if (typeof message.runtimeIntegrationAnalysisPercentage !== "number") - return "runtimeIntegrationAnalysisPercentage: number expected"; - if (message.uploadConversationAnalysisPercentage != null && message.hasOwnProperty("uploadConversationAnalysisPercentage")) - if (typeof message.uploadConversationAnalysisPercentage !== "number") - return "uploadConversationAnalysisPercentage: number expected"; - if (message.annotatorSelector != null && message.hasOwnProperty("annotatorSelector")) { - var error = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.verify(message.annotatorSelector); - if (error) - return "annotatorSelector." + error; - } - return null; - }; - - /** - * Creates an AnalysisConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig} AnalysisConfig - */ - AnalysisConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig) - return object; - var message = new $root.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig(); - if (object.runtimeIntegrationAnalysisPercentage != null) - message.runtimeIntegrationAnalysisPercentage = Number(object.runtimeIntegrationAnalysisPercentage); - if (object.uploadConversationAnalysisPercentage != null) - message.uploadConversationAnalysisPercentage = Number(object.uploadConversationAnalysisPercentage); - if (object.annotatorSelector != null) { - if (typeof object.annotatorSelector !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.annotatorSelector: object expected"); - message.annotatorSelector = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.fromObject(object.annotatorSelector); - } - return message; - }; - - /** - * Creates a plain object from an AnalysisConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig - * @static - * @param {google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig} message AnalysisConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AnalysisConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.runtimeIntegrationAnalysisPercentage = 0; - object.annotatorSelector = null; - object.uploadConversationAnalysisPercentage = 0; - } - if (message.runtimeIntegrationAnalysisPercentage != null && message.hasOwnProperty("runtimeIntegrationAnalysisPercentage")) - object.runtimeIntegrationAnalysisPercentage = options.json && !isFinite(message.runtimeIntegrationAnalysisPercentage) ? String(message.runtimeIntegrationAnalysisPercentage) : message.runtimeIntegrationAnalysisPercentage; - if (message.annotatorSelector != null && message.hasOwnProperty("annotatorSelector")) - object.annotatorSelector = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.toObject(message.annotatorSelector, options); - if (message.uploadConversationAnalysisPercentage != null && message.hasOwnProperty("uploadConversationAnalysisPercentage")) - object.uploadConversationAnalysisPercentage = options.json && !isFinite(message.uploadConversationAnalysisPercentage) ? String(message.uploadConversationAnalysisPercentage) : message.uploadConversationAnalysisPercentage; - return object; - }; - - /** - * Converts this AnalysisConfig to JSON. - * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig - * @instance - * @returns {Object.} JSON object - */ - AnalysisConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AnalysisConfig - * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AnalysisConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig"; - }; - - return AnalysisConfig; - })(); - - return Settings; + return FaqAnswerData; })(); - v1.EncryptionSpec = (function() { + v1.SmartReplyData = (function() { /** - * Properties of an EncryptionSpec. + * Properties of a SmartReplyData. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IEncryptionSpec - * @property {string|null} [name] EncryptionSpec name - * @property {string|null} [kmsKey] EncryptionSpec kmsKey + * @interface ISmartReplyData + * @property {string|null} [reply] SmartReplyData reply + * @property {number|null} [confidenceScore] SmartReplyData confidenceScore + * @property {Object.|null} [metadata] SmartReplyData metadata + * @property {string|null} [queryRecord] SmartReplyData queryRecord */ /** - * Constructs a new EncryptionSpec. + * Constructs a new SmartReplyData. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents an EncryptionSpec. - * @implements IEncryptionSpec + * @classdesc Represents a SmartReplyData. + * @implements ISmartReplyData * @constructor - * @param {google.cloud.contactcenterinsights.v1.IEncryptionSpec=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.ISmartReplyData=} [properties] Properties to set */ - function EncryptionSpec(properties) { + function SmartReplyData(properties) { + this.metadata = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34708,89 +55151,137 @@ } /** - * EncryptionSpec name. - * @member {string} name - * @memberof google.cloud.contactcenterinsights.v1.EncryptionSpec + * SmartReplyData reply. + * @member {string} reply + * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData + * @instance + */ + SmartReplyData.prototype.reply = ""; + + /** + * SmartReplyData confidenceScore. + * @member {number} confidenceScore + * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData + * @instance + */ + SmartReplyData.prototype.confidenceScore = 0; + + /** + * SmartReplyData metadata. + * @member {Object.} metadata + * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData * @instance */ - EncryptionSpec.prototype.name = ""; + SmartReplyData.prototype.metadata = $util.emptyObject; /** - * EncryptionSpec kmsKey. - * @member {string} kmsKey - * @memberof google.cloud.contactcenterinsights.v1.EncryptionSpec + * SmartReplyData queryRecord. + * @member {string} queryRecord + * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData * @instance */ - EncryptionSpec.prototype.kmsKey = ""; + SmartReplyData.prototype.queryRecord = ""; /** - * Creates a new EncryptionSpec instance using the specified properties. + * Creates a new SmartReplyData instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.EncryptionSpec + * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData * @static - * @param {google.cloud.contactcenterinsights.v1.IEncryptionSpec=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.EncryptionSpec} EncryptionSpec instance + * @param {google.cloud.contactcenterinsights.v1.ISmartReplyData=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.SmartReplyData} SmartReplyData instance */ - EncryptionSpec.create = function create(properties) { - return new EncryptionSpec(properties); + SmartReplyData.create = function create(properties) { + return new SmartReplyData(properties); }; /** - * Encodes the specified EncryptionSpec message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.EncryptionSpec.verify|verify} messages. + * Encodes the specified SmartReplyData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SmartReplyData.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.EncryptionSpec + * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData * @static - * @param {google.cloud.contactcenterinsights.v1.IEncryptionSpec} message EncryptionSpec message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.ISmartReplyData} message SmartReplyData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EncryptionSpec.encode = function encode(message, writer) { + SmartReplyData.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.kmsKey != null && Object.hasOwnProperty.call(message, "kmsKey")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.kmsKey); + if (message.reply != null && Object.hasOwnProperty.call(message, "reply")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.reply); + if (message.confidenceScore != null && Object.hasOwnProperty.call(message, "confidenceScore")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.confidenceScore); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); + if (message.queryRecord != null && Object.hasOwnProperty.call(message, "queryRecord")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.queryRecord); return writer; }; /** - * Encodes the specified EncryptionSpec message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.EncryptionSpec.verify|verify} messages. + * Encodes the specified SmartReplyData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SmartReplyData.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.EncryptionSpec + * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData * @static - * @param {google.cloud.contactcenterinsights.v1.IEncryptionSpec} message EncryptionSpec message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.ISmartReplyData} message SmartReplyData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EncryptionSpec.encodeDelimited = function encodeDelimited(message, writer) { + SmartReplyData.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EncryptionSpec message from the specified reader or buffer. + * Decodes a SmartReplyData message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.EncryptionSpec + * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.EncryptionSpec} EncryptionSpec + * @returns {google.cloud.contactcenterinsights.v1.SmartReplyData} SmartReplyData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EncryptionSpec.decode = function decode(reader, length) { + SmartReplyData.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.EncryptionSpec(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.SmartReplyData(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.reply = reader.string(); break; } case 2: { - message.kmsKey = reader.string(); + message.confidenceScore = reader.double(); + break; + } + case 3: { + if (message.metadata === $util.emptyObject) + message.metadata = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.metadata[key] = value; + break; + } + case 4: { + message.queryRecord = reader.string(); break; } default: @@ -34802,132 +55293,166 @@ }; /** - * Decodes an EncryptionSpec message from the specified reader or buffer, length delimited. + * Decodes a SmartReplyData message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.EncryptionSpec + * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.EncryptionSpec} EncryptionSpec + * @returns {google.cloud.contactcenterinsights.v1.SmartReplyData} SmartReplyData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EncryptionSpec.decodeDelimited = function decodeDelimited(reader) { + SmartReplyData.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EncryptionSpec message. + * Verifies a SmartReplyData message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.EncryptionSpec + * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EncryptionSpec.verify = function verify(message) { + SmartReplyData.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.kmsKey != null && message.hasOwnProperty("kmsKey")) - if (!$util.isString(message.kmsKey)) - return "kmsKey: string expected"; + if (message.reply != null && message.hasOwnProperty("reply")) + if (!$util.isString(message.reply)) + return "reply: string expected"; + if (message.confidenceScore != null && message.hasOwnProperty("confidenceScore")) + if (typeof message.confidenceScore !== "number") + return "confidenceScore: number expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (!$util.isObject(message.metadata)) + return "metadata: object expected"; + var key = Object.keys(message.metadata); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.metadata[key[i]])) + return "metadata: string{k:string} expected"; + } + if (message.queryRecord != null && message.hasOwnProperty("queryRecord")) + if (!$util.isString(message.queryRecord)) + return "queryRecord: string expected"; return null; }; /** - * Creates an EncryptionSpec message from a plain object. Also converts values to their respective internal types. + * Creates a SmartReplyData message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.EncryptionSpec + * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.EncryptionSpec} EncryptionSpec + * @returns {google.cloud.contactcenterinsights.v1.SmartReplyData} SmartReplyData */ - EncryptionSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.EncryptionSpec) + SmartReplyData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.SmartReplyData) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.EncryptionSpec(); - if (object.name != null) - message.name = String(object.name); - if (object.kmsKey != null) - message.kmsKey = String(object.kmsKey); + var message = new $root.google.cloud.contactcenterinsights.v1.SmartReplyData(); + if (object.reply != null) + message.reply = String(object.reply); + if (object.confidenceScore != null) + message.confidenceScore = Number(object.confidenceScore); + if (object.metadata) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.SmartReplyData.metadata: object expected"); + message.metadata = {}; + for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) + message.metadata[keys[i]] = String(object.metadata[keys[i]]); + } + if (object.queryRecord != null) + message.queryRecord = String(object.queryRecord); return message; }; /** - * Creates a plain object from an EncryptionSpec message. Also converts values to other types if specified. + * Creates a plain object from a SmartReplyData message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.EncryptionSpec + * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData * @static - * @param {google.cloud.contactcenterinsights.v1.EncryptionSpec} message EncryptionSpec + * @param {google.cloud.contactcenterinsights.v1.SmartReplyData} message SmartReplyData * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EncryptionSpec.toObject = function toObject(message, options) { + SmartReplyData.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.metadata = {}; if (options.defaults) { - object.name = ""; - object.kmsKey = ""; + object.reply = ""; + object.confidenceScore = 0; + object.queryRecord = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.kmsKey != null && message.hasOwnProperty("kmsKey")) - object.kmsKey = message.kmsKey; + if (message.reply != null && message.hasOwnProperty("reply")) + object.reply = message.reply; + if (message.confidenceScore != null && message.hasOwnProperty("confidenceScore")) + object.confidenceScore = options.json && !isFinite(message.confidenceScore) ? String(message.confidenceScore) : message.confidenceScore; + var keys2; + if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { + object.metadata = {}; + for (var j = 0; j < keys2.length; ++j) + object.metadata[keys2[j]] = message.metadata[keys2[j]]; + } + if (message.queryRecord != null && message.hasOwnProperty("queryRecord")) + object.queryRecord = message.queryRecord; return object; }; /** - * Converts this EncryptionSpec to JSON. + * Converts this SmartReplyData to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.EncryptionSpec + * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData * @instance * @returns {Object.} JSON object */ - EncryptionSpec.prototype.toJSON = function toJSON() { + SmartReplyData.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EncryptionSpec + * Gets the default type url for SmartReplyData * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.EncryptionSpec + * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EncryptionSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SmartReplyData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.EncryptionSpec"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.SmartReplyData"; }; - return EncryptionSpec; + return SmartReplyData; })(); - v1.RedactionConfig = (function() { + v1.SmartComposeSuggestionData = (function() { /** - * Properties of a RedactionConfig. + * Properties of a SmartComposeSuggestionData. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IRedactionConfig - * @property {string|null} [deidentifyTemplate] RedactionConfig deidentifyTemplate - * @property {string|null} [inspectTemplate] RedactionConfig inspectTemplate + * @interface ISmartComposeSuggestionData + * @property {string|null} [suggestion] SmartComposeSuggestionData suggestion + * @property {number|null} [confidenceScore] SmartComposeSuggestionData confidenceScore + * @property {Object.|null} [metadata] SmartComposeSuggestionData metadata + * @property {string|null} [queryRecord] SmartComposeSuggestionData queryRecord */ /** - * Constructs a new RedactionConfig. + * Constructs a new SmartComposeSuggestionData. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a RedactionConfig. - * @implements IRedactionConfig + * @classdesc Represents a SmartComposeSuggestionData. + * @implements ISmartComposeSuggestionData * @constructor - * @param {google.cloud.contactcenterinsights.v1.IRedactionConfig=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.ISmartComposeSuggestionData=} [properties] Properties to set */ - function RedactionConfig(properties) { + function SmartComposeSuggestionData(properties) { + this.metadata = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34935,89 +55460,137 @@ } /** - * RedactionConfig deidentifyTemplate. - * @member {string} deidentifyTemplate - * @memberof google.cloud.contactcenterinsights.v1.RedactionConfig + * SmartComposeSuggestionData suggestion. + * @member {string} suggestion + * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData * @instance */ - RedactionConfig.prototype.deidentifyTemplate = ""; + SmartComposeSuggestionData.prototype.suggestion = ""; /** - * RedactionConfig inspectTemplate. - * @member {string} inspectTemplate - * @memberof google.cloud.contactcenterinsights.v1.RedactionConfig + * SmartComposeSuggestionData confidenceScore. + * @member {number} confidenceScore + * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData * @instance */ - RedactionConfig.prototype.inspectTemplate = ""; + SmartComposeSuggestionData.prototype.confidenceScore = 0; /** - * Creates a new RedactionConfig instance using the specified properties. + * SmartComposeSuggestionData metadata. + * @member {Object.} metadata + * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData + * @instance + */ + SmartComposeSuggestionData.prototype.metadata = $util.emptyObject; + + /** + * SmartComposeSuggestionData queryRecord. + * @member {string} queryRecord + * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData + * @instance + */ + SmartComposeSuggestionData.prototype.queryRecord = ""; + + /** + * Creates a new SmartComposeSuggestionData instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.RedactionConfig + * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData * @static - * @param {google.cloud.contactcenterinsights.v1.IRedactionConfig=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.RedactionConfig} RedactionConfig instance + * @param {google.cloud.contactcenterinsights.v1.ISmartComposeSuggestionData=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData} SmartComposeSuggestionData instance */ - RedactionConfig.create = function create(properties) { - return new RedactionConfig(properties); + SmartComposeSuggestionData.create = function create(properties) { + return new SmartComposeSuggestionData(properties); }; /** - * Encodes the specified RedactionConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.RedactionConfig.verify|verify} messages. + * Encodes the specified SmartComposeSuggestionData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.RedactionConfig + * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData * @static - * @param {google.cloud.contactcenterinsights.v1.IRedactionConfig} message RedactionConfig message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.ISmartComposeSuggestionData} message SmartComposeSuggestionData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RedactionConfig.encode = function encode(message, writer) { + SmartComposeSuggestionData.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deidentifyTemplate != null && Object.hasOwnProperty.call(message, "deidentifyTemplate")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.deidentifyTemplate); - if (message.inspectTemplate != null && Object.hasOwnProperty.call(message, "inspectTemplate")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.inspectTemplate); + if (message.suggestion != null && Object.hasOwnProperty.call(message, "suggestion")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.suggestion); + if (message.confidenceScore != null && Object.hasOwnProperty.call(message, "confidenceScore")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.confidenceScore); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); + if (message.queryRecord != null && Object.hasOwnProperty.call(message, "queryRecord")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.queryRecord); return writer; }; /** - * Encodes the specified RedactionConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.RedactionConfig.verify|verify} messages. + * Encodes the specified SmartComposeSuggestionData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.RedactionConfig + * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData * @static - * @param {google.cloud.contactcenterinsights.v1.IRedactionConfig} message RedactionConfig message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.ISmartComposeSuggestionData} message SmartComposeSuggestionData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RedactionConfig.encodeDelimited = function encodeDelimited(message, writer) { + SmartComposeSuggestionData.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RedactionConfig message from the specified reader or buffer. + * Decodes a SmartComposeSuggestionData message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.RedactionConfig + * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.RedactionConfig} RedactionConfig + * @returns {google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData} SmartComposeSuggestionData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RedactionConfig.decode = function decode(reader, length) { + SmartComposeSuggestionData.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.RedactionConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.deidentifyTemplate = reader.string(); + message.suggestion = reader.string(); break; } case 2: { - message.inspectTemplate = reader.string(); + message.confidenceScore = reader.double(); + break; + } + case 3: { + if (message.metadata === $util.emptyObject) + message.metadata = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.metadata[key] = value; + break; + } + case 4: { + message.queryRecord = reader.string(); break; } default: @@ -35029,131 +55602,163 @@ }; /** - * Decodes a RedactionConfig message from the specified reader or buffer, length delimited. + * Decodes a SmartComposeSuggestionData message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.RedactionConfig + * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.RedactionConfig} RedactionConfig + * @returns {google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData} SmartComposeSuggestionData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RedactionConfig.decodeDelimited = function decodeDelimited(reader) { + SmartComposeSuggestionData.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RedactionConfig message. + * Verifies a SmartComposeSuggestionData message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.RedactionConfig + * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RedactionConfig.verify = function verify(message) { + SmartComposeSuggestionData.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.deidentifyTemplate != null && message.hasOwnProperty("deidentifyTemplate")) - if (!$util.isString(message.deidentifyTemplate)) - return "deidentifyTemplate: string expected"; - if (message.inspectTemplate != null && message.hasOwnProperty("inspectTemplate")) - if (!$util.isString(message.inspectTemplate)) - return "inspectTemplate: string expected"; + if (message.suggestion != null && message.hasOwnProperty("suggestion")) + if (!$util.isString(message.suggestion)) + return "suggestion: string expected"; + if (message.confidenceScore != null && message.hasOwnProperty("confidenceScore")) + if (typeof message.confidenceScore !== "number") + return "confidenceScore: number expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (!$util.isObject(message.metadata)) + return "metadata: object expected"; + var key = Object.keys(message.metadata); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.metadata[key[i]])) + return "metadata: string{k:string} expected"; + } + if (message.queryRecord != null && message.hasOwnProperty("queryRecord")) + if (!$util.isString(message.queryRecord)) + return "queryRecord: string expected"; return null; }; /** - * Creates a RedactionConfig message from a plain object. Also converts values to their respective internal types. + * Creates a SmartComposeSuggestionData message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.RedactionConfig + * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.RedactionConfig} RedactionConfig + * @returns {google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData} SmartComposeSuggestionData */ - RedactionConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.RedactionConfig) + SmartComposeSuggestionData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.RedactionConfig(); - if (object.deidentifyTemplate != null) - message.deidentifyTemplate = String(object.deidentifyTemplate); - if (object.inspectTemplate != null) - message.inspectTemplate = String(object.inspectTemplate); + var message = new $root.google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData(); + if (object.suggestion != null) + message.suggestion = String(object.suggestion); + if (object.confidenceScore != null) + message.confidenceScore = Number(object.confidenceScore); + if (object.metadata) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData.metadata: object expected"); + message.metadata = {}; + for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) + message.metadata[keys[i]] = String(object.metadata[keys[i]]); + } + if (object.queryRecord != null) + message.queryRecord = String(object.queryRecord); return message; }; /** - * Creates a plain object from a RedactionConfig message. Also converts values to other types if specified. + * Creates a plain object from a SmartComposeSuggestionData message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.RedactionConfig + * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData * @static - * @param {google.cloud.contactcenterinsights.v1.RedactionConfig} message RedactionConfig + * @param {google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData} message SmartComposeSuggestionData * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RedactionConfig.toObject = function toObject(message, options) { + SmartComposeSuggestionData.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.metadata = {}; if (options.defaults) { - object.deidentifyTemplate = ""; - object.inspectTemplate = ""; + object.suggestion = ""; + object.confidenceScore = 0; + object.queryRecord = ""; } - if (message.deidentifyTemplate != null && message.hasOwnProperty("deidentifyTemplate")) - object.deidentifyTemplate = message.deidentifyTemplate; - if (message.inspectTemplate != null && message.hasOwnProperty("inspectTemplate")) - object.inspectTemplate = message.inspectTemplate; + if (message.suggestion != null && message.hasOwnProperty("suggestion")) + object.suggestion = message.suggestion; + if (message.confidenceScore != null && message.hasOwnProperty("confidenceScore")) + object.confidenceScore = options.json && !isFinite(message.confidenceScore) ? String(message.confidenceScore) : message.confidenceScore; + var keys2; + if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { + object.metadata = {}; + for (var j = 0; j < keys2.length; ++j) + object.metadata[keys2[j]] = message.metadata[keys2[j]]; + } + if (message.queryRecord != null && message.hasOwnProperty("queryRecord")) + object.queryRecord = message.queryRecord; return object; }; /** - * Converts this RedactionConfig to JSON. + * Converts this SmartComposeSuggestionData to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.RedactionConfig + * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData * @instance * @returns {Object.} JSON object */ - RedactionConfig.prototype.toJSON = function toJSON() { + SmartComposeSuggestionData.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RedactionConfig + * Gets the default type url for SmartComposeSuggestionData * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.RedactionConfig + * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RedactionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SmartComposeSuggestionData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.RedactionConfig"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData"; }; - return RedactionConfig; + return SmartComposeSuggestionData; })(); - v1.SpeechConfig = (function() { + v1.DialogflowInteractionData = (function() { /** - * Properties of a SpeechConfig. + * Properties of a DialogflowInteractionData. * @memberof google.cloud.contactcenterinsights.v1 - * @interface ISpeechConfig - * @property {string|null} [speechRecognizer] SpeechConfig speechRecognizer + * @interface IDialogflowInteractionData + * @property {string|null} [dialogflowIntentId] DialogflowInteractionData dialogflowIntentId + * @property {number|null} [confidence] DialogflowInteractionData confidence */ /** - * Constructs a new SpeechConfig. + * Constructs a new DialogflowInteractionData. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a SpeechConfig. - * @implements ISpeechConfig + * @classdesc Represents a DialogflowInteractionData. + * @implements IDialogflowInteractionData * @constructor - * @param {google.cloud.contactcenterinsights.v1.ISpeechConfig=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IDialogflowInteractionData=} [properties] Properties to set */ - function SpeechConfig(properties) { + function DialogflowInteractionData(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35161,75 +55766,89 @@ } /** - * SpeechConfig speechRecognizer. - * @member {string} speechRecognizer - * @memberof google.cloud.contactcenterinsights.v1.SpeechConfig + * DialogflowInteractionData dialogflowIntentId. + * @member {string} dialogflowIntentId + * @memberof google.cloud.contactcenterinsights.v1.DialogflowInteractionData * @instance */ - SpeechConfig.prototype.speechRecognizer = ""; + DialogflowInteractionData.prototype.dialogflowIntentId = ""; /** - * Creates a new SpeechConfig instance using the specified properties. + * DialogflowInteractionData confidence. + * @member {number} confidence + * @memberof google.cloud.contactcenterinsights.v1.DialogflowInteractionData + * @instance + */ + DialogflowInteractionData.prototype.confidence = 0; + + /** + * Creates a new DialogflowInteractionData instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.SpeechConfig + * @memberof google.cloud.contactcenterinsights.v1.DialogflowInteractionData * @static - * @param {google.cloud.contactcenterinsights.v1.ISpeechConfig=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.SpeechConfig} SpeechConfig instance + * @param {google.cloud.contactcenterinsights.v1.IDialogflowInteractionData=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.DialogflowInteractionData} DialogflowInteractionData instance */ - SpeechConfig.create = function create(properties) { - return new SpeechConfig(properties); + DialogflowInteractionData.create = function create(properties) { + return new DialogflowInteractionData(properties); }; /** - * Encodes the specified SpeechConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SpeechConfig.verify|verify} messages. + * Encodes the specified DialogflowInteractionData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DialogflowInteractionData.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.SpeechConfig + * @memberof google.cloud.contactcenterinsights.v1.DialogflowInteractionData * @static - * @param {google.cloud.contactcenterinsights.v1.ISpeechConfig} message SpeechConfig message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IDialogflowInteractionData} message DialogflowInteractionData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechConfig.encode = function encode(message, writer) { + DialogflowInteractionData.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.speechRecognizer != null && Object.hasOwnProperty.call(message, "speechRecognizer")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.speechRecognizer); + if (message.dialogflowIntentId != null && Object.hasOwnProperty.call(message, "dialogflowIntentId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dialogflowIntentId); + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence); return writer; }; /** - * Encodes the specified SpeechConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SpeechConfig.verify|verify} messages. + * Encodes the specified DialogflowInteractionData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DialogflowInteractionData.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.SpeechConfig + * @memberof google.cloud.contactcenterinsights.v1.DialogflowInteractionData * @static - * @param {google.cloud.contactcenterinsights.v1.ISpeechConfig} message SpeechConfig message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IDialogflowInteractionData} message DialogflowInteractionData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SpeechConfig.encodeDelimited = function encodeDelimited(message, writer) { + DialogflowInteractionData.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SpeechConfig message from the specified reader or buffer. + * Decodes a DialogflowInteractionData message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.SpeechConfig + * @memberof google.cloud.contactcenterinsights.v1.DialogflowInteractionData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.SpeechConfig} SpeechConfig + * @returns {google.cloud.contactcenterinsights.v1.DialogflowInteractionData} DialogflowInteractionData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SpeechConfig.decode = function decode(reader, length) { + DialogflowInteractionData.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.SpeechConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.DialogflowInteractionData(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.speechRecognizer = reader.string(); + message.dialogflowIntentId = reader.string(); + break; + } + case 2: { + message.confidence = reader.float(); break; } default: @@ -35241,133 +55860,138 @@ }; /** - * Decodes a SpeechConfig message from the specified reader or buffer, length delimited. + * Decodes a DialogflowInteractionData message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.SpeechConfig + * @memberof google.cloud.contactcenterinsights.v1.DialogflowInteractionData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.SpeechConfig} SpeechConfig + * @returns {google.cloud.contactcenterinsights.v1.DialogflowInteractionData} DialogflowInteractionData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SpeechConfig.decodeDelimited = function decodeDelimited(reader) { + DialogflowInteractionData.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SpeechConfig message. + * Verifies a DialogflowInteractionData message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.SpeechConfig + * @memberof google.cloud.contactcenterinsights.v1.DialogflowInteractionData * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SpeechConfig.verify = function verify(message) { + DialogflowInteractionData.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.speechRecognizer != null && message.hasOwnProperty("speechRecognizer")) - if (!$util.isString(message.speechRecognizer)) - return "speechRecognizer: string expected"; + if (message.dialogflowIntentId != null && message.hasOwnProperty("dialogflowIntentId")) + if (!$util.isString(message.dialogflowIntentId)) + return "dialogflowIntentId: string expected"; + if (message.confidence != null && message.hasOwnProperty("confidence")) + if (typeof message.confidence !== "number") + return "confidence: number expected"; return null; }; /** - * Creates a SpeechConfig message from a plain object. Also converts values to their respective internal types. + * Creates a DialogflowInteractionData message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.SpeechConfig + * @memberof google.cloud.contactcenterinsights.v1.DialogflowInteractionData * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.SpeechConfig} SpeechConfig + * @returns {google.cloud.contactcenterinsights.v1.DialogflowInteractionData} DialogflowInteractionData */ - SpeechConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.SpeechConfig) + DialogflowInteractionData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.DialogflowInteractionData) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.SpeechConfig(); - if (object.speechRecognizer != null) - message.speechRecognizer = String(object.speechRecognizer); + var message = new $root.google.cloud.contactcenterinsights.v1.DialogflowInteractionData(); + if (object.dialogflowIntentId != null) + message.dialogflowIntentId = String(object.dialogflowIntentId); + if (object.confidence != null) + message.confidence = Number(object.confidence); return message; }; /** - * Creates a plain object from a SpeechConfig message. Also converts values to other types if specified. + * Creates a plain object from a DialogflowInteractionData message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.SpeechConfig + * @memberof google.cloud.contactcenterinsights.v1.DialogflowInteractionData * @static - * @param {google.cloud.contactcenterinsights.v1.SpeechConfig} message SpeechConfig + * @param {google.cloud.contactcenterinsights.v1.DialogflowInteractionData} message DialogflowInteractionData * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SpeechConfig.toObject = function toObject(message, options) { + DialogflowInteractionData.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.speechRecognizer = ""; - if (message.speechRecognizer != null && message.hasOwnProperty("speechRecognizer")) - object.speechRecognizer = message.speechRecognizer; + if (options.defaults) { + object.dialogflowIntentId = ""; + object.confidence = 0; + } + if (message.dialogflowIntentId != null && message.hasOwnProperty("dialogflowIntentId")) + object.dialogflowIntentId = message.dialogflowIntentId; + if (message.confidence != null && message.hasOwnProperty("confidence")) + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; return object; }; /** - * Converts this SpeechConfig to JSON. + * Converts this DialogflowInteractionData to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.SpeechConfig + * @memberof google.cloud.contactcenterinsights.v1.DialogflowInteractionData * @instance * @returns {Object.} JSON object */ - SpeechConfig.prototype.toJSON = function toJSON() { + DialogflowInteractionData.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SpeechConfig + * Gets the default type url for DialogflowInteractionData * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.SpeechConfig + * @memberof google.cloud.contactcenterinsights.v1.DialogflowInteractionData * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SpeechConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DialogflowInteractionData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.SpeechConfig"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.DialogflowInteractionData"; }; - return SpeechConfig; + return DialogflowInteractionData; })(); - v1.RuntimeAnnotation = (function() { + v1.ConversationSummarizationSuggestionData = (function() { /** - * Properties of a RuntimeAnnotation. + * Properties of a ConversationSummarizationSuggestionData. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IRuntimeAnnotation - * @property {google.cloud.contactcenterinsights.v1.IArticleSuggestionData|null} [articleSuggestion] RuntimeAnnotation articleSuggestion - * @property {google.cloud.contactcenterinsights.v1.IFaqAnswerData|null} [faqAnswer] RuntimeAnnotation faqAnswer - * @property {google.cloud.contactcenterinsights.v1.ISmartReplyData|null} [smartReply] RuntimeAnnotation smartReply - * @property {google.cloud.contactcenterinsights.v1.ISmartComposeSuggestionData|null} [smartComposeSuggestion] RuntimeAnnotation smartComposeSuggestion - * @property {google.cloud.contactcenterinsights.v1.IDialogflowInteractionData|null} [dialogflowInteraction] RuntimeAnnotation dialogflowInteraction - * @property {google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData|null} [conversationSummarizationSuggestion] RuntimeAnnotation conversationSummarizationSuggestion - * @property {string|null} [annotationId] RuntimeAnnotation annotationId - * @property {google.protobuf.ITimestamp|null} [createTime] RuntimeAnnotation createTime - * @property {google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null} [startBoundary] RuntimeAnnotation startBoundary - * @property {google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null} [endBoundary] RuntimeAnnotation endBoundary - * @property {google.cloud.contactcenterinsights.v1.IAnswerFeedback|null} [answerFeedback] RuntimeAnnotation answerFeedback - * @property {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.IUserInput|null} [userInput] RuntimeAnnotation userInput + * @interface IConversationSummarizationSuggestionData + * @property {string|null} [text] ConversationSummarizationSuggestionData text + * @property {Object.|null} [textSections] ConversationSummarizationSuggestionData textSections + * @property {number|null} [confidence] ConversationSummarizationSuggestionData confidence + * @property {Object.|null} [metadata] ConversationSummarizationSuggestionData metadata + * @property {string|null} [answerRecord] ConversationSummarizationSuggestionData answerRecord + * @property {string|null} [conversationModel] ConversationSummarizationSuggestionData conversationModel */ /** - * Constructs a new RuntimeAnnotation. + * Constructs a new ConversationSummarizationSuggestionData. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a RuntimeAnnotation. - * @implements IRuntimeAnnotation + * @classdesc Represents a ConversationSummarizationSuggestionData. + * @implements IConversationSummarizationSuggestionData * @constructor - * @param {google.cloud.contactcenterinsights.v1.IRuntimeAnnotation=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData=} [properties] Properties to set */ - function RuntimeAnnotation(properties) { + function ConversationSummarizationSuggestionData(properties) { + this.textSections = {}; + this.metadata = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35375,243 +55999,185 @@ } /** - * RuntimeAnnotation articleSuggestion. - * @member {google.cloud.contactcenterinsights.v1.IArticleSuggestionData|null|undefined} articleSuggestion - * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation - * @instance - */ - RuntimeAnnotation.prototype.articleSuggestion = null; - - /** - * RuntimeAnnotation faqAnswer. - * @member {google.cloud.contactcenterinsights.v1.IFaqAnswerData|null|undefined} faqAnswer - * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation - * @instance - */ - RuntimeAnnotation.prototype.faqAnswer = null; - - /** - * RuntimeAnnotation smartReply. - * @member {google.cloud.contactcenterinsights.v1.ISmartReplyData|null|undefined} smartReply - * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation - * @instance - */ - RuntimeAnnotation.prototype.smartReply = null; - - /** - * RuntimeAnnotation smartComposeSuggestion. - * @member {google.cloud.contactcenterinsights.v1.ISmartComposeSuggestionData|null|undefined} smartComposeSuggestion - * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation - * @instance - */ - RuntimeAnnotation.prototype.smartComposeSuggestion = null; - - /** - * RuntimeAnnotation dialogflowInteraction. - * @member {google.cloud.contactcenterinsights.v1.IDialogflowInteractionData|null|undefined} dialogflowInteraction - * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation - * @instance - */ - RuntimeAnnotation.prototype.dialogflowInteraction = null; - - /** - * RuntimeAnnotation conversationSummarizationSuggestion. - * @member {google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData|null|undefined} conversationSummarizationSuggestion - * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation - * @instance - */ - RuntimeAnnotation.prototype.conversationSummarizationSuggestion = null; - - /** - * RuntimeAnnotation annotationId. - * @member {string} annotationId - * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation - * @instance - */ - RuntimeAnnotation.prototype.annotationId = ""; - - /** - * RuntimeAnnotation createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * ConversationSummarizationSuggestionData text. + * @member {string} text + * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData * @instance */ - RuntimeAnnotation.prototype.createTime = null; + ConversationSummarizationSuggestionData.prototype.text = ""; /** - * RuntimeAnnotation startBoundary. - * @member {google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null|undefined} startBoundary - * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * ConversationSummarizationSuggestionData textSections. + * @member {Object.} textSections + * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData * @instance */ - RuntimeAnnotation.prototype.startBoundary = null; + ConversationSummarizationSuggestionData.prototype.textSections = $util.emptyObject; /** - * RuntimeAnnotation endBoundary. - * @member {google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null|undefined} endBoundary - * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * ConversationSummarizationSuggestionData confidence. + * @member {number} confidence + * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData * @instance */ - RuntimeAnnotation.prototype.endBoundary = null; + ConversationSummarizationSuggestionData.prototype.confidence = 0; /** - * RuntimeAnnotation answerFeedback. - * @member {google.cloud.contactcenterinsights.v1.IAnswerFeedback|null|undefined} answerFeedback - * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * ConversationSummarizationSuggestionData metadata. + * @member {Object.} metadata + * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData * @instance */ - RuntimeAnnotation.prototype.answerFeedback = null; + ConversationSummarizationSuggestionData.prototype.metadata = $util.emptyObject; /** - * RuntimeAnnotation userInput. - * @member {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.IUserInput|null|undefined} userInput - * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * ConversationSummarizationSuggestionData answerRecord. + * @member {string} answerRecord + * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData * @instance */ - RuntimeAnnotation.prototype.userInput = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ConversationSummarizationSuggestionData.prototype.answerRecord = ""; /** - * RuntimeAnnotation data. - * @member {"articleSuggestion"|"faqAnswer"|"smartReply"|"smartComposeSuggestion"|"dialogflowInteraction"|"conversationSummarizationSuggestion"|undefined} data - * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * ConversationSummarizationSuggestionData conversationModel. + * @member {string} conversationModel + * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData * @instance */ - Object.defineProperty(RuntimeAnnotation.prototype, "data", { - get: $util.oneOfGetter($oneOfFields = ["articleSuggestion", "faqAnswer", "smartReply", "smartComposeSuggestion", "dialogflowInteraction", "conversationSummarizationSuggestion"]), - set: $util.oneOfSetter($oneOfFields) - }); + ConversationSummarizationSuggestionData.prototype.conversationModel = ""; /** - * Creates a new RuntimeAnnotation instance using the specified properties. + * Creates a new ConversationSummarizationSuggestionData instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData * @static - * @param {google.cloud.contactcenterinsights.v1.IRuntimeAnnotation=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.RuntimeAnnotation} RuntimeAnnotation instance + * @param {google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData} ConversationSummarizationSuggestionData instance */ - RuntimeAnnotation.create = function create(properties) { - return new RuntimeAnnotation(properties); + ConversationSummarizationSuggestionData.create = function create(properties) { + return new ConversationSummarizationSuggestionData(properties); }; /** - * Encodes the specified RuntimeAnnotation message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.RuntimeAnnotation.verify|verify} messages. + * Encodes the specified ConversationSummarizationSuggestionData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData * @static - * @param {google.cloud.contactcenterinsights.v1.IRuntimeAnnotation} message RuntimeAnnotation message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData} message ConversationSummarizationSuggestionData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RuntimeAnnotation.encode = function encode(message, writer) { + ConversationSummarizationSuggestionData.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.annotationId != null && Object.hasOwnProperty.call(message, "annotationId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.annotationId); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.startBoundary != null && Object.hasOwnProperty.call(message, "startBoundary")) - $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.encode(message.startBoundary, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.endBoundary != null && Object.hasOwnProperty.call(message, "endBoundary")) - $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.encode(message.endBoundary, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.answerFeedback != null && Object.hasOwnProperty.call(message, "answerFeedback")) - $root.google.cloud.contactcenterinsights.v1.AnswerFeedback.encode(message.answerFeedback, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.articleSuggestion != null && Object.hasOwnProperty.call(message, "articleSuggestion")) - $root.google.cloud.contactcenterinsights.v1.ArticleSuggestionData.encode(message.articleSuggestion, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.faqAnswer != null && Object.hasOwnProperty.call(message, "faqAnswer")) - $root.google.cloud.contactcenterinsights.v1.FaqAnswerData.encode(message.faqAnswer, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.smartReply != null && Object.hasOwnProperty.call(message, "smartReply")) - $root.google.cloud.contactcenterinsights.v1.SmartReplyData.encode(message.smartReply, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.smartComposeSuggestion != null && Object.hasOwnProperty.call(message, "smartComposeSuggestion")) - $root.google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData.encode(message.smartComposeSuggestion, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.dialogflowInteraction != null && Object.hasOwnProperty.call(message, "dialogflowInteraction")) - $root.google.cloud.contactcenterinsights.v1.DialogflowInteractionData.encode(message.dialogflowInteraction, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.conversationSummarizationSuggestion != null && Object.hasOwnProperty.call(message, "conversationSummarizationSuggestion")) - $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.encode(message.conversationSummarizationSuggestion, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.userInput != null && Object.hasOwnProperty.call(message, "userInput")) - $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.encode(message.userInput, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); + if (message.answerRecord != null && Object.hasOwnProperty.call(message, "answerRecord")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.answerRecord); + if (message.textSections != null && Object.hasOwnProperty.call(message, "textSections")) + for (var keys = Object.keys(message.textSections), i = 0; i < keys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.textSections[keys[i]]).ldelim(); + if (message.conversationModel != null && Object.hasOwnProperty.call(message, "conversationModel")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.conversationModel); return writer; }; /** - * Encodes the specified RuntimeAnnotation message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.RuntimeAnnotation.verify|verify} messages. + * Encodes the specified ConversationSummarizationSuggestionData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData * @static - * @param {google.cloud.contactcenterinsights.v1.IRuntimeAnnotation} message RuntimeAnnotation message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData} message ConversationSummarizationSuggestionData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RuntimeAnnotation.encodeDelimited = function encodeDelimited(message, writer) { + ConversationSummarizationSuggestionData.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RuntimeAnnotation message from the specified reader or buffer. + * Decodes a ConversationSummarizationSuggestionData message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.RuntimeAnnotation} RuntimeAnnotation + * @returns {google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData} ConversationSummarizationSuggestionData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RuntimeAnnotation.decode = function decode(reader, length) { + ConversationSummarizationSuggestionData.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 6: { - message.articleSuggestion = $root.google.cloud.contactcenterinsights.v1.ArticleSuggestionData.decode(reader, reader.uint32()); - break; - } - case 7: { - message.faqAnswer = $root.google.cloud.contactcenterinsights.v1.FaqAnswerData.decode(reader, reader.uint32()); - break; - } - case 8: { - message.smartReply = $root.google.cloud.contactcenterinsights.v1.SmartReplyData.decode(reader, reader.uint32()); - break; - } - case 9: { - message.smartComposeSuggestion = $root.google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData.decode(reader, reader.uint32()); - break; - } - case 10: { - message.dialogflowInteraction = $root.google.cloud.contactcenterinsights.v1.DialogflowInteractionData.decode(reader, reader.uint32()); - break; - } - case 12: { - message.conversationSummarizationSuggestion = $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.decode(reader, reader.uint32()); + case 1: { + message.text = reader.string(); break; } - case 1: { - message.annotationId = reader.string(); + case 5: { + if (message.textSections === $util.emptyObject) + message.textSections = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.textSections[key] = value; break; } case 2: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.confidence = reader.float(); break; } case 3: { - message.startBoundary = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.decode(reader, reader.uint32()); + if (message.metadata === $util.emptyObject) + message.metadata = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.metadata[key] = value; break; } case 4: { - message.endBoundary = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.decode(reader, reader.uint32()); - break; - } - case 5: { - message.answerFeedback = $root.google.cloud.contactcenterinsights.v1.AnswerFeedback.decode(reader, reader.uint32()); + message.answerRecord = reader.string(); break; } - case 16: { - message.userInput = $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.decode(reader, reader.uint32()); + case 6: { + message.conversationModel = reader.string(); break; } default: @@ -35623,599 +56189,196 @@ }; /** - * Decodes a RuntimeAnnotation message from the specified reader or buffer, length delimited. + * Decodes a ConversationSummarizationSuggestionData message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.RuntimeAnnotation} RuntimeAnnotation + * @returns {google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData} ConversationSummarizationSuggestionData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RuntimeAnnotation.decodeDelimited = function decodeDelimited(reader) { + ConversationSummarizationSuggestionData.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RuntimeAnnotation message. + * Verifies a ConversationSummarizationSuggestionData message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RuntimeAnnotation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.articleSuggestion != null && message.hasOwnProperty("articleSuggestion")) { - properties.data = 1; - { - var error = $root.google.cloud.contactcenterinsights.v1.ArticleSuggestionData.verify(message.articleSuggestion); - if (error) - return "articleSuggestion." + error; - } - } - if (message.faqAnswer != null && message.hasOwnProperty("faqAnswer")) { - if (properties.data === 1) - return "data: multiple values"; - properties.data = 1; - { - var error = $root.google.cloud.contactcenterinsights.v1.FaqAnswerData.verify(message.faqAnswer); - if (error) - return "faqAnswer." + error; - } - } - if (message.smartReply != null && message.hasOwnProperty("smartReply")) { - if (properties.data === 1) - return "data: multiple values"; - properties.data = 1; - { - var error = $root.google.cloud.contactcenterinsights.v1.SmartReplyData.verify(message.smartReply); - if (error) - return "smartReply." + error; - } - } - if (message.smartComposeSuggestion != null && message.hasOwnProperty("smartComposeSuggestion")) { - if (properties.data === 1) - return "data: multiple values"; - properties.data = 1; - { - var error = $root.google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData.verify(message.smartComposeSuggestion); - if (error) - return "smartComposeSuggestion." + error; - } - } - if (message.dialogflowInteraction != null && message.hasOwnProperty("dialogflowInteraction")) { - if (properties.data === 1) - return "data: multiple values"; - properties.data = 1; - { - var error = $root.google.cloud.contactcenterinsights.v1.DialogflowInteractionData.verify(message.dialogflowInteraction); - if (error) - return "dialogflowInteraction." + error; - } - } - if (message.conversationSummarizationSuggestion != null && message.hasOwnProperty("conversationSummarizationSuggestion")) { - if (properties.data === 1) - return "data: multiple values"; - properties.data = 1; - { - var error = $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.verify(message.conversationSummarizationSuggestion); - if (error) - return "conversationSummarizationSuggestion." + error; - } - } - if (message.annotationId != null && message.hasOwnProperty("annotationId")) - if (!$util.isString(message.annotationId)) - return "annotationId: 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.startBoundary != null && message.hasOwnProperty("startBoundary")) { - var error = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.verify(message.startBoundary); - if (error) - return "startBoundary." + error; - } - if (message.endBoundary != null && message.hasOwnProperty("endBoundary")) { - var error = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.verify(message.endBoundary); - if (error) - return "endBoundary." + error; - } - if (message.answerFeedback != null && message.hasOwnProperty("answerFeedback")) { - var error = $root.google.cloud.contactcenterinsights.v1.AnswerFeedback.verify(message.answerFeedback); - if (error) - return "answerFeedback." + error; + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConversationSummarizationSuggestionData.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.textSections != null && message.hasOwnProperty("textSections")) { + if (!$util.isObject(message.textSections)) + return "textSections: object expected"; + var key = Object.keys(message.textSections); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.textSections[key[i]])) + return "textSections: string{k:string} expected"; } - if (message.userInput != null && message.hasOwnProperty("userInput")) { - var error = $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.verify(message.userInput); - if (error) - return "userInput." + error; + if (message.confidence != null && message.hasOwnProperty("confidence")) + if (typeof message.confidence !== "number") + return "confidence: number expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (!$util.isObject(message.metadata)) + return "metadata: object expected"; + var key = Object.keys(message.metadata); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.metadata[key[i]])) + return "metadata: string{k:string} expected"; } + if (message.answerRecord != null && message.hasOwnProperty("answerRecord")) + if (!$util.isString(message.answerRecord)) + return "answerRecord: string expected"; + if (message.conversationModel != null && message.hasOwnProperty("conversationModel")) + if (!$util.isString(message.conversationModel)) + return "conversationModel: string expected"; return null; }; /** - * Creates a RuntimeAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates a ConversationSummarizationSuggestionData message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.RuntimeAnnotation} RuntimeAnnotation + * @returns {google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData} ConversationSummarizationSuggestionData */ - RuntimeAnnotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation) + ConversationSummarizationSuggestionData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation(); - if (object.articleSuggestion != null) { - if (typeof object.articleSuggestion !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.RuntimeAnnotation.articleSuggestion: object expected"); - message.articleSuggestion = $root.google.cloud.contactcenterinsights.v1.ArticleSuggestionData.fromObject(object.articleSuggestion); - } - if (object.faqAnswer != null) { - if (typeof object.faqAnswer !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.RuntimeAnnotation.faqAnswer: object expected"); - message.faqAnswer = $root.google.cloud.contactcenterinsights.v1.FaqAnswerData.fromObject(object.faqAnswer); - } - if (object.smartReply != null) { - if (typeof object.smartReply !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.RuntimeAnnotation.smartReply: object expected"); - message.smartReply = $root.google.cloud.contactcenterinsights.v1.SmartReplyData.fromObject(object.smartReply); - } - if (object.smartComposeSuggestion != null) { - if (typeof object.smartComposeSuggestion !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.RuntimeAnnotation.smartComposeSuggestion: object expected"); - message.smartComposeSuggestion = $root.google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData.fromObject(object.smartComposeSuggestion); - } - if (object.dialogflowInteraction != null) { - if (typeof object.dialogflowInteraction !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.RuntimeAnnotation.dialogflowInteraction: object expected"); - message.dialogflowInteraction = $root.google.cloud.contactcenterinsights.v1.DialogflowInteractionData.fromObject(object.dialogflowInteraction); - } - if (object.conversationSummarizationSuggestion != null) { - if (typeof object.conversationSummarizationSuggestion !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.RuntimeAnnotation.conversationSummarizationSuggestion: object expected"); - message.conversationSummarizationSuggestion = $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.fromObject(object.conversationSummarizationSuggestion); - } - if (object.annotationId != null) - message.annotationId = String(object.annotationId); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.RuntimeAnnotation.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.startBoundary != null) { - if (typeof object.startBoundary !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.RuntimeAnnotation.startBoundary: object expected"); - message.startBoundary = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.fromObject(object.startBoundary); - } - if (object.endBoundary != null) { - if (typeof object.endBoundary !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.RuntimeAnnotation.endBoundary: object expected"); - message.endBoundary = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.fromObject(object.endBoundary); - } - if (object.answerFeedback != null) { - if (typeof object.answerFeedback !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.RuntimeAnnotation.answerFeedback: object expected"); - message.answerFeedback = $root.google.cloud.contactcenterinsights.v1.AnswerFeedback.fromObject(object.answerFeedback); + var message = new $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData(); + if (object.text != null) + message.text = String(object.text); + if (object.textSections) { + if (typeof object.textSections !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.textSections: object expected"); + message.textSections = {}; + for (var keys = Object.keys(object.textSections), i = 0; i < keys.length; ++i) + message.textSections[keys[i]] = String(object.textSections[keys[i]]); } - if (object.userInput != null) { - if (typeof object.userInput !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.RuntimeAnnotation.userInput: object expected"); - message.userInput = $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.fromObject(object.userInput); + if (object.confidence != null) + message.confidence = Number(object.confidence); + if (object.metadata) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.metadata: object expected"); + message.metadata = {}; + for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) + message.metadata[keys[i]] = String(object.metadata[keys[i]]); } + if (object.answerRecord != null) + message.answerRecord = String(object.answerRecord); + if (object.conversationModel != null) + message.conversationModel = String(object.conversationModel); return message; }; /** - * Creates a plain object from a RuntimeAnnotation message. Also converts values to other types if specified. + * Creates a plain object from a ConversationSummarizationSuggestionData message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData * @static - * @param {google.cloud.contactcenterinsights.v1.RuntimeAnnotation} message RuntimeAnnotation + * @param {google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData} message ConversationSummarizationSuggestionData * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RuntimeAnnotation.toObject = function toObject(message, options) { + ConversationSummarizationSuggestionData.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.annotationId = ""; - object.createTime = null; - object.startBoundary = null; - object.endBoundary = null; - object.answerFeedback = null; - object.userInput = null; - } - if (message.annotationId != null && message.hasOwnProperty("annotationId")) - object.annotationId = message.annotationId; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.startBoundary != null && message.hasOwnProperty("startBoundary")) - object.startBoundary = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.toObject(message.startBoundary, options); - if (message.endBoundary != null && message.hasOwnProperty("endBoundary")) - object.endBoundary = $root.google.cloud.contactcenterinsights.v1.AnnotationBoundary.toObject(message.endBoundary, options); - if (message.answerFeedback != null && message.hasOwnProperty("answerFeedback")) - object.answerFeedback = $root.google.cloud.contactcenterinsights.v1.AnswerFeedback.toObject(message.answerFeedback, options); - if (message.articleSuggestion != null && message.hasOwnProperty("articleSuggestion")) { - object.articleSuggestion = $root.google.cloud.contactcenterinsights.v1.ArticleSuggestionData.toObject(message.articleSuggestion, options); - if (options.oneofs) - object.data = "articleSuggestion"; - } - if (message.faqAnswer != null && message.hasOwnProperty("faqAnswer")) { - object.faqAnswer = $root.google.cloud.contactcenterinsights.v1.FaqAnswerData.toObject(message.faqAnswer, options); - if (options.oneofs) - object.data = "faqAnswer"; - } - if (message.smartReply != null && message.hasOwnProperty("smartReply")) { - object.smartReply = $root.google.cloud.contactcenterinsights.v1.SmartReplyData.toObject(message.smartReply, options); - if (options.oneofs) - object.data = "smartReply"; + if (options.objects || options.defaults) { + object.metadata = {}; + object.textSections = {}; } - if (message.smartComposeSuggestion != null && message.hasOwnProperty("smartComposeSuggestion")) { - object.smartComposeSuggestion = $root.google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData.toObject(message.smartComposeSuggestion, options); - if (options.oneofs) - object.data = "smartComposeSuggestion"; + if (options.defaults) { + object.text = ""; + object.confidence = 0; + object.answerRecord = ""; + object.conversationModel = ""; } - if (message.dialogflowInteraction != null && message.hasOwnProperty("dialogflowInteraction")) { - object.dialogflowInteraction = $root.google.cloud.contactcenterinsights.v1.DialogflowInteractionData.toObject(message.dialogflowInteraction, options); - if (options.oneofs) - object.data = "dialogflowInteraction"; + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + if (message.confidence != null && message.hasOwnProperty("confidence")) + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; + var keys2; + if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { + object.metadata = {}; + for (var j = 0; j < keys2.length; ++j) + object.metadata[keys2[j]] = message.metadata[keys2[j]]; } - if (message.conversationSummarizationSuggestion != null && message.hasOwnProperty("conversationSummarizationSuggestion")) { - object.conversationSummarizationSuggestion = $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.toObject(message.conversationSummarizationSuggestion, options); - if (options.oneofs) - object.data = "conversationSummarizationSuggestion"; + if (message.answerRecord != null && message.hasOwnProperty("answerRecord")) + object.answerRecord = message.answerRecord; + if (message.textSections && (keys2 = Object.keys(message.textSections)).length) { + object.textSections = {}; + for (var j = 0; j < keys2.length; ++j) + object.textSections[keys2[j]] = message.textSections[keys2[j]]; } - if (message.userInput != null && message.hasOwnProperty("userInput")) - object.userInput = $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.toObject(message.userInput, options); + if (message.conversationModel != null && message.hasOwnProperty("conversationModel")) + object.conversationModel = message.conversationModel; return object; }; /** - * Converts this RuntimeAnnotation to JSON. + * Converts this ConversationSummarizationSuggestionData to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData * @instance * @returns {Object.} JSON object - */ - RuntimeAnnotation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RuntimeAnnotation - * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RuntimeAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.RuntimeAnnotation"; - }; - - RuntimeAnnotation.UserInput = (function() { - - /** - * Properties of a UserInput. - * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation - * @interface IUserInput - * @property {string|null} [query] UserInput query - * @property {string|null} [generatorName] UserInput generatorName - * @property {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.QuerySource|null} [querySource] UserInput querySource - */ - - /** - * Constructs a new UserInput. - * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation - * @classdesc Represents a UserInput. - * @implements IUserInput - * @constructor - * @param {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.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]]; - } - - /** - * UserInput query. - * @member {string} query - * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput - * @instance - */ - UserInput.prototype.query = ""; - - /** - * UserInput generatorName. - * @member {string} generatorName - * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput - * @instance - */ - UserInput.prototype.generatorName = ""; - - /** - * UserInput querySource. - * @member {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.QuerySource} querySource - * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput - * @instance - */ - UserInput.prototype.querySource = 0; - - /** - * Creates a new UserInput instance using the specified properties. - * @function create - * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput - * @static - * @param {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.IUserInput=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput} UserInput instance - */ - UserInput.create = function create(properties) { - return new UserInput(properties); - }; - - /** - * Encodes the specified UserInput message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.verify|verify} messages. - * @function encode - * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput - * @static - * @param {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.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.query != null && Object.hasOwnProperty.call(message, "query")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.query); - if (message.generatorName != null && Object.hasOwnProperty.call(message, "generatorName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.generatorName); - if (message.querySource != null && Object.hasOwnProperty.call(message, "querySource")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.querySource); - return writer; - }; - - /** - * Encodes the specified UserInput message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput - * @static - * @param {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.IUserInput} message UserInput message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserInput.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UserInput message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.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.contactcenterinsights.v1.RuntimeAnnotation.UserInput(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.query = reader.string(); - break; - } - case 2: { - message.generatorName = reader.string(); - break; - } - case 3: { - message.querySource = reader.int32(); - 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.contactcenterinsights.v1.RuntimeAnnotation.UserInput - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput} UserInput - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserInput.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UserInput message. - * @function verify - * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.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.query != null && message.hasOwnProperty("query")) - if (!$util.isString(message.query)) - return "query: string expected"; - if (message.generatorName != null && message.hasOwnProperty("generatorName")) - if (!$util.isString(message.generatorName)) - return "generatorName: string expected"; - if (message.querySource != null && message.hasOwnProperty("querySource")) - switch (message.querySource) { - default: - return "querySource: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a UserInput message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput} UserInput - */ - UserInput.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput) - return object; - var message = new $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput(); - if (object.query != null) - message.query = String(object.query); - if (object.generatorName != null) - message.generatorName = String(object.generatorName); - switch (object.querySource) { - default: - if (typeof object.querySource === "number") { - message.querySource = object.querySource; - break; - } - break; - case "QUERY_SOURCE_UNSPECIFIED": - case 0: - message.querySource = 0; - break; - case "AGENT_QUERY": - case 1: - message.querySource = 1; - break; - case "SUGGESTED_QUERY": - case 2: - message.querySource = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a UserInput message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput - * @static - * @param {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.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.query = ""; - object.generatorName = ""; - object.querySource = options.enums === String ? "QUERY_SOURCE_UNSPECIFIED" : 0; - } - if (message.query != null && message.hasOwnProperty("query")) - object.query = message.query; - if (message.generatorName != null && message.hasOwnProperty("generatorName")) - object.generatorName = message.generatorName; - if (message.querySource != null && message.hasOwnProperty("querySource")) - object.querySource = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.QuerySource[message.querySource] === undefined ? message.querySource : $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.QuerySource[message.querySource] : message.querySource; - return object; - }; - - /** - * Converts this UserInput to JSON. - * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.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.contactcenterinsights.v1.RuntimeAnnotation.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.contactcenterinsights.v1.RuntimeAnnotation.UserInput"; - }; - - /** - * QuerySource enum. - * @name google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.QuerySource - * @enum {number} - * @property {number} QUERY_SOURCE_UNSPECIFIED=0 QUERY_SOURCE_UNSPECIFIED value - * @property {number} AGENT_QUERY=1 AGENT_QUERY value - * @property {number} SUGGESTED_QUERY=2 SUGGESTED_QUERY value - */ - UserInput.QuerySource = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "QUERY_SOURCE_UNSPECIFIED"] = 0; - values[valuesById[1] = "AGENT_QUERY"] = 1; - values[valuesById[2] = "SUGGESTED_QUERY"] = 2; - return values; - })(); + */ + ConversationSummarizationSuggestionData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return UserInput; - })(); + /** + * Gets the default type url for ConversationSummarizationSuggestionData + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConversationSummarizationSuggestionData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData"; + }; - return RuntimeAnnotation; + return ConversationSummarizationSuggestionData; })(); - v1.AnswerFeedback = (function() { + v1.ConversationParticipant = (function() { /** - * Properties of an AnswerFeedback. + * Properties of a ConversationParticipant. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IAnswerFeedback - * @property {google.cloud.contactcenterinsights.v1.AnswerFeedback.CorrectnessLevel|null} [correctnessLevel] AnswerFeedback correctnessLevel - * @property {boolean|null} [clicked] AnswerFeedback clicked - * @property {boolean|null} [displayed] AnswerFeedback displayed + * @interface IConversationParticipant + * @property {string|null} [dialogflowParticipantName] ConversationParticipant dialogflowParticipantName + * @property {string|null} [userId] ConversationParticipant userId + * @property {string|null} [dialogflowParticipant] ConversationParticipant dialogflowParticipant + * @property {string|null} [obfuscatedExternalUserId] ConversationParticipant obfuscatedExternalUserId + * @property {google.cloud.contactcenterinsights.v1.ConversationParticipant.Role|null} [role] ConversationParticipant role */ /** - * Constructs a new AnswerFeedback. + * Constructs a new ConversationParticipant. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents an AnswerFeedback. - * @implements IAnswerFeedback + * @classdesc Represents a ConversationParticipant. + * @implements IConversationParticipant * @constructor - * @param {google.cloud.contactcenterinsights.v1.IAnswerFeedback=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IConversationParticipant=} [properties] Properties to set */ - function AnswerFeedback(properties) { + function ConversationParticipant(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36223,103 +56386,145 @@ } /** - * AnswerFeedback correctnessLevel. - * @member {google.cloud.contactcenterinsights.v1.AnswerFeedback.CorrectnessLevel} correctnessLevel - * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback + * ConversationParticipant dialogflowParticipantName. + * @member {string|null|undefined} dialogflowParticipantName + * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant * @instance */ - AnswerFeedback.prototype.correctnessLevel = 0; + ConversationParticipant.prototype.dialogflowParticipantName = null; /** - * AnswerFeedback clicked. - * @member {boolean} clicked - * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback + * ConversationParticipant userId. + * @member {string|null|undefined} userId + * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant * @instance */ - AnswerFeedback.prototype.clicked = false; + ConversationParticipant.prototype.userId = null; /** - * AnswerFeedback displayed. - * @member {boolean} displayed - * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback + * ConversationParticipant dialogflowParticipant. + * @member {string} dialogflowParticipant + * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant * @instance */ - AnswerFeedback.prototype.displayed = false; + ConversationParticipant.prototype.dialogflowParticipant = ""; /** - * Creates a new AnswerFeedback instance using the specified properties. + * ConversationParticipant obfuscatedExternalUserId. + * @member {string} obfuscatedExternalUserId + * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant + * @instance + */ + ConversationParticipant.prototype.obfuscatedExternalUserId = ""; + + /** + * ConversationParticipant role. + * @member {google.cloud.contactcenterinsights.v1.ConversationParticipant.Role} role + * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant + * @instance + */ + ConversationParticipant.prototype.role = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ConversationParticipant participant. + * @member {"dialogflowParticipantName"|"userId"|undefined} participant + * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant + * @instance + */ + Object.defineProperty(ConversationParticipant.prototype, "participant", { + get: $util.oneOfGetter($oneOfFields = ["dialogflowParticipantName", "userId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ConversationParticipant instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback + * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant * @static - * @param {google.cloud.contactcenterinsights.v1.IAnswerFeedback=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.AnswerFeedback} AnswerFeedback instance + * @param {google.cloud.contactcenterinsights.v1.IConversationParticipant=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ConversationParticipant} ConversationParticipant instance */ - AnswerFeedback.create = function create(properties) { - return new AnswerFeedback(properties); + ConversationParticipant.create = function create(properties) { + return new ConversationParticipant(properties); }; /** - * Encodes the specified AnswerFeedback message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnswerFeedback.verify|verify} messages. + * Encodes the specified ConversationParticipant message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationParticipant.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback + * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant * @static - * @param {google.cloud.contactcenterinsights.v1.IAnswerFeedback} message AnswerFeedback message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IConversationParticipant} message ConversationParticipant message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnswerFeedback.encode = function encode(message, writer) { + ConversationParticipant.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.correctnessLevel != null && Object.hasOwnProperty.call(message, "correctnessLevel")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.correctnessLevel); - if (message.clicked != null && Object.hasOwnProperty.call(message, "clicked")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.clicked); - if (message.displayed != null && Object.hasOwnProperty.call(message, "displayed")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.displayed); + if (message.dialogflowParticipant != null && Object.hasOwnProperty.call(message, "dialogflowParticipant")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dialogflowParticipant); + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.role); + if (message.obfuscatedExternalUserId != null && Object.hasOwnProperty.call(message, "obfuscatedExternalUserId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.obfuscatedExternalUserId); + if (message.dialogflowParticipantName != null && Object.hasOwnProperty.call(message, "dialogflowParticipantName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.dialogflowParticipantName); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.userId); return writer; }; /** - * Encodes the specified AnswerFeedback message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnswerFeedback.verify|verify} messages. + * Encodes the specified ConversationParticipant message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationParticipant.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback + * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant * @static - * @param {google.cloud.contactcenterinsights.v1.IAnswerFeedback} message AnswerFeedback message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IConversationParticipant} message ConversationParticipant message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnswerFeedback.encodeDelimited = function encodeDelimited(message, writer) { + ConversationParticipant.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AnswerFeedback message from the specified reader or buffer. + * Decodes a ConversationParticipant message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback + * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.AnswerFeedback} AnswerFeedback + * @returns {google.cloud.contactcenterinsights.v1.ConversationParticipant} ConversationParticipant * @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) { + ConversationParticipant.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.AnswerFeedback(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ConversationParticipant(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.correctnessLevel = reader.int32(); + case 5: { + message.dialogflowParticipantName = reader.string(); break; } - case 2: { - message.clicked = reader.bool(); + case 6: { + message.userId = reader.string(); + break; + } + case 1: { + message.dialogflowParticipant = reader.string(); break; } case 3: { - message.displayed = reader.bool(); + message.obfuscatedExternalUserId = reader.string(); + break; + } + case 2: { + message.role = reader.int32(); break; } default: @@ -36331,192 +56536,224 @@ }; /** - * Decodes an AnswerFeedback message from the specified reader or buffer, length delimited. + * Decodes a ConversationParticipant message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback + * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.AnswerFeedback} AnswerFeedback + * @returns {google.cloud.contactcenterinsights.v1.ConversationParticipant} ConversationParticipant * @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) { + ConversationParticipant.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AnswerFeedback message. + * Verifies a ConversationParticipant message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback + * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant * @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) { + ConversationParticipant.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.correctnessLevel != null && message.hasOwnProperty("correctnessLevel")) - switch (message.correctnessLevel) { + var properties = {}; + if (message.dialogflowParticipantName != null && message.hasOwnProperty("dialogflowParticipantName")) { + properties.participant = 1; + if (!$util.isString(message.dialogflowParticipantName)) + return "dialogflowParticipantName: string expected"; + } + if (message.userId != null && message.hasOwnProperty("userId")) { + if (properties.participant === 1) + return "participant: multiple values"; + properties.participant = 1; + if (!$util.isString(message.userId)) + return "userId: string expected"; + } + if (message.dialogflowParticipant != null && message.hasOwnProperty("dialogflowParticipant")) + if (!$util.isString(message.dialogflowParticipant)) + return "dialogflowParticipant: string expected"; + if (message.obfuscatedExternalUserId != null && message.hasOwnProperty("obfuscatedExternalUserId")) + if (!$util.isString(message.obfuscatedExternalUserId)) + return "obfuscatedExternalUserId: string expected"; + if (message.role != null && message.hasOwnProperty("role")) + switch (message.role) { default: - return "correctnessLevel: enum value expected"; + return "role: enum value expected"; case 0: case 1: case 2: case 3: + case 4: break; } - if (message.clicked != null && message.hasOwnProperty("clicked")) - if (typeof message.clicked !== "boolean") - return "clicked: boolean expected"; - if (message.displayed != null && message.hasOwnProperty("displayed")) - if (typeof message.displayed !== "boolean") - return "displayed: boolean expected"; return null; }; /** - * Creates an AnswerFeedback message from a plain object. Also converts values to their respective internal types. + * Creates a ConversationParticipant message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback + * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.AnswerFeedback} AnswerFeedback + * @returns {google.cloud.contactcenterinsights.v1.ConversationParticipant} ConversationParticipant */ - AnswerFeedback.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.AnswerFeedback) + ConversationParticipant.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ConversationParticipant) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.AnswerFeedback(); - switch (object.correctnessLevel) { + var message = new $root.google.cloud.contactcenterinsights.v1.ConversationParticipant(); + if (object.dialogflowParticipantName != null) + message.dialogflowParticipantName = String(object.dialogflowParticipantName); + if (object.userId != null) + message.userId = String(object.userId); + if (object.dialogflowParticipant != null) + message.dialogflowParticipant = String(object.dialogflowParticipant); + if (object.obfuscatedExternalUserId != null) + message.obfuscatedExternalUserId = String(object.obfuscatedExternalUserId); + switch (object.role) { default: - if (typeof object.correctnessLevel === "number") { - message.correctnessLevel = object.correctnessLevel; + if (typeof object.role === "number") { + message.role = object.role; break; } break; - case "CORRECTNESS_LEVEL_UNSPECIFIED": + case "ROLE_UNSPECIFIED": case 0: - message.correctnessLevel = 0; + message.role = 0; break; - case "NOT_CORRECT": + case "HUMAN_AGENT": case 1: - message.correctnessLevel = 1; + message.role = 1; break; - case "PARTIALLY_CORRECT": + case "AUTOMATED_AGENT": case 2: - message.correctnessLevel = 2; + message.role = 2; break; - case "FULLY_CORRECT": + case "END_USER": case 3: - message.correctnessLevel = 3; + message.role = 3; + break; + case "ANY_AGENT": + case 4: + message.role = 4; break; } - if (object.clicked != null) - message.clicked = Boolean(object.clicked); - if (object.displayed != null) - message.displayed = Boolean(object.displayed); return message; }; /** - * Creates a plain object from an AnswerFeedback message. Also converts values to other types if specified. + * Creates a plain object from a ConversationParticipant message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback + * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant * @static - * @param {google.cloud.contactcenterinsights.v1.AnswerFeedback} message AnswerFeedback + * @param {google.cloud.contactcenterinsights.v1.ConversationParticipant} message ConversationParticipant * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AnswerFeedback.toObject = function toObject(message, options) { + ConversationParticipant.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.correctnessLevel = options.enums === String ? "CORRECTNESS_LEVEL_UNSPECIFIED" : 0; - object.clicked = false; - object.displayed = false; + object.dialogflowParticipant = ""; + object.role = options.enums === String ? "ROLE_UNSPECIFIED" : 0; + object.obfuscatedExternalUserId = ""; + } + if (message.dialogflowParticipant != null && message.hasOwnProperty("dialogflowParticipant")) + object.dialogflowParticipant = message.dialogflowParticipant; + if (message.role != null && message.hasOwnProperty("role")) + object.role = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.ConversationParticipant.Role[message.role] === undefined ? message.role : $root.google.cloud.contactcenterinsights.v1.ConversationParticipant.Role[message.role] : message.role; + if (message.obfuscatedExternalUserId != null && message.hasOwnProperty("obfuscatedExternalUserId")) + object.obfuscatedExternalUserId = message.obfuscatedExternalUserId; + if (message.dialogflowParticipantName != null && message.hasOwnProperty("dialogflowParticipantName")) { + object.dialogflowParticipantName = message.dialogflowParticipantName; + if (options.oneofs) + object.participant = "dialogflowParticipantName"; + } + if (message.userId != null && message.hasOwnProperty("userId")) { + object.userId = message.userId; + if (options.oneofs) + object.participant = "userId"; } - if (message.correctnessLevel != null && message.hasOwnProperty("correctnessLevel")) - object.correctnessLevel = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.AnswerFeedback.CorrectnessLevel[message.correctnessLevel] === undefined ? message.correctnessLevel : $root.google.cloud.contactcenterinsights.v1.AnswerFeedback.CorrectnessLevel[message.correctnessLevel] : message.correctnessLevel; - if (message.clicked != null && message.hasOwnProperty("clicked")) - object.clicked = message.clicked; - if (message.displayed != null && message.hasOwnProperty("displayed")) - object.displayed = message.displayed; return object; }; /** - * Converts this AnswerFeedback to JSON. + * Converts this ConversationParticipant to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback + * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant * @instance * @returns {Object.} JSON object */ - AnswerFeedback.prototype.toJSON = function toJSON() { + ConversationParticipant.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AnswerFeedback + * Gets the default type url for ConversationParticipant * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.AnswerFeedback + * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AnswerFeedback.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ConversationParticipant.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.AnswerFeedback"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ConversationParticipant"; }; /** - * CorrectnessLevel enum. - * @name google.cloud.contactcenterinsights.v1.AnswerFeedback.CorrectnessLevel + * Role enum. + * @name google.cloud.contactcenterinsights.v1.ConversationParticipant.Role * @enum {number} - * @property {number} CORRECTNESS_LEVEL_UNSPECIFIED=0 CORRECTNESS_LEVEL_UNSPECIFIED value - * @property {number} NOT_CORRECT=1 NOT_CORRECT value - * @property {number} PARTIALLY_CORRECT=2 PARTIALLY_CORRECT value - * @property {number} FULLY_CORRECT=3 FULLY_CORRECT value + * @property {number} ROLE_UNSPECIFIED=0 ROLE_UNSPECIFIED value + * @property {number} HUMAN_AGENT=1 HUMAN_AGENT value + * @property {number} AUTOMATED_AGENT=2 AUTOMATED_AGENT value + * @property {number} END_USER=3 END_USER value + * @property {number} ANY_AGENT=4 ANY_AGENT value */ - AnswerFeedback.CorrectnessLevel = (function() { + ConversationParticipant.Role = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CORRECTNESS_LEVEL_UNSPECIFIED"] = 0; - values[valuesById[1] = "NOT_CORRECT"] = 1; - values[valuesById[2] = "PARTIALLY_CORRECT"] = 2; - values[valuesById[3] = "FULLY_CORRECT"] = 3; + values[valuesById[0] = "ROLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "HUMAN_AGENT"] = 1; + values[valuesById[2] = "AUTOMATED_AGENT"] = 2; + values[valuesById[3] = "END_USER"] = 3; + values[valuesById[4] = "ANY_AGENT"] = 4; return values; })(); - return AnswerFeedback; + return ConversationParticipant; })(); - v1.ArticleSuggestionData = (function() { + v1.View = (function() { /** - * Properties of an ArticleSuggestionData. + * Properties of a View. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IArticleSuggestionData - * @property {string|null} [title] ArticleSuggestionData title - * @property {string|null} [uri] ArticleSuggestionData uri - * @property {number|null} [confidenceScore] ArticleSuggestionData confidenceScore - * @property {Object.|null} [metadata] ArticleSuggestionData metadata - * @property {string|null} [queryRecord] ArticleSuggestionData queryRecord - * @property {string|null} [source] ArticleSuggestionData source + * @interface IView + * @property {string|null} [name] View name + * @property {string|null} [displayName] View displayName + * @property {google.protobuf.ITimestamp|null} [createTime] View createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] View updateTime + * @property {string|null} [value] View value */ /** - * Constructs a new ArticleSuggestionData. + * Constructs a new View. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents an ArticleSuggestionData. - * @implements IArticleSuggestionData + * @classdesc Represents a View. + * @implements IView * @constructor - * @param {google.cloud.contactcenterinsights.v1.IArticleSuggestionData=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IView=} [properties] Properties to set */ - function ArticleSuggestionData(properties) { - this.metadata = {}; + function View(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36524,165 +56761,131 @@ } /** - * ArticleSuggestionData title. - * @member {string} title - * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData - * @instance - */ - ArticleSuggestionData.prototype.title = ""; - - /** - * ArticleSuggestionData uri. - * @member {string} uri - * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData + * View name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.View * @instance */ - ArticleSuggestionData.prototype.uri = ""; + View.prototype.name = ""; /** - * ArticleSuggestionData confidenceScore. - * @member {number} confidenceScore - * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData + * View displayName. + * @member {string} displayName + * @memberof google.cloud.contactcenterinsights.v1.View * @instance */ - ArticleSuggestionData.prototype.confidenceScore = 0; + View.prototype.displayName = ""; /** - * ArticleSuggestionData metadata. - * @member {Object.} metadata - * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData + * View createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.contactcenterinsights.v1.View * @instance */ - ArticleSuggestionData.prototype.metadata = $util.emptyObject; + View.prototype.createTime = null; /** - * ArticleSuggestionData queryRecord. - * @member {string} queryRecord - * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData + * View updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.contactcenterinsights.v1.View * @instance */ - ArticleSuggestionData.prototype.queryRecord = ""; + View.prototype.updateTime = null; /** - * ArticleSuggestionData source. - * @member {string} source - * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData + * View value. + * @member {string} value + * @memberof google.cloud.contactcenterinsights.v1.View * @instance */ - ArticleSuggestionData.prototype.source = ""; + View.prototype.value = ""; /** - * Creates a new ArticleSuggestionData instance using the specified properties. + * Creates a new View instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData + * @memberof google.cloud.contactcenterinsights.v1.View * @static - * @param {google.cloud.contactcenterinsights.v1.IArticleSuggestionData=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.ArticleSuggestionData} ArticleSuggestionData instance + * @param {google.cloud.contactcenterinsights.v1.IView=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.View} View instance */ - ArticleSuggestionData.create = function create(properties) { - return new ArticleSuggestionData(properties); + View.create = function create(properties) { + return new View(properties); }; /** - * Encodes the specified ArticleSuggestionData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ArticleSuggestionData.verify|verify} messages. + * Encodes the specified View message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.View.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData + * @memberof google.cloud.contactcenterinsights.v1.View * @static - * @param {google.cloud.contactcenterinsights.v1.IArticleSuggestionData} message ArticleSuggestionData message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IView} message View message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ArticleSuggestionData.encode = function encode(message, writer) { + View.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.confidenceScore != null && Object.hasOwnProperty.call(message, "confidenceScore")) - writer.uint32(/* id 3, wireType 5 =*/29).float(message.confidenceScore); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); - if (message.queryRecord != null && Object.hasOwnProperty.call(message, "queryRecord")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.queryRecord); - if (message.source != null && Object.hasOwnProperty.call(message, "source")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.source); + 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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.value); return writer; }; /** - * Encodes the specified ArticleSuggestionData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ArticleSuggestionData.verify|verify} messages. + * Encodes the specified View message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.View.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData + * @memberof google.cloud.contactcenterinsights.v1.View * @static - * @param {google.cloud.contactcenterinsights.v1.IArticleSuggestionData} message ArticleSuggestionData message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IView} message View message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ArticleSuggestionData.encodeDelimited = function encodeDelimited(message, writer) { + View.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ArticleSuggestionData message from the specified reader or buffer. + * Decodes a View message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData + * @memberof google.cloud.contactcenterinsights.v1.View * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.ArticleSuggestionData} ArticleSuggestionData + * @returns {google.cloud.contactcenterinsights.v1.View} View * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ArticleSuggestionData.decode = function decode(reader, length) { + View.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ArticleSuggestionData(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.View(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.title = reader.string(); + message.name = reader.string(); break; } case 2: { - message.uri = reader.string(); + message.displayName = reader.string(); break; } case 3: { - message.confidenceScore = reader.float(); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 4: { - if (message.metadata === $util.emptyObject) - message.metadata = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.metadata[key] = value; - break; - } - case 5: { - message.queryRecord = reader.string(); + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } - case 6: { - message.source = reader.string(); + case 5: { + message.value = reader.string(); break; } default: @@ -36694,184 +56897,179 @@ }; /** - * Decodes an ArticleSuggestionData message from the specified reader or buffer, length delimited. + * Decodes a View message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData + * @memberof google.cloud.contactcenterinsights.v1.View * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.ArticleSuggestionData} ArticleSuggestionData + * @returns {google.cloud.contactcenterinsights.v1.View} View * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ArticleSuggestionData.decodeDelimited = function decodeDelimited(reader) { + View.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ArticleSuggestionData message. + * Verifies a View message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData + * @memberof google.cloud.contactcenterinsights.v1.View * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ArticleSuggestionData.verify = function verify(message) { + View.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.confidenceScore != null && message.hasOwnProperty("confidenceScore")) - if (typeof message.confidenceScore !== "number") - return "confidenceScore: number expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - if (!$util.isObject(message.metadata)) - return "metadata: object expected"; - var key = Object.keys(message.metadata); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.metadata[key[i]])) - return "metadata: string{k:string} expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; } - if (message.queryRecord != null && message.hasOwnProperty("queryRecord")) - if (!$util.isString(message.queryRecord)) - return "queryRecord: string expected"; - if (message.source != null && message.hasOwnProperty("source")) - if (!$util.isString(message.source)) - return "source: string expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; return null; }; /** - * Creates an ArticleSuggestionData message from a plain object. Also converts values to their respective internal types. + * Creates a View message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData + * @memberof google.cloud.contactcenterinsights.v1.View * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.ArticleSuggestionData} ArticleSuggestionData + * @returns {google.cloud.contactcenterinsights.v1.View} View */ - ArticleSuggestionData.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.ArticleSuggestionData) + View.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.View) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.ArticleSuggestionData(); - if (object.title != null) - message.title = String(object.title); - if (object.uri != null) - message.uri = String(object.uri); - if (object.confidenceScore != null) - message.confidenceScore = Number(object.confidenceScore); - if (object.metadata) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.ArticleSuggestionData.metadata: object expected"); - message.metadata = {}; - for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) - message.metadata[keys[i]] = String(object.metadata[keys[i]]); + var message = new $root.google.cloud.contactcenterinsights.v1.View(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.View.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - if (object.queryRecord != null) - message.queryRecord = String(object.queryRecord); - if (object.source != null) - message.source = String(object.source); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.View.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.value != null) + message.value = String(object.value); return message; }; /** - * Creates a plain object from an ArticleSuggestionData message. Also converts values to other types if specified. + * Creates a plain object from a View message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData + * @memberof google.cloud.contactcenterinsights.v1.View * @static - * @param {google.cloud.contactcenterinsights.v1.ArticleSuggestionData} message ArticleSuggestionData + * @param {google.cloud.contactcenterinsights.v1.View} message View * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ArticleSuggestionData.toObject = function toObject(message, options) { + View.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.metadata = {}; if (options.defaults) { - object.title = ""; - object.uri = ""; - object.confidenceScore = 0; - object.queryRecord = ""; - object.source = ""; - } - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.confidenceScore != null && message.hasOwnProperty("confidenceScore")) - object.confidenceScore = options.json && !isFinite(message.confidenceScore) ? String(message.confidenceScore) : message.confidenceScore; - var keys2; - if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { - object.metadata = {}; - for (var j = 0; j < keys2.length; ++j) - object.metadata[keys2[j]] = message.metadata[keys2[j]]; + object.name = ""; + object.displayName = ""; + object.createTime = null; + object.updateTime = null; + object.value = ""; } - if (message.queryRecord != null && message.hasOwnProperty("queryRecord")) - object.queryRecord = message.queryRecord; - if (message.source != null && message.hasOwnProperty("source")) - object.source = message.source; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; return object; }; /** - * Converts this ArticleSuggestionData to JSON. + * Converts this View to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData + * @memberof google.cloud.contactcenterinsights.v1.View * @instance * @returns {Object.} JSON object */ - ArticleSuggestionData.prototype.toJSON = function toJSON() { + View.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ArticleSuggestionData + * Gets the default type url for View * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.ArticleSuggestionData + * @memberof google.cloud.contactcenterinsights.v1.View * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ArticleSuggestionData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + View.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ArticleSuggestionData"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.View"; }; - return ArticleSuggestionData; + return View; })(); - v1.FaqAnswerData = (function() { + v1.AnnotatorSelector = (function() { /** - * Properties of a FaqAnswerData. + * Properties of an AnnotatorSelector. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IFaqAnswerData - * @property {string|null} [answer] FaqAnswerData answer - * @property {number|null} [confidenceScore] FaqAnswerData confidenceScore - * @property {string|null} [question] FaqAnswerData question - * @property {Object.|null} [metadata] FaqAnswerData metadata - * @property {string|null} [queryRecord] FaqAnswerData queryRecord - * @property {string|null} [source] FaqAnswerData source + * @interface IAnnotatorSelector + * @property {boolean|null} [runInterruptionAnnotator] AnnotatorSelector runInterruptionAnnotator + * @property {boolean|null} [runSilenceAnnotator] AnnotatorSelector runSilenceAnnotator + * @property {boolean|null} [runPhraseMatcherAnnotator] AnnotatorSelector runPhraseMatcherAnnotator + * @property {Array.|null} [phraseMatchers] AnnotatorSelector phraseMatchers + * @property {boolean|null} [runSentimentAnnotator] AnnotatorSelector runSentimentAnnotator + * @property {boolean|null} [runEntityAnnotator] AnnotatorSelector runEntityAnnotator + * @property {boolean|null} [runIntentAnnotator] AnnotatorSelector runIntentAnnotator + * @property {boolean|null} [runIssueModelAnnotator] AnnotatorSelector runIssueModelAnnotator + * @property {Array.|null} [issueModels] AnnotatorSelector issueModels + * @property {boolean|null} [runSummarizationAnnotator] AnnotatorSelector runSummarizationAnnotator + * @property {google.cloud.contactcenterinsights.v1.AnnotatorSelector.ISummarizationConfig|null} [summarizationConfig] AnnotatorSelector summarizationConfig + * @property {boolean|null} [runQaAnnotator] AnnotatorSelector runQaAnnotator + * @property {google.cloud.contactcenterinsights.v1.AnnotatorSelector.IQaConfig|null} [qaConfig] AnnotatorSelector qaConfig */ /** - * Constructs a new FaqAnswerData. + * Constructs a new AnnotatorSelector. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a FaqAnswerData. - * @implements IFaqAnswerData + * @classdesc Represents an AnnotatorSelector. + * @implements IAnnotatorSelector * @constructor - * @param {google.cloud.contactcenterinsights.v1.IFaqAnswerData=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IAnnotatorSelector=} [properties] Properties to set */ - function FaqAnswerData(properties) { - this.metadata = {}; + function AnnotatorSelector(properties) { + this.phraseMatchers = []; + this.issueModels = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36879,165 +57077,249 @@ } /** - * FaqAnswerData answer. - * @member {string} answer - * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData + * AnnotatorSelector runInterruptionAnnotator. + * @member {boolean} runInterruptionAnnotator + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector * @instance */ - FaqAnswerData.prototype.answer = ""; + AnnotatorSelector.prototype.runInterruptionAnnotator = false; /** - * FaqAnswerData confidenceScore. - * @member {number} confidenceScore - * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData + * AnnotatorSelector runSilenceAnnotator. + * @member {boolean} runSilenceAnnotator + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector * @instance */ - FaqAnswerData.prototype.confidenceScore = 0; + AnnotatorSelector.prototype.runSilenceAnnotator = false; /** - * FaqAnswerData question. - * @member {string} question - * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData + * AnnotatorSelector runPhraseMatcherAnnotator. + * @member {boolean} runPhraseMatcherAnnotator + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector * @instance */ - FaqAnswerData.prototype.question = ""; + AnnotatorSelector.prototype.runPhraseMatcherAnnotator = false; /** - * FaqAnswerData metadata. - * @member {Object.} metadata - * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData + * AnnotatorSelector phraseMatchers. + * @member {Array.} phraseMatchers + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector * @instance */ - FaqAnswerData.prototype.metadata = $util.emptyObject; + AnnotatorSelector.prototype.phraseMatchers = $util.emptyArray; /** - * FaqAnswerData queryRecord. - * @member {string} queryRecord - * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData + * AnnotatorSelector runSentimentAnnotator. + * @member {boolean} runSentimentAnnotator + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector * @instance */ - FaqAnswerData.prototype.queryRecord = ""; + AnnotatorSelector.prototype.runSentimentAnnotator = false; /** - * FaqAnswerData source. - * @member {string} source - * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData + * AnnotatorSelector runEntityAnnotator. + * @member {boolean} runEntityAnnotator + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector * @instance */ - FaqAnswerData.prototype.source = ""; + AnnotatorSelector.prototype.runEntityAnnotator = false; /** - * Creates a new FaqAnswerData instance using the specified properties. + * AnnotatorSelector runIntentAnnotator. + * @member {boolean} runIntentAnnotator + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @instance + */ + AnnotatorSelector.prototype.runIntentAnnotator = false; + + /** + * AnnotatorSelector runIssueModelAnnotator. + * @member {boolean} runIssueModelAnnotator + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @instance + */ + AnnotatorSelector.prototype.runIssueModelAnnotator = false; + + /** + * AnnotatorSelector issueModels. + * @member {Array.} issueModels + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @instance + */ + AnnotatorSelector.prototype.issueModels = $util.emptyArray; + + /** + * AnnotatorSelector runSummarizationAnnotator. + * @member {boolean} runSummarizationAnnotator + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @instance + */ + AnnotatorSelector.prototype.runSummarizationAnnotator = false; + + /** + * AnnotatorSelector summarizationConfig. + * @member {google.cloud.contactcenterinsights.v1.AnnotatorSelector.ISummarizationConfig|null|undefined} summarizationConfig + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @instance + */ + AnnotatorSelector.prototype.summarizationConfig = null; + + /** + * AnnotatorSelector runQaAnnotator. + * @member {boolean} runQaAnnotator + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @instance + */ + AnnotatorSelector.prototype.runQaAnnotator = false; + + /** + * AnnotatorSelector qaConfig. + * @member {google.cloud.contactcenterinsights.v1.AnnotatorSelector.IQaConfig|null|undefined} qaConfig + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @instance + */ + AnnotatorSelector.prototype.qaConfig = null; + + /** + * Creates a new AnnotatorSelector instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector * @static - * @param {google.cloud.contactcenterinsights.v1.IFaqAnswerData=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.FaqAnswerData} FaqAnswerData instance + * @param {google.cloud.contactcenterinsights.v1.IAnnotatorSelector=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.AnnotatorSelector} AnnotatorSelector instance */ - FaqAnswerData.create = function create(properties) { - return new FaqAnswerData(properties); + AnnotatorSelector.create = function create(properties) { + return new AnnotatorSelector(properties); }; /** - * Encodes the specified FaqAnswerData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.FaqAnswerData.verify|verify} messages. + * Encodes the specified AnnotatorSelector message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotatorSelector.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector * @static - * @param {google.cloud.contactcenterinsights.v1.IFaqAnswerData} message FaqAnswerData message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IAnnotatorSelector} message AnnotatorSelector message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FaqAnswerData.encode = function encode(message, writer) { + AnnotatorSelector.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.answer != null && Object.hasOwnProperty.call(message, "answer")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.answer); - if (message.confidenceScore != null && Object.hasOwnProperty.call(message, "confidenceScore")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidenceScore); - if (message.question != null && Object.hasOwnProperty.call(message, "question")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.question); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); - if (message.queryRecord != null && Object.hasOwnProperty.call(message, "queryRecord")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.queryRecord); - if (message.source != null && Object.hasOwnProperty.call(message, "source")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.source); + if (message.runInterruptionAnnotator != null && Object.hasOwnProperty.call(message, "runInterruptionAnnotator")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.runInterruptionAnnotator); + if (message.runSilenceAnnotator != null && Object.hasOwnProperty.call(message, "runSilenceAnnotator")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.runSilenceAnnotator); + if (message.runPhraseMatcherAnnotator != null && Object.hasOwnProperty.call(message, "runPhraseMatcherAnnotator")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.runPhraseMatcherAnnotator); + if (message.phraseMatchers != null && message.phraseMatchers.length) + for (var i = 0; i < message.phraseMatchers.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.phraseMatchers[i]); + if (message.runSentimentAnnotator != null && Object.hasOwnProperty.call(message, "runSentimentAnnotator")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.runSentimentAnnotator); + if (message.runEntityAnnotator != null && Object.hasOwnProperty.call(message, "runEntityAnnotator")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.runEntityAnnotator); + if (message.runIntentAnnotator != null && Object.hasOwnProperty.call(message, "runIntentAnnotator")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.runIntentAnnotator); + if (message.runIssueModelAnnotator != null && Object.hasOwnProperty.call(message, "runIssueModelAnnotator")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.runIssueModelAnnotator); + if (message.runSummarizationAnnotator != null && Object.hasOwnProperty.call(message, "runSummarizationAnnotator")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.runSummarizationAnnotator); + if (message.issueModels != null && message.issueModels.length) + for (var i = 0; i < message.issueModels.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.issueModels[i]); + if (message.summarizationConfig != null && Object.hasOwnProperty.call(message, "summarizationConfig")) + $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.encode(message.summarizationConfig, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.runQaAnnotator != null && Object.hasOwnProperty.call(message, "runQaAnnotator")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.runQaAnnotator); + if (message.qaConfig != null && Object.hasOwnProperty.call(message, "qaConfig")) + $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.encode(message.qaConfig, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); return writer; }; /** - * Encodes the specified FaqAnswerData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.FaqAnswerData.verify|verify} messages. + * Encodes the specified AnnotatorSelector message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotatorSelector.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector * @static - * @param {google.cloud.contactcenterinsights.v1.IFaqAnswerData} message FaqAnswerData message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IAnnotatorSelector} message AnnotatorSelector message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FaqAnswerData.encodeDelimited = function encodeDelimited(message, writer) { + AnnotatorSelector.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FaqAnswerData message from the specified reader or buffer. + * Decodes an AnnotatorSelector message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.FaqAnswerData} FaqAnswerData + * @returns {google.cloud.contactcenterinsights.v1.AnnotatorSelector} AnnotatorSelector * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FaqAnswerData.decode = function decode(reader, length) { + AnnotatorSelector.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.FaqAnswerData(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.answer = reader.string(); + message.runInterruptionAnnotator = reader.bool(); break; } case 2: { - message.confidenceScore = reader.float(); + message.runSilenceAnnotator = reader.bool(); break; } case 3: { - message.question = reader.string(); + message.runPhraseMatcherAnnotator = reader.bool(); break; } case 4: { - if (message.metadata === $util.emptyObject) - message.metadata = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.metadata[key] = value; + if (!(message.phraseMatchers && message.phraseMatchers.length)) + message.phraseMatchers = []; + message.phraseMatchers.push(reader.string()); break; } case 5: { - message.queryRecord = reader.string(); + message.runSentimentAnnotator = reader.bool(); break; } case 6: { - message.source = reader.string(); + message.runEntityAnnotator = reader.bool(); + break; + } + case 7: { + message.runIntentAnnotator = reader.bool(); + break; + } + case 8: { + message.runIssueModelAnnotator = reader.bool(); + break; + } + case 10: { + if (!(message.issueModels && message.issueModels.length)) + message.issueModels = []; + message.issueModels.push(reader.string()); + break; + } + case 9: { + message.runSummarizationAnnotator = reader.bool(); + break; + } + case 11: { + message.summarizationConfig = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.decode(reader, reader.uint32()); + break; + } + case 12: { + message.runQaAnnotator = reader.bool(); + break; + } + case 13: { + message.qaConfig = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.decode(reader, reader.uint32()); break; } default: @@ -37049,491 +57331,1003 @@ }; /** - * Decodes a FaqAnswerData message from the specified reader or buffer, length delimited. + * Decodes an AnnotatorSelector message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.FaqAnswerData} FaqAnswerData + * @returns {google.cloud.contactcenterinsights.v1.AnnotatorSelector} AnnotatorSelector * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FaqAnswerData.decodeDelimited = function decodeDelimited(reader) { + AnnotatorSelector.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FaqAnswerData message. + * Verifies an AnnotatorSelector message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FaqAnswerData.verify = function verify(message) { + AnnotatorSelector.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.answer != null && message.hasOwnProperty("answer")) - if (!$util.isString(message.answer)) - return "answer: string expected"; - if (message.confidenceScore != null && message.hasOwnProperty("confidenceScore")) - if (typeof message.confidenceScore !== "number") - return "confidenceScore: number expected"; - if (message.question != null && message.hasOwnProperty("question")) - if (!$util.isString(message.question)) - return "question: string expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - if (!$util.isObject(message.metadata)) - return "metadata: object expected"; - var key = Object.keys(message.metadata); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.metadata[key[i]])) - return "metadata: string{k:string} expected"; + if (message.runInterruptionAnnotator != null && message.hasOwnProperty("runInterruptionAnnotator")) + if (typeof message.runInterruptionAnnotator !== "boolean") + return "runInterruptionAnnotator: boolean expected"; + if (message.runSilenceAnnotator != null && message.hasOwnProperty("runSilenceAnnotator")) + if (typeof message.runSilenceAnnotator !== "boolean") + return "runSilenceAnnotator: boolean expected"; + if (message.runPhraseMatcherAnnotator != null && message.hasOwnProperty("runPhraseMatcherAnnotator")) + if (typeof message.runPhraseMatcherAnnotator !== "boolean") + return "runPhraseMatcherAnnotator: boolean expected"; + if (message.phraseMatchers != null && message.hasOwnProperty("phraseMatchers")) { + if (!Array.isArray(message.phraseMatchers)) + return "phraseMatchers: array expected"; + for (var i = 0; i < message.phraseMatchers.length; ++i) + if (!$util.isString(message.phraseMatchers[i])) + return "phraseMatchers: string[] expected"; + } + if (message.runSentimentAnnotator != null && message.hasOwnProperty("runSentimentAnnotator")) + if (typeof message.runSentimentAnnotator !== "boolean") + return "runSentimentAnnotator: boolean expected"; + if (message.runEntityAnnotator != null && message.hasOwnProperty("runEntityAnnotator")) + if (typeof message.runEntityAnnotator !== "boolean") + return "runEntityAnnotator: boolean expected"; + if (message.runIntentAnnotator != null && message.hasOwnProperty("runIntentAnnotator")) + if (typeof message.runIntentAnnotator !== "boolean") + return "runIntentAnnotator: boolean expected"; + if (message.runIssueModelAnnotator != null && message.hasOwnProperty("runIssueModelAnnotator")) + if (typeof message.runIssueModelAnnotator !== "boolean") + return "runIssueModelAnnotator: boolean expected"; + if (message.issueModels != null && message.hasOwnProperty("issueModels")) { + if (!Array.isArray(message.issueModels)) + return "issueModels: array expected"; + for (var i = 0; i < message.issueModels.length; ++i) + if (!$util.isString(message.issueModels[i])) + return "issueModels: string[] expected"; + } + if (message.runSummarizationAnnotator != null && message.hasOwnProperty("runSummarizationAnnotator")) + if (typeof message.runSummarizationAnnotator !== "boolean") + return "runSummarizationAnnotator: boolean expected"; + if (message.summarizationConfig != null && message.hasOwnProperty("summarizationConfig")) { + var error = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.verify(message.summarizationConfig); + if (error) + return "summarizationConfig." + error; + } + if (message.runQaAnnotator != null && message.hasOwnProperty("runQaAnnotator")) + if (typeof message.runQaAnnotator !== "boolean") + return "runQaAnnotator: boolean expected"; + if (message.qaConfig != null && message.hasOwnProperty("qaConfig")) { + var error = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.verify(message.qaConfig); + if (error) + return "qaConfig." + error; } - if (message.queryRecord != null && message.hasOwnProperty("queryRecord")) - if (!$util.isString(message.queryRecord)) - return "queryRecord: string expected"; - if (message.source != null && message.hasOwnProperty("source")) - if (!$util.isString(message.source)) - return "source: string expected"; return null; }; /** - * Creates a FaqAnswerData message from a plain object. Also converts values to their respective internal types. + * Creates an AnnotatorSelector message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.FaqAnswerData} FaqAnswerData + * @returns {google.cloud.contactcenterinsights.v1.AnnotatorSelector} AnnotatorSelector */ - FaqAnswerData.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.FaqAnswerData) + AnnotatorSelector.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.FaqAnswerData(); - if (object.answer != null) - message.answer = String(object.answer); - if (object.confidenceScore != null) - message.confidenceScore = Number(object.confidenceScore); - if (object.question != null) - message.question = String(object.question); - if (object.metadata) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.FaqAnswerData.metadata: object expected"); - message.metadata = {}; - for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) - message.metadata[keys[i]] = String(object.metadata[keys[i]]); + var message = new $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector(); + if (object.runInterruptionAnnotator != null) + message.runInterruptionAnnotator = Boolean(object.runInterruptionAnnotator); + if (object.runSilenceAnnotator != null) + message.runSilenceAnnotator = Boolean(object.runSilenceAnnotator); + if (object.runPhraseMatcherAnnotator != null) + message.runPhraseMatcherAnnotator = Boolean(object.runPhraseMatcherAnnotator); + if (object.phraseMatchers) { + if (!Array.isArray(object.phraseMatchers)) + throw TypeError(".google.cloud.contactcenterinsights.v1.AnnotatorSelector.phraseMatchers: array expected"); + message.phraseMatchers = []; + for (var i = 0; i < object.phraseMatchers.length; ++i) + message.phraseMatchers[i] = String(object.phraseMatchers[i]); + } + if (object.runSentimentAnnotator != null) + message.runSentimentAnnotator = Boolean(object.runSentimentAnnotator); + if (object.runEntityAnnotator != null) + message.runEntityAnnotator = Boolean(object.runEntityAnnotator); + if (object.runIntentAnnotator != null) + message.runIntentAnnotator = Boolean(object.runIntentAnnotator); + if (object.runIssueModelAnnotator != null) + message.runIssueModelAnnotator = Boolean(object.runIssueModelAnnotator); + if (object.issueModels) { + if (!Array.isArray(object.issueModels)) + throw TypeError(".google.cloud.contactcenterinsights.v1.AnnotatorSelector.issueModels: array expected"); + message.issueModels = []; + for (var i = 0; i < object.issueModels.length; ++i) + message.issueModels[i] = String(object.issueModels[i]); + } + if (object.runSummarizationAnnotator != null) + message.runSummarizationAnnotator = Boolean(object.runSummarizationAnnotator); + if (object.summarizationConfig != null) { + if (typeof object.summarizationConfig !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.AnnotatorSelector.summarizationConfig: object expected"); + message.summarizationConfig = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.fromObject(object.summarizationConfig); + } + if (object.runQaAnnotator != null) + message.runQaAnnotator = Boolean(object.runQaAnnotator); + if (object.qaConfig != null) { + if (typeof object.qaConfig !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.AnnotatorSelector.qaConfig: object expected"); + message.qaConfig = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.fromObject(object.qaConfig); } - if (object.queryRecord != null) - message.queryRecord = String(object.queryRecord); - if (object.source != null) - message.source = String(object.source); return message; }; /** - * Creates a plain object from a FaqAnswerData message. Also converts values to other types if specified. + * Creates a plain object from an AnnotatorSelector message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector * @static - * @param {google.cloud.contactcenterinsights.v1.FaqAnswerData} message FaqAnswerData + * @param {google.cloud.contactcenterinsights.v1.AnnotatorSelector} message AnnotatorSelector * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FaqAnswerData.toObject = function toObject(message, options) { + AnnotatorSelector.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.metadata = {}; + if (options.arrays || options.defaults) { + object.phraseMatchers = []; + object.issueModels = []; + } if (options.defaults) { - object.answer = ""; - object.confidenceScore = 0; - object.question = ""; - object.queryRecord = ""; - object.source = ""; + object.runInterruptionAnnotator = false; + object.runSilenceAnnotator = false; + object.runPhraseMatcherAnnotator = false; + object.runSentimentAnnotator = false; + object.runEntityAnnotator = false; + object.runIntentAnnotator = false; + object.runIssueModelAnnotator = false; + object.runSummarizationAnnotator = false; + object.summarizationConfig = null; + object.runQaAnnotator = false; + object.qaConfig = null; } - if (message.answer != null && message.hasOwnProperty("answer")) - object.answer = message.answer; - if (message.confidenceScore != null && message.hasOwnProperty("confidenceScore")) - object.confidenceScore = options.json && !isFinite(message.confidenceScore) ? String(message.confidenceScore) : message.confidenceScore; - if (message.question != null && message.hasOwnProperty("question")) - object.question = message.question; - var keys2; - if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { - object.metadata = {}; - for (var j = 0; j < keys2.length; ++j) - object.metadata[keys2[j]] = message.metadata[keys2[j]]; + if (message.runInterruptionAnnotator != null && message.hasOwnProperty("runInterruptionAnnotator")) + object.runInterruptionAnnotator = message.runInterruptionAnnotator; + if (message.runSilenceAnnotator != null && message.hasOwnProperty("runSilenceAnnotator")) + object.runSilenceAnnotator = message.runSilenceAnnotator; + if (message.runPhraseMatcherAnnotator != null && message.hasOwnProperty("runPhraseMatcherAnnotator")) + object.runPhraseMatcherAnnotator = message.runPhraseMatcherAnnotator; + if (message.phraseMatchers && message.phraseMatchers.length) { + object.phraseMatchers = []; + for (var j = 0; j < message.phraseMatchers.length; ++j) + object.phraseMatchers[j] = message.phraseMatchers[j]; } - if (message.queryRecord != null && message.hasOwnProperty("queryRecord")) - object.queryRecord = message.queryRecord; - if (message.source != null && message.hasOwnProperty("source")) - object.source = message.source; + if (message.runSentimentAnnotator != null && message.hasOwnProperty("runSentimentAnnotator")) + object.runSentimentAnnotator = message.runSentimentAnnotator; + if (message.runEntityAnnotator != null && message.hasOwnProperty("runEntityAnnotator")) + object.runEntityAnnotator = message.runEntityAnnotator; + if (message.runIntentAnnotator != null && message.hasOwnProperty("runIntentAnnotator")) + object.runIntentAnnotator = message.runIntentAnnotator; + if (message.runIssueModelAnnotator != null && message.hasOwnProperty("runIssueModelAnnotator")) + object.runIssueModelAnnotator = message.runIssueModelAnnotator; + if (message.runSummarizationAnnotator != null && message.hasOwnProperty("runSummarizationAnnotator")) + object.runSummarizationAnnotator = message.runSummarizationAnnotator; + if (message.issueModels && message.issueModels.length) { + object.issueModels = []; + for (var j = 0; j < message.issueModels.length; ++j) + object.issueModels[j] = message.issueModels[j]; + } + if (message.summarizationConfig != null && message.hasOwnProperty("summarizationConfig")) + object.summarizationConfig = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.toObject(message.summarizationConfig, options); + if (message.runQaAnnotator != null && message.hasOwnProperty("runQaAnnotator")) + object.runQaAnnotator = message.runQaAnnotator; + if (message.qaConfig != null && message.hasOwnProperty("qaConfig")) + object.qaConfig = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.toObject(message.qaConfig, options); return object; }; - /** - * Converts this FaqAnswerData to JSON. - * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData - * @instance - * @returns {Object.} JSON object - */ - FaqAnswerData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this AnnotatorSelector to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @instance + * @returns {Object.} JSON object + */ + AnnotatorSelector.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AnnotatorSelector + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnnotatorSelector.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.AnnotatorSelector"; + }; + + AnnotatorSelector.SummarizationConfig = (function() { + + /** + * Properties of a SummarizationConfig. + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @interface ISummarizationConfig + * @property {string|null} [conversationProfile] SummarizationConfig conversationProfile + * @property {google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.SummarizationModel|null} [summarizationModel] SummarizationConfig summarizationModel + */ + + /** + * Constructs a new SummarizationConfig. + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @classdesc Represents a SummarizationConfig. + * @implements ISummarizationConfig + * @constructor + * @param {google.cloud.contactcenterinsights.v1.AnnotatorSelector.ISummarizationConfig=} [properties] Properties to set + */ + function SummarizationConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SummarizationConfig conversationProfile. + * @member {string|null|undefined} conversationProfile + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * @instance + */ + SummarizationConfig.prototype.conversationProfile = null; + + /** + * SummarizationConfig summarizationModel. + * @member {google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.SummarizationModel|null|undefined} summarizationModel + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * @instance + */ + SummarizationConfig.prototype.summarizationModel = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SummarizationConfig modelSource. + * @member {"conversationProfile"|"summarizationModel"|undefined} modelSource + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * @instance + */ + Object.defineProperty(SummarizationConfig.prototype, "modelSource", { + get: $util.oneOfGetter($oneOfFields = ["conversationProfile", "summarizationModel"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SummarizationConfig instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.AnnotatorSelector.ISummarizationConfig=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig} SummarizationConfig instance + */ + SummarizationConfig.create = function create(properties) { + return new SummarizationConfig(properties); + }; + + /** + * Encodes the specified SummarizationConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.AnnotatorSelector.ISummarizationConfig} message SummarizationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummarizationConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conversationProfile != null && Object.hasOwnProperty.call(message, "conversationProfile")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversationProfile); + if (message.summarizationModel != null && Object.hasOwnProperty.call(message, "summarizationModel")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.summarizationModel); + return writer; + }; + + /** + * Encodes the specified SummarizationConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.AnnotatorSelector.ISummarizationConfig} message SummarizationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummarizationConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SummarizationConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig} SummarizationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummarizationConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.conversationProfile = reader.string(); + break; + } + case 2: { + message.summarizationModel = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SummarizationConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig} SummarizationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummarizationConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SummarizationConfig message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SummarizationConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) { + properties.modelSource = 1; + if (!$util.isString(message.conversationProfile)) + return "conversationProfile: string expected"; + } + if (message.summarizationModel != null && message.hasOwnProperty("summarizationModel")) { + if (properties.modelSource === 1) + return "modelSource: multiple values"; + properties.modelSource = 1; + switch (message.summarizationModel) { + default: + return "summarizationModel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates a SummarizationConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig} SummarizationConfig + */ + SummarizationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig(); + if (object.conversationProfile != null) + message.conversationProfile = String(object.conversationProfile); + switch (object.summarizationModel) { + default: + if (typeof object.summarizationModel === "number") { + message.summarizationModel = object.summarizationModel; + break; + } + break; + case "SUMMARIZATION_MODEL_UNSPECIFIED": + case 0: + message.summarizationModel = 0; + break; + case "BASELINE_MODEL": + case 1: + message.summarizationModel = 1; + break; + case "BASELINE_MODEL_V2_0": + case 2: + message.summarizationModel = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a SummarizationConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig} message SummarizationConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SummarizationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) { + object.conversationProfile = message.conversationProfile; + if (options.oneofs) + object.modelSource = "conversationProfile"; + } + if (message.summarizationModel != null && message.hasOwnProperty("summarizationModel")) { + object.summarizationModel = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.SummarizationModel[message.summarizationModel] === undefined ? message.summarizationModel : $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.SummarizationModel[message.summarizationModel] : message.summarizationModel; + if (options.oneofs) + object.modelSource = "summarizationModel"; + } + return object; + }; + + /** + * Converts this SummarizationConfig to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * @instance + * @returns {Object.} JSON object + */ + SummarizationConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SummarizationConfig + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SummarizationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig"; + }; + + /** + * SummarizationModel enum. + * @name google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.SummarizationModel + * @enum {number} + * @property {number} SUMMARIZATION_MODEL_UNSPECIFIED=0 SUMMARIZATION_MODEL_UNSPECIFIED value + * @property {number} BASELINE_MODEL=1 BASELINE_MODEL value + * @property {number} BASELINE_MODEL_V2_0=2 BASELINE_MODEL_V2_0 value + */ + SummarizationConfig.SummarizationModel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SUMMARIZATION_MODEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "BASELINE_MODEL"] = 1; + values[valuesById[2] = "BASELINE_MODEL_V2_0"] = 2; + return values; + })(); + + return SummarizationConfig; + })(); + + AnnotatorSelector.QaConfig = (function() { + + /** + * Properties of a QaConfig. + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @interface IQaConfig + * @property {google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.IScorecardList|null} [scorecardList] QaConfig scorecardList + */ + + /** + * Constructs a new QaConfig. + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @classdesc Represents a QaConfig. + * @implements IQaConfig + * @constructor + * @param {google.cloud.contactcenterinsights.v1.AnnotatorSelector.IQaConfig=} [properties] Properties to set + */ + function QaConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QaConfig scorecardList. + * @member {google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.IScorecardList|null|undefined} scorecardList + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig + * @instance + */ + QaConfig.prototype.scorecardList = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * QaConfig scorecardSource. + * @member {"scorecardList"|undefined} scorecardSource + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig + * @instance + */ + Object.defineProperty(QaConfig.prototype, "scorecardSource", { + get: $util.oneOfGetter($oneOfFields = ["scorecardList"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new QaConfig instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.AnnotatorSelector.IQaConfig=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig} QaConfig instance + */ + QaConfig.create = function create(properties) { + return new QaConfig(properties); + }; + + /** + * Encodes the specified QaConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.AnnotatorSelector.IQaConfig} message QaConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QaConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.scorecardList != null && Object.hasOwnProperty.call(message, "scorecardList")) + $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.ScorecardList.encode(message.scorecardList, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QaConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.AnnotatorSelector.IQaConfig} message QaConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QaConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QaConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig} QaConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QaConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.scorecardList = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.ScorecardList.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QaConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig} QaConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QaConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Gets the default type url for FaqAnswerData - * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.FaqAnswerData - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FaqAnswerData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.FaqAnswerData"; - }; + /** + * Verifies a QaConfig message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QaConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.scorecardList != null && message.hasOwnProperty("scorecardList")) { + properties.scorecardSource = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.ScorecardList.verify(message.scorecardList); + if (error) + return "scorecardList." + error; + } + } + return null; + }; - return FaqAnswerData; - })(); + /** + * Creates a QaConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig} QaConfig + */ + QaConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig(); + if (object.scorecardList != null) { + if (typeof object.scorecardList !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.scorecardList: object expected"); + message.scorecardList = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.ScorecardList.fromObject(object.scorecardList); + } + return message; + }; - v1.SmartReplyData = (function() { + /** + * Creates a plain object from a QaConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig} message QaConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QaConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.scorecardList != null && message.hasOwnProperty("scorecardList")) { + object.scorecardList = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.ScorecardList.toObject(message.scorecardList, options); + if (options.oneofs) + object.scorecardSource = "scorecardList"; + } + return object; + }; - /** - * Properties of a SmartReplyData. - * @memberof google.cloud.contactcenterinsights.v1 - * @interface ISmartReplyData - * @property {string|null} [reply] SmartReplyData reply - * @property {number|null} [confidenceScore] SmartReplyData confidenceScore - * @property {Object.|null} [metadata] SmartReplyData metadata - * @property {string|null} [queryRecord] SmartReplyData queryRecord - */ + /** + * Converts this QaConfig to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig + * @instance + * @returns {Object.} JSON object + */ + QaConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new SmartReplyData. - * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a SmartReplyData. - * @implements ISmartReplyData - * @constructor - * @param {google.cloud.contactcenterinsights.v1.ISmartReplyData=} [properties] Properties to set - */ - function SmartReplyData(properties) { - this.metadata = {}; - if (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 QaConfig + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QaConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig"; + }; - /** - * SmartReplyData reply. - * @member {string} reply - * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData - * @instance - */ - SmartReplyData.prototype.reply = ""; + QaConfig.ScorecardList = (function() { - /** - * SmartReplyData confidenceScore. - * @member {number} confidenceScore - * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData - * @instance - */ - SmartReplyData.prototype.confidenceScore = 0; + /** + * Properties of a ScorecardList. + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig + * @interface IScorecardList + * @property {Array.|null} [qaScorecardRevisions] ScorecardList qaScorecardRevisions + */ - /** - * SmartReplyData metadata. - * @member {Object.} metadata - * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData - * @instance - */ - SmartReplyData.prototype.metadata = $util.emptyObject; + /** + * Constructs a new ScorecardList. + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig + * @classdesc Represents a ScorecardList. + * @implements IScorecardList + * @constructor + * @param {google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.IScorecardList=} [properties] Properties to set + */ + function ScorecardList(properties) { + this.qaScorecardRevisions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * SmartReplyData queryRecord. - * @member {string} queryRecord - * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData - * @instance - */ - SmartReplyData.prototype.queryRecord = ""; + /** + * ScorecardList qaScorecardRevisions. + * @member {Array.} qaScorecardRevisions + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.ScorecardList + * @instance + */ + ScorecardList.prototype.qaScorecardRevisions = $util.emptyArray; - /** - * Creates a new SmartReplyData instance using the specified properties. - * @function create - * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData - * @static - * @param {google.cloud.contactcenterinsights.v1.ISmartReplyData=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.SmartReplyData} SmartReplyData instance - */ - SmartReplyData.create = function create(properties) { - return new SmartReplyData(properties); - }; + /** + * Creates a new ScorecardList instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.ScorecardList + * @static + * @param {google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.IScorecardList=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.ScorecardList} ScorecardList instance + */ + ScorecardList.create = function create(properties) { + return new ScorecardList(properties); + }; - /** - * Encodes the specified SmartReplyData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SmartReplyData.verify|verify} messages. - * @function encode - * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData - * @static - * @param {google.cloud.contactcenterinsights.v1.ISmartReplyData} message SmartReplyData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SmartReplyData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.reply != null && Object.hasOwnProperty.call(message, "reply")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.reply); - if (message.confidenceScore != null && Object.hasOwnProperty.call(message, "confidenceScore")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.confidenceScore); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); - if (message.queryRecord != null && Object.hasOwnProperty.call(message, "queryRecord")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.queryRecord); - return writer; - }; + /** + * Encodes the specified ScorecardList message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.ScorecardList.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.ScorecardList + * @static + * @param {google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.IScorecardList} message ScorecardList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScorecardList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.qaScorecardRevisions != null && message.qaScorecardRevisions.length) + for (var i = 0; i < message.qaScorecardRevisions.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.qaScorecardRevisions[i]); + return writer; + }; - /** - * Encodes the specified SmartReplyData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SmartReplyData.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData - * @static - * @param {google.cloud.contactcenterinsights.v1.ISmartReplyData} message SmartReplyData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SmartReplyData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ScorecardList message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.ScorecardList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.ScorecardList + * @static + * @param {google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.IScorecardList} message ScorecardList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScorecardList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a SmartReplyData message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.SmartReplyData} SmartReplyData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SmartReplyData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.SmartReplyData(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.reply = reader.string(); - break; - } - case 2: { - message.confidenceScore = reader.double(); - break; - } - case 3: { - if (message.metadata === $util.emptyObject) - message.metadata = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); + /** + * Decodes a ScorecardList message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.ScorecardList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.ScorecardList} ScorecardList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScorecardList.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.ScorecardList(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.qaScorecardRevisions && message.qaScorecardRevisions.length)) + message.qaScorecardRevisions = []; + message.qaScorecardRevisions.push(reader.string()); break; } + default: + reader.skipType(tag & 7); + break; } - message.metadata[key] = value; - break; } - case 4: { - message.queryRecord = reader.string(); - break; + return message; + }; + + /** + * Decodes a ScorecardList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.ScorecardList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.ScorecardList} ScorecardList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScorecardList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ScorecardList message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.ScorecardList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ScorecardList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.qaScorecardRevisions != null && message.hasOwnProperty("qaScorecardRevisions")) { + if (!Array.isArray(message.qaScorecardRevisions)) + return "qaScorecardRevisions: array expected"; + for (var i = 0; i < message.qaScorecardRevisions.length; ++i) + if (!$util.isString(message.qaScorecardRevisions[i])) + return "qaScorecardRevisions: string[] expected"; } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return null; + }; - /** - * Decodes a SmartReplyData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.SmartReplyData} SmartReplyData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SmartReplyData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a ScorecardList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.ScorecardList + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.ScorecardList} ScorecardList + */ + ScorecardList.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.ScorecardList) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.ScorecardList(); + if (object.qaScorecardRevisions) { + if (!Array.isArray(object.qaScorecardRevisions)) + throw TypeError(".google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.ScorecardList.qaScorecardRevisions: array expected"); + message.qaScorecardRevisions = []; + for (var i = 0; i < object.qaScorecardRevisions.length; ++i) + message.qaScorecardRevisions[i] = String(object.qaScorecardRevisions[i]); + } + return message; + }; - /** - * Verifies a SmartReplyData message. - * @function verify - * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SmartReplyData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.reply != null && message.hasOwnProperty("reply")) - if (!$util.isString(message.reply)) - return "reply: string expected"; - if (message.confidenceScore != null && message.hasOwnProperty("confidenceScore")) - if (typeof message.confidenceScore !== "number") - return "confidenceScore: number expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - if (!$util.isObject(message.metadata)) - return "metadata: object expected"; - var key = Object.keys(message.metadata); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.metadata[key[i]])) - return "metadata: string{k:string} expected"; - } - if (message.queryRecord != null && message.hasOwnProperty("queryRecord")) - if (!$util.isString(message.queryRecord)) - return "queryRecord: string expected"; - return null; - }; + /** + * Creates a plain object from a ScorecardList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.ScorecardList + * @static + * @param {google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.ScorecardList} message ScorecardList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ScorecardList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.qaScorecardRevisions = []; + if (message.qaScorecardRevisions && message.qaScorecardRevisions.length) { + object.qaScorecardRevisions = []; + for (var j = 0; j < message.qaScorecardRevisions.length; ++j) + object.qaScorecardRevisions[j] = message.qaScorecardRevisions[j]; + } + return object; + }; - /** - * Creates a SmartReplyData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.SmartReplyData} SmartReplyData - */ - SmartReplyData.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.SmartReplyData) - return object; - var message = new $root.google.cloud.contactcenterinsights.v1.SmartReplyData(); - if (object.reply != null) - message.reply = String(object.reply); - if (object.confidenceScore != null) - message.confidenceScore = Number(object.confidenceScore); - if (object.metadata) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.SmartReplyData.metadata: object expected"); - message.metadata = {}; - for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) - message.metadata[keys[i]] = String(object.metadata[keys[i]]); - } - if (object.queryRecord != null) - message.queryRecord = String(object.queryRecord); - return message; - }; + /** + * Converts this ScorecardList to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.ScorecardList + * @instance + * @returns {Object.} JSON object + */ + ScorecardList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a plain object from a SmartReplyData message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData - * @static - * @param {google.cloud.contactcenterinsights.v1.SmartReplyData} message SmartReplyData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SmartReplyData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.metadata = {}; - if (options.defaults) { - object.reply = ""; - object.confidenceScore = 0; - object.queryRecord = ""; - } - if (message.reply != null && message.hasOwnProperty("reply")) - object.reply = message.reply; - if (message.confidenceScore != null && message.hasOwnProperty("confidenceScore")) - object.confidenceScore = options.json && !isFinite(message.confidenceScore) ? String(message.confidenceScore) : message.confidenceScore; - var keys2; - if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { - object.metadata = {}; - for (var j = 0; j < keys2.length; ++j) - object.metadata[keys2[j]] = message.metadata[keys2[j]]; - } - if (message.queryRecord != null && message.hasOwnProperty("queryRecord")) - object.queryRecord = message.queryRecord; - return object; - }; + /** + * Gets the default type url for ScorecardList + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.ScorecardList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ScorecardList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.AnnotatorSelector.QaConfig.ScorecardList"; + }; - /** - * Converts this SmartReplyData to JSON. - * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData - * @instance - * @returns {Object.} JSON object - */ - SmartReplyData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return ScorecardList; + })(); - /** - * Gets the default type url for SmartReplyData - * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.SmartReplyData - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SmartReplyData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.SmartReplyData"; - }; + return QaConfig; + })(); - return SmartReplyData; + return AnnotatorSelector; })(); - v1.SmartComposeSuggestionData = (function() { + v1.QaQuestion = (function() { /** - * Properties of a SmartComposeSuggestionData. + * Properties of a QaQuestion. * @memberof google.cloud.contactcenterinsights.v1 - * @interface ISmartComposeSuggestionData - * @property {string|null} [suggestion] SmartComposeSuggestionData suggestion - * @property {number|null} [confidenceScore] SmartComposeSuggestionData confidenceScore - * @property {Object.|null} [metadata] SmartComposeSuggestionData metadata - * @property {string|null} [queryRecord] SmartComposeSuggestionData queryRecord - */ - - /** - * Constructs a new SmartComposeSuggestionData. + * @interface IQaQuestion + * @property {string|null} [name] QaQuestion name + * @property {string|null} [abbreviation] QaQuestion abbreviation + * @property {google.protobuf.ITimestamp|null} [createTime] QaQuestion createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] QaQuestion updateTime + * @property {string|null} [questionBody] QaQuestion questionBody + * @property {string|null} [answerInstructions] QaQuestion answerInstructions + * @property {Array.|null} [answerChoices] QaQuestion answerChoices + * @property {Array.|null} [tags] QaQuestion tags + * @property {number|null} [order] QaQuestion order + * @property {google.cloud.contactcenterinsights.v1.QaQuestion.IMetrics|null} [metrics] QaQuestion metrics + * @property {google.cloud.contactcenterinsights.v1.QaQuestion.ITuningMetadata|null} [tuningMetadata] QaQuestion tuningMetadata + */ + + /** + * Constructs a new QaQuestion. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a SmartComposeSuggestionData. - * @implements ISmartComposeSuggestionData + * @classdesc Represents a QaQuestion. + * @implements IQaQuestion * @constructor - * @param {google.cloud.contactcenterinsights.v1.ISmartComposeSuggestionData=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IQaQuestion=} [properties] Properties to set */ - function SmartComposeSuggestionData(properties) { - this.metadata = {}; + function QaQuestion(properties) { + this.answerChoices = []; + this.tags = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -37541,137 +58335,221 @@ } /** - * SmartComposeSuggestionData suggestion. - * @member {string} suggestion - * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData + * QaQuestion name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion * @instance */ - SmartComposeSuggestionData.prototype.suggestion = ""; + QaQuestion.prototype.name = ""; /** - * SmartComposeSuggestionData confidenceScore. - * @member {number} confidenceScore - * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData + * QaQuestion abbreviation. + * @member {string} abbreviation + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion * @instance */ - SmartComposeSuggestionData.prototype.confidenceScore = 0; + QaQuestion.prototype.abbreviation = ""; /** - * SmartComposeSuggestionData metadata. - * @member {Object.} metadata - * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData + * QaQuestion createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion * @instance */ - SmartComposeSuggestionData.prototype.metadata = $util.emptyObject; + QaQuestion.prototype.createTime = null; /** - * SmartComposeSuggestionData queryRecord. - * @member {string} queryRecord - * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData + * QaQuestion updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion * @instance */ - SmartComposeSuggestionData.prototype.queryRecord = ""; + QaQuestion.prototype.updateTime = null; /** - * Creates a new SmartComposeSuggestionData instance using the specified properties. + * QaQuestion questionBody. + * @member {string} questionBody + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion + * @instance + */ + QaQuestion.prototype.questionBody = ""; + + /** + * QaQuestion answerInstructions. + * @member {string} answerInstructions + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion + * @instance + */ + QaQuestion.prototype.answerInstructions = ""; + + /** + * QaQuestion answerChoices. + * @member {Array.} answerChoices + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion + * @instance + */ + QaQuestion.prototype.answerChoices = $util.emptyArray; + + /** + * QaQuestion tags. + * @member {Array.} tags + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion + * @instance + */ + QaQuestion.prototype.tags = $util.emptyArray; + + /** + * QaQuestion order. + * @member {number} order + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion + * @instance + */ + QaQuestion.prototype.order = 0; + + /** + * QaQuestion metrics. + * @member {google.cloud.contactcenterinsights.v1.QaQuestion.IMetrics|null|undefined} metrics + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion + * @instance + */ + QaQuestion.prototype.metrics = null; + + /** + * QaQuestion tuningMetadata. + * @member {google.cloud.contactcenterinsights.v1.QaQuestion.ITuningMetadata|null|undefined} tuningMetadata + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion + * @instance + */ + QaQuestion.prototype.tuningMetadata = null; + + /** + * Creates a new QaQuestion instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion * @static - * @param {google.cloud.contactcenterinsights.v1.ISmartComposeSuggestionData=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData} SmartComposeSuggestionData instance + * @param {google.cloud.contactcenterinsights.v1.IQaQuestion=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.QaQuestion} QaQuestion instance */ - SmartComposeSuggestionData.create = function create(properties) { - return new SmartComposeSuggestionData(properties); + QaQuestion.create = function create(properties) { + return new QaQuestion(properties); }; /** - * Encodes the specified SmartComposeSuggestionData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData.verify|verify} messages. + * Encodes the specified QaQuestion message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaQuestion.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion * @static - * @param {google.cloud.contactcenterinsights.v1.ISmartComposeSuggestionData} message SmartComposeSuggestionData message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IQaQuestion} message QaQuestion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SmartComposeSuggestionData.encode = function encode(message, writer) { + QaQuestion.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.suggestion != null && Object.hasOwnProperty.call(message, "suggestion")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.suggestion); - if (message.confidenceScore != null && Object.hasOwnProperty.call(message, "confidenceScore")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.confidenceScore); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); - if (message.queryRecord != null && Object.hasOwnProperty.call(message, "queryRecord")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.queryRecord); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.abbreviation != null && Object.hasOwnProperty.call(message, "abbreviation")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.abbreviation); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.questionBody != null && Object.hasOwnProperty.call(message, "questionBody")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.questionBody); + if (message.answerChoices != null && message.answerChoices.length) + for (var i = 0; i < message.answerChoices.length; ++i) + $root.google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice.encode(message.answerChoices[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.tags[i]); + if (message.order != null && Object.hasOwnProperty.call(message, "order")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.order); + if (message.answerInstructions != null && Object.hasOwnProperty.call(message, "answerInstructions")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.answerInstructions); + if (message.metrics != null && Object.hasOwnProperty.call(message, "metrics")) + $root.google.cloud.contactcenterinsights.v1.QaQuestion.Metrics.encode(message.metrics, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.tuningMetadata != null && Object.hasOwnProperty.call(message, "tuningMetadata")) + $root.google.cloud.contactcenterinsights.v1.QaQuestion.TuningMetadata.encode(message.tuningMetadata, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); return writer; }; /** - * Encodes the specified SmartComposeSuggestionData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData.verify|verify} messages. + * Encodes the specified QaQuestion message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaQuestion.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion * @static - * @param {google.cloud.contactcenterinsights.v1.ISmartComposeSuggestionData} message SmartComposeSuggestionData message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IQaQuestion} message QaQuestion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SmartComposeSuggestionData.encodeDelimited = function encodeDelimited(message, writer) { + QaQuestion.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SmartComposeSuggestionData message from the specified reader or buffer. + * Decodes a QaQuestion message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData} SmartComposeSuggestionData + * @returns {google.cloud.contactcenterinsights.v1.QaQuestion} QaQuestion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SmartComposeSuggestionData.decode = function decode(reader, length) { + QaQuestion.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.QaQuestion(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.suggestion = reader.string(); + message.name = reader.string(); break; } case 2: { - message.confidenceScore = reader.double(); + message.abbreviation = reader.string(); break; } case 3: { - if (message.metadata === $util.emptyObject) - message.metadata = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.metadata[key] = value; + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 4: { - message.queryRecord = reader.string(); + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.questionBody = reader.string(); + break; + } + case 9: { + message.answerInstructions = reader.string(); + break; + } + case 6: { + if (!(message.answerChoices && message.answerChoices.length)) + message.answerChoices = []; + message.answerChoices.push($root.google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + } + case 8: { + message.order = reader.int32(); + break; + } + case 10: { + message.metrics = $root.google.cloud.contactcenterinsights.v1.QaQuestion.Metrics.decode(reader, reader.uint32()); + break; + } + case 11: { + message.tuningMetadata = $root.google.cloud.contactcenterinsights.v1.QaQuestion.TuningMetadata.decode(reader, reader.uint32()); break; } default: @@ -37683,396 +58561,1154 @@ }; /** - * Decodes a SmartComposeSuggestionData message from the specified reader or buffer, length delimited. + * Decodes a QaQuestion message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData} SmartComposeSuggestionData + * @returns {google.cloud.contactcenterinsights.v1.QaQuestion} QaQuestion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SmartComposeSuggestionData.decodeDelimited = function decodeDelimited(reader) { + QaQuestion.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; - /** - * Verifies a SmartComposeSuggestionData message. - * @function verify - * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SmartComposeSuggestionData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.suggestion != null && message.hasOwnProperty("suggestion")) - if (!$util.isString(message.suggestion)) - return "suggestion: string expected"; - if (message.confidenceScore != null && message.hasOwnProperty("confidenceScore")) - if (typeof message.confidenceScore !== "number") - return "confidenceScore: number expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - if (!$util.isObject(message.metadata)) - return "metadata: object expected"; - var key = Object.keys(message.metadata); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.metadata[key[i]])) - return "metadata: string{k:string} expected"; - } - if (message.queryRecord != null && message.hasOwnProperty("queryRecord")) - if (!$util.isString(message.queryRecord)) - return "queryRecord: string expected"; - return null; - }; + /** + * Verifies a QaQuestion message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QaQuestion.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.abbreviation != null && message.hasOwnProperty("abbreviation")) + if (!$util.isString(message.abbreviation)) + return "abbreviation: 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.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.questionBody != null && message.hasOwnProperty("questionBody")) + if (!$util.isString(message.questionBody)) + return "questionBody: string expected"; + if (message.answerInstructions != null && message.hasOwnProperty("answerInstructions")) + if (!$util.isString(message.answerInstructions)) + return "answerInstructions: string expected"; + if (message.answerChoices != null && message.hasOwnProperty("answerChoices")) { + if (!Array.isArray(message.answerChoices)) + return "answerChoices: array expected"; + for (var i = 0; i < message.answerChoices.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice.verify(message.answerChoices[i]); + if (error) + return "answerChoices." + error; + } + } + 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.order != null && message.hasOwnProperty("order")) + if (!$util.isInteger(message.order)) + return "order: integer expected"; + if (message.metrics != null && message.hasOwnProperty("metrics")) { + var error = $root.google.cloud.contactcenterinsights.v1.QaQuestion.Metrics.verify(message.metrics); + if (error) + return "metrics." + error; + } + if (message.tuningMetadata != null && message.hasOwnProperty("tuningMetadata")) { + var error = $root.google.cloud.contactcenterinsights.v1.QaQuestion.TuningMetadata.verify(message.tuningMetadata); + if (error) + return "tuningMetadata." + error; + } + return null; + }; + + /** + * Creates a QaQuestion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.QaQuestion} QaQuestion + */ + QaQuestion.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.QaQuestion) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.QaQuestion(); + if (object.name != null) + message.name = String(object.name); + if (object.abbreviation != null) + message.abbreviation = String(object.abbreviation); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.QaQuestion.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.QaQuestion.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.questionBody != null) + message.questionBody = String(object.questionBody); + if (object.answerInstructions != null) + message.answerInstructions = String(object.answerInstructions); + if (object.answerChoices) { + if (!Array.isArray(object.answerChoices)) + throw TypeError(".google.cloud.contactcenterinsights.v1.QaQuestion.answerChoices: array expected"); + message.answerChoices = []; + for (var i = 0; i < object.answerChoices.length; ++i) { + if (typeof object.answerChoices[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.QaQuestion.answerChoices: object expected"); + message.answerChoices[i] = $root.google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice.fromObject(object.answerChoices[i]); + } + } + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.cloud.contactcenterinsights.v1.QaQuestion.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + if (object.order != null) + message.order = object.order | 0; + if (object.metrics != null) { + if (typeof object.metrics !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.QaQuestion.metrics: object expected"); + message.metrics = $root.google.cloud.contactcenterinsights.v1.QaQuestion.Metrics.fromObject(object.metrics); + } + if (object.tuningMetadata != null) { + if (typeof object.tuningMetadata !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.QaQuestion.tuningMetadata: object expected"); + message.tuningMetadata = $root.google.cloud.contactcenterinsights.v1.QaQuestion.TuningMetadata.fromObject(object.tuningMetadata); + } + return message; + }; + + /** + * Creates a plain object from a QaQuestion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion + * @static + * @param {google.cloud.contactcenterinsights.v1.QaQuestion} message QaQuestion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QaQuestion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.answerChoices = []; + object.tags = []; + } + if (options.defaults) { + object.name = ""; + object.abbreviation = ""; + object.createTime = null; + object.updateTime = null; + object.questionBody = ""; + object.order = 0; + object.answerInstructions = ""; + object.metrics = null; + object.tuningMetadata = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.abbreviation != null && message.hasOwnProperty("abbreviation")) + object.abbreviation = message.abbreviation; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.questionBody != null && message.hasOwnProperty("questionBody")) + object.questionBody = message.questionBody; + if (message.answerChoices && message.answerChoices.length) { + object.answerChoices = []; + for (var j = 0; j < message.answerChoices.length; ++j) + object.answerChoices[j] = $root.google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice.toObject(message.answerChoices[j], options); + } + 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.order != null && message.hasOwnProperty("order")) + object.order = message.order; + if (message.answerInstructions != null && message.hasOwnProperty("answerInstructions")) + object.answerInstructions = message.answerInstructions; + if (message.metrics != null && message.hasOwnProperty("metrics")) + object.metrics = $root.google.cloud.contactcenterinsights.v1.QaQuestion.Metrics.toObject(message.metrics, options); + if (message.tuningMetadata != null && message.hasOwnProperty("tuningMetadata")) + object.tuningMetadata = $root.google.cloud.contactcenterinsights.v1.QaQuestion.TuningMetadata.toObject(message.tuningMetadata, options); + return object; + }; + + /** + * Converts this QaQuestion to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion + * @instance + * @returns {Object.} JSON object + */ + QaQuestion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QaQuestion + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QaQuestion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.QaQuestion"; + }; + + QaQuestion.AnswerChoice = (function() { + + /** + * Properties of an AnswerChoice. + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion + * @interface IAnswerChoice + * @property {string|null} [strValue] AnswerChoice strValue + * @property {number|null} [numValue] AnswerChoice numValue + * @property {boolean|null} [boolValue] AnswerChoice boolValue + * @property {boolean|null} [naValue] AnswerChoice naValue + * @property {string|null} [key] AnswerChoice key + * @property {number|null} [score] AnswerChoice score + */ + + /** + * Constructs a new AnswerChoice. + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion + * @classdesc Represents an AnswerChoice. + * @implements IAnswerChoice + * @constructor + * @param {google.cloud.contactcenterinsights.v1.QaQuestion.IAnswerChoice=} [properties] Properties to set + */ + function AnswerChoice(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnswerChoice strValue. + * @member {string|null|undefined} strValue + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice + * @instance + */ + AnswerChoice.prototype.strValue = null; + + /** + * AnswerChoice numValue. + * @member {number|null|undefined} numValue + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice + * @instance + */ + AnswerChoice.prototype.numValue = null; + + /** + * AnswerChoice boolValue. + * @member {boolean|null|undefined} boolValue + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice + * @instance + */ + AnswerChoice.prototype.boolValue = null; + + /** + * AnswerChoice naValue. + * @member {boolean|null|undefined} naValue + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice + * @instance + */ + AnswerChoice.prototype.naValue = null; + + /** + * AnswerChoice key. + * @member {string} key + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice + * @instance + */ + AnswerChoice.prototype.key = ""; + + /** + * AnswerChoice score. + * @member {number|null|undefined} score + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice + * @instance + */ + AnswerChoice.prototype.score = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AnswerChoice value. + * @member {"strValue"|"numValue"|"boolValue"|"naValue"|undefined} value + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice + * @instance + */ + Object.defineProperty(AnswerChoice.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["strValue", "numValue", "boolValue", "naValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AnswerChoice _score. + * @member {"score"|undefined} _score + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice + * @instance + */ + Object.defineProperty(AnswerChoice.prototype, "_score", { + get: $util.oneOfGetter($oneOfFields = ["score"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AnswerChoice instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice + * @static + * @param {google.cloud.contactcenterinsights.v1.QaQuestion.IAnswerChoice=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice} AnswerChoice instance + */ + AnswerChoice.create = function create(properties) { + return new AnswerChoice(properties); + }; + + /** + * Encodes the specified AnswerChoice message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice + * @static + * @param {google.cloud.contactcenterinsights.v1.QaQuestion.IAnswerChoice} message AnswerChoice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnswerChoice.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.strValue != null && Object.hasOwnProperty.call(message, "strValue")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.strValue); + if (message.numValue != null && Object.hasOwnProperty.call(message, "numValue")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.numValue); + if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); + if (message.naValue != null && Object.hasOwnProperty.call(message, "naValue")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.naValue); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.score); + return writer; + }; + + /** + * Encodes the specified AnswerChoice message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice + * @static + * @param {google.cloud.contactcenterinsights.v1.QaQuestion.IAnswerChoice} message AnswerChoice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnswerChoice.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnswerChoice message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice} AnswerChoice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnswerChoice.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.strValue = reader.string(); + break; + } + case 3: { + message.numValue = reader.double(); + break; + } + case 4: { + message.boolValue = reader.bool(); + break; + } + case 5: { + message.naValue = reader.bool(); + break; + } + case 1: { + message.key = reader.string(); + break; + } + case 6: { + message.score = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnswerChoice message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice} AnswerChoice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnswerChoice.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnswerChoice message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnswerChoice.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.strValue != null && message.hasOwnProperty("strValue")) { + properties.value = 1; + if (!$util.isString(message.strValue)) + return "strValue: string expected"; + } + if (message.numValue != null && message.hasOwnProperty("numValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (typeof message.numValue !== "number") + return "numValue: number expected"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.naValue != null && message.hasOwnProperty("naValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (typeof message.naValue !== "boolean") + return "naValue: boolean expected"; + } + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.score != null && message.hasOwnProperty("score")) { + properties._score = 1; + if (typeof message.score !== "number") + return "score: number expected"; + } + return null; + }; + + /** + * Creates an AnswerChoice message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice} AnswerChoice + */ + AnswerChoice.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice(); + if (object.strValue != null) + message.strValue = String(object.strValue); + if (object.numValue != null) + message.numValue = Number(object.numValue); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.naValue != null) + message.naValue = Boolean(object.naValue); + if (object.key != null) + message.key = String(object.key); + if (object.score != null) + message.score = Number(object.score); + return message; + }; + + /** + * Creates a plain object from an AnswerChoice message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice + * @static + * @param {google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice} message AnswerChoice + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnswerChoice.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.key = ""; + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.strValue != null && message.hasOwnProperty("strValue")) { + object.strValue = message.strValue; + if (options.oneofs) + object.value = "strValue"; + } + if (message.numValue != null && message.hasOwnProperty("numValue")) { + object.numValue = options.json && !isFinite(message.numValue) ? String(message.numValue) : message.numValue; + if (options.oneofs) + object.value = "numValue"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.value = "boolValue"; + } + if (message.naValue != null && message.hasOwnProperty("naValue")) { + object.naValue = message.naValue; + if (options.oneofs) + object.value = "naValue"; + } + if (message.score != null && message.hasOwnProperty("score")) { + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (options.oneofs) + object._score = "score"; + } + return object; + }; + + /** + * Converts this AnswerChoice to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice + * @instance + * @returns {Object.} JSON object + */ + AnswerChoice.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AnswerChoice + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnswerChoice.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice"; + }; + + return AnswerChoice; + })(); + + QaQuestion.Metrics = (function() { + + /** + * Properties of a Metrics. + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion + * @interface IMetrics + * @property {number|null} [accuracy] Metrics accuracy + */ + + /** + * Constructs a new Metrics. + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion + * @classdesc Represents a Metrics. + * @implements IMetrics + * @constructor + * @param {google.cloud.contactcenterinsights.v1.QaQuestion.IMetrics=} [properties] Properties to set + */ + function Metrics(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Metrics accuracy. + * @member {number} accuracy + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.Metrics + * @instance + */ + Metrics.prototype.accuracy = 0; + + /** + * Creates a new Metrics instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.Metrics + * @static + * @param {google.cloud.contactcenterinsights.v1.QaQuestion.IMetrics=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.QaQuestion.Metrics} Metrics instance + */ + Metrics.create = function create(properties) { + return new Metrics(properties); + }; + + /** + * Encodes the specified Metrics message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaQuestion.Metrics.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.Metrics + * @static + * @param {google.cloud.contactcenterinsights.v1.QaQuestion.IMetrics} message Metrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metrics.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.accuracy != null && Object.hasOwnProperty.call(message, "accuracy")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.accuracy); + return writer; + }; + + /** + * Encodes the specified Metrics message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaQuestion.Metrics.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.Metrics + * @static + * @param {google.cloud.contactcenterinsights.v1.QaQuestion.IMetrics} message Metrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metrics.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Metrics message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.Metrics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.QaQuestion.Metrics} Metrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metrics.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.QaQuestion.Metrics(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.accuracy = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Metrics message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.Metrics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.QaQuestion.Metrics} Metrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metrics.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Metrics message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.Metrics + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metrics.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.accuracy != null && message.hasOwnProperty("accuracy")) + if (typeof message.accuracy !== "number") + return "accuracy: number expected"; + return null; + }; - /** - * Creates a SmartComposeSuggestionData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData} SmartComposeSuggestionData - */ - SmartComposeSuggestionData.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData) + /** + * Creates a Metrics message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.Metrics + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.QaQuestion.Metrics} Metrics + */ + Metrics.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.QaQuestion.Metrics) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.QaQuestion.Metrics(); + if (object.accuracy != null) + message.accuracy = Number(object.accuracy); + return message; + }; + + /** + * Creates a plain object from a Metrics message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.Metrics + * @static + * @param {google.cloud.contactcenterinsights.v1.QaQuestion.Metrics} message Metrics + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metrics.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.accuracy = 0; + if (message.accuracy != null && message.hasOwnProperty("accuracy")) + object.accuracy = options.json && !isFinite(message.accuracy) ? String(message.accuracy) : message.accuracy; return object; - var message = new $root.google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData(); - if (object.suggestion != null) - message.suggestion = String(object.suggestion); - if (object.confidenceScore != null) - message.confidenceScore = Number(object.confidenceScore); - if (object.metadata) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData.metadata: object expected"); - message.metadata = {}; - for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) - message.metadata[keys[i]] = String(object.metadata[keys[i]]); - } - if (object.queryRecord != null) - message.queryRecord = String(object.queryRecord); - return message; - }; + }; - /** - * Creates a plain object from a SmartComposeSuggestionData message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData - * @static - * @param {google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData} message SmartComposeSuggestionData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SmartComposeSuggestionData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.metadata = {}; - if (options.defaults) { - object.suggestion = ""; - object.confidenceScore = 0; - object.queryRecord = ""; - } - if (message.suggestion != null && message.hasOwnProperty("suggestion")) - object.suggestion = message.suggestion; - if (message.confidenceScore != null && message.hasOwnProperty("confidenceScore")) - object.confidenceScore = options.json && !isFinite(message.confidenceScore) ? String(message.confidenceScore) : message.confidenceScore; - var keys2; - if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { - object.metadata = {}; - for (var j = 0; j < keys2.length; ++j) - object.metadata[keys2[j]] = message.metadata[keys2[j]]; - } - if (message.queryRecord != null && message.hasOwnProperty("queryRecord")) - object.queryRecord = message.queryRecord; - return object; - }; + /** + * Converts this Metrics to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.Metrics + * @instance + * @returns {Object.} JSON object + */ + Metrics.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this SmartComposeSuggestionData to JSON. - * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData - * @instance - * @returns {Object.} JSON object - */ - SmartComposeSuggestionData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for Metrics + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.Metrics + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Metrics.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.QaQuestion.Metrics"; + }; - /** - * Gets the default type url for SmartComposeSuggestionData - * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SmartComposeSuggestionData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData"; - }; + return Metrics; + })(); - return SmartComposeSuggestionData; - })(); + QaQuestion.TuningMetadata = (function() { - v1.DialogflowInteractionData = (function() { + /** + * Properties of a TuningMetadata. + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion + * @interface ITuningMetadata + * @property {number|Long|null} [totalValidLabelCount] TuningMetadata totalValidLabelCount + * @property {Array.|null} [datasetValidationWarnings] TuningMetadata datasetValidationWarnings + * @property {string|null} [tuningError] TuningMetadata tuningError + */ - /** - * Properties of a DialogflowInteractionData. - * @memberof google.cloud.contactcenterinsights.v1 - * @interface IDialogflowInteractionData - * @property {string|null} [dialogflowIntentId] DialogflowInteractionData dialogflowIntentId - * @property {number|null} [confidence] DialogflowInteractionData confidence - */ + /** + * Constructs a new TuningMetadata. + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion + * @classdesc Represents a TuningMetadata. + * @implements ITuningMetadata + * @constructor + * @param {google.cloud.contactcenterinsights.v1.QaQuestion.ITuningMetadata=} [properties] Properties to set + */ + function TuningMetadata(properties) { + this.datasetValidationWarnings = []; + if (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 DialogflowInteractionData. - * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a DialogflowInteractionData. - * @implements IDialogflowInteractionData - * @constructor - * @param {google.cloud.contactcenterinsights.v1.IDialogflowInteractionData=} [properties] Properties to set - */ - function DialogflowInteractionData(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * TuningMetadata totalValidLabelCount. + * @member {number|Long} totalValidLabelCount + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.TuningMetadata + * @instance + */ + TuningMetadata.prototype.totalValidLabelCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * DialogflowInteractionData dialogflowIntentId. - * @member {string} dialogflowIntentId - * @memberof google.cloud.contactcenterinsights.v1.DialogflowInteractionData - * @instance - */ - DialogflowInteractionData.prototype.dialogflowIntentId = ""; + /** + * TuningMetadata datasetValidationWarnings. + * @member {Array.} datasetValidationWarnings + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.TuningMetadata + * @instance + */ + TuningMetadata.prototype.datasetValidationWarnings = $util.emptyArray; - /** - * DialogflowInteractionData confidence. - * @member {number} confidence - * @memberof google.cloud.contactcenterinsights.v1.DialogflowInteractionData - * @instance - */ - DialogflowInteractionData.prototype.confidence = 0; + /** + * TuningMetadata tuningError. + * @member {string} tuningError + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.TuningMetadata + * @instance + */ + TuningMetadata.prototype.tuningError = ""; - /** - * Creates a new DialogflowInteractionData instance using the specified properties. - * @function create - * @memberof google.cloud.contactcenterinsights.v1.DialogflowInteractionData - * @static - * @param {google.cloud.contactcenterinsights.v1.IDialogflowInteractionData=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.DialogflowInteractionData} DialogflowInteractionData instance - */ - DialogflowInteractionData.create = function create(properties) { - return new DialogflowInteractionData(properties); - }; + /** + * Creates a new TuningMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.TuningMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.QaQuestion.ITuningMetadata=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.QaQuestion.TuningMetadata} TuningMetadata instance + */ + TuningMetadata.create = function create(properties) { + return new TuningMetadata(properties); + }; - /** - * Encodes the specified DialogflowInteractionData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DialogflowInteractionData.verify|verify} messages. - * @function encode - * @memberof google.cloud.contactcenterinsights.v1.DialogflowInteractionData - * @static - * @param {google.cloud.contactcenterinsights.v1.IDialogflowInteractionData} message DialogflowInteractionData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DialogflowInteractionData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dialogflowIntentId != null && Object.hasOwnProperty.call(message, "dialogflowIntentId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dialogflowIntentId); - if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence); - return writer; - }; + /** + * Encodes the specified TuningMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaQuestion.TuningMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.TuningMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.QaQuestion.ITuningMetadata} message TuningMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TuningMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.totalValidLabelCount != null && Object.hasOwnProperty.call(message, "totalValidLabelCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.totalValidLabelCount); + if (message.datasetValidationWarnings != null && message.datasetValidationWarnings.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.datasetValidationWarnings.length; ++i) + writer.int32(message.datasetValidationWarnings[i]); + writer.ldelim(); + } + if (message.tuningError != null && Object.hasOwnProperty.call(message, "tuningError")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tuningError); + return writer; + }; - /** - * Encodes the specified DialogflowInteractionData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DialogflowInteractionData.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.DialogflowInteractionData - * @static - * @param {google.cloud.contactcenterinsights.v1.IDialogflowInteractionData} message DialogflowInteractionData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DialogflowInteractionData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified TuningMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaQuestion.TuningMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.TuningMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.QaQuestion.ITuningMetadata} message TuningMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TuningMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a DialogflowInteractionData message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.contactcenterinsights.v1.DialogflowInteractionData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.DialogflowInteractionData} DialogflowInteractionData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DialogflowInteractionData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.DialogflowInteractionData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.dialogflowIntentId = reader.string(); - break; - } - case 2: { - message.confidence = reader.float(); + /** + * Decodes a TuningMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.TuningMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.QaQuestion.TuningMetadata} TuningMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TuningMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.QaQuestion.TuningMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.totalValidLabelCount = reader.int64(); + break; + } + case 2: { + if (!(message.datasetValidationWarnings && message.datasetValidationWarnings.length)) + message.datasetValidationWarnings = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.datasetValidationWarnings.push(reader.int32()); + } else + message.datasetValidationWarnings.push(reader.int32()); + break; + } + case 3: { + message.tuningError = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a DialogflowInteractionData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.DialogflowInteractionData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.DialogflowInteractionData} DialogflowInteractionData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DialogflowInteractionData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a TuningMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.TuningMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.QaQuestion.TuningMetadata} TuningMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TuningMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a DialogflowInteractionData message. - * @function verify - * @memberof google.cloud.contactcenterinsights.v1.DialogflowInteractionData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DialogflowInteractionData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dialogflowIntentId != null && message.hasOwnProperty("dialogflowIntentId")) - if (!$util.isString(message.dialogflowIntentId)) - return "dialogflowIntentId: string expected"; - if (message.confidence != null && message.hasOwnProperty("confidence")) - if (typeof message.confidence !== "number") - return "confidence: number expected"; - return null; - }; + /** + * Verifies a TuningMetadata message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.TuningMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TuningMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.totalValidLabelCount != null && message.hasOwnProperty("totalValidLabelCount")) + if (!$util.isInteger(message.totalValidLabelCount) && !(message.totalValidLabelCount && $util.isInteger(message.totalValidLabelCount.low) && $util.isInteger(message.totalValidLabelCount.high))) + return "totalValidLabelCount: integer|Long expected"; + if (message.datasetValidationWarnings != null && message.hasOwnProperty("datasetValidationWarnings")) { + if (!Array.isArray(message.datasetValidationWarnings)) + return "datasetValidationWarnings: array expected"; + for (var i = 0; i < message.datasetValidationWarnings.length; ++i) + switch (message.datasetValidationWarnings[i]) { + default: + return "datasetValidationWarnings: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + } + if (message.tuningError != null && message.hasOwnProperty("tuningError")) + if (!$util.isString(message.tuningError)) + return "tuningError: string expected"; + return null; + }; - /** - * Creates a DialogflowInteractionData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.DialogflowInteractionData - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.DialogflowInteractionData} DialogflowInteractionData - */ - DialogflowInteractionData.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.DialogflowInteractionData) + /** + * Creates a TuningMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.TuningMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.QaQuestion.TuningMetadata} TuningMetadata + */ + TuningMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.QaQuestion.TuningMetadata) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.QaQuestion.TuningMetadata(); + if (object.totalValidLabelCount != null) + if ($util.Long) + (message.totalValidLabelCount = $util.Long.fromValue(object.totalValidLabelCount)).unsigned = false; + else if (typeof object.totalValidLabelCount === "string") + message.totalValidLabelCount = parseInt(object.totalValidLabelCount, 10); + else if (typeof object.totalValidLabelCount === "number") + message.totalValidLabelCount = object.totalValidLabelCount; + else if (typeof object.totalValidLabelCount === "object") + message.totalValidLabelCount = new $util.LongBits(object.totalValidLabelCount.low >>> 0, object.totalValidLabelCount.high >>> 0).toNumber(); + if (object.datasetValidationWarnings) { + if (!Array.isArray(object.datasetValidationWarnings)) + throw TypeError(".google.cloud.contactcenterinsights.v1.QaQuestion.TuningMetadata.datasetValidationWarnings: array expected"); + message.datasetValidationWarnings = []; + for (var i = 0; i < object.datasetValidationWarnings.length; ++i) + switch (object.datasetValidationWarnings[i]) { + default: + if (typeof object.datasetValidationWarnings[i] === "number") { + message.datasetValidationWarnings[i] = object.datasetValidationWarnings[i]; + break; + } + case "DATASET_VALIDATION_WARNING_UNSPECIFIED": + case 0: + message.datasetValidationWarnings[i] = 0; + break; + case "TOO_MANY_INVALID_FEEDBACK_LABELS": + case 1: + message.datasetValidationWarnings[i] = 1; + break; + case "INSUFFICIENT_FEEDBACK_LABELS": + case 2: + message.datasetValidationWarnings[i] = 2; + break; + case "INSUFFICIENT_FEEDBACK_LABELS_PER_ANSWER": + case 3: + message.datasetValidationWarnings[i] = 3; + break; + case "ALL_FEEDBACK_LABELS_HAVE_THE_SAME_ANSWER": + case 4: + message.datasetValidationWarnings[i] = 4; + break; + } + } + if (object.tuningError != null) + message.tuningError = String(object.tuningError); + return message; + }; + + /** + * Creates a plain object from a TuningMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.TuningMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.QaQuestion.TuningMetadata} message TuningMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TuningMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.datasetValidationWarnings = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalValidLabelCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalValidLabelCount = options.longs === String ? "0" : 0; + object.tuningError = ""; + } + if (message.totalValidLabelCount != null && message.hasOwnProperty("totalValidLabelCount")) + if (typeof message.totalValidLabelCount === "number") + object.totalValidLabelCount = options.longs === String ? String(message.totalValidLabelCount) : message.totalValidLabelCount; + else + object.totalValidLabelCount = options.longs === String ? $util.Long.prototype.toString.call(message.totalValidLabelCount) : options.longs === Number ? new $util.LongBits(message.totalValidLabelCount.low >>> 0, message.totalValidLabelCount.high >>> 0).toNumber() : message.totalValidLabelCount; + if (message.datasetValidationWarnings && message.datasetValidationWarnings.length) { + object.datasetValidationWarnings = []; + for (var j = 0; j < message.datasetValidationWarnings.length; ++j) + object.datasetValidationWarnings[j] = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.DatasetValidationWarning[message.datasetValidationWarnings[j]] === undefined ? message.datasetValidationWarnings[j] : $root.google.cloud.contactcenterinsights.v1.DatasetValidationWarning[message.datasetValidationWarnings[j]] : message.datasetValidationWarnings[j]; + } + if (message.tuningError != null && message.hasOwnProperty("tuningError")) + object.tuningError = message.tuningError; return object; - var message = new $root.google.cloud.contactcenterinsights.v1.DialogflowInteractionData(); - if (object.dialogflowIntentId != null) - message.dialogflowIntentId = String(object.dialogflowIntentId); - if (object.confidence != null) - message.confidence = Number(object.confidence); - return message; - }; + }; - /** - * Creates a plain object from a DialogflowInteractionData message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.DialogflowInteractionData - * @static - * @param {google.cloud.contactcenterinsights.v1.DialogflowInteractionData} message DialogflowInteractionData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DialogflowInteractionData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.dialogflowIntentId = ""; - object.confidence = 0; - } - if (message.dialogflowIntentId != null && message.hasOwnProperty("dialogflowIntentId")) - object.dialogflowIntentId = message.dialogflowIntentId; - if (message.confidence != null && message.hasOwnProperty("confidence")) - object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; - return object; - }; + /** + * Converts this TuningMetadata to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.TuningMetadata + * @instance + * @returns {Object.} JSON object + */ + TuningMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this DialogflowInteractionData to JSON. - * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.DialogflowInteractionData - * @instance - * @returns {Object.} JSON object - */ - DialogflowInteractionData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for TuningMetadata + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.QaQuestion.TuningMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TuningMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.QaQuestion.TuningMetadata"; + }; - /** - * Gets the default type url for DialogflowInteractionData - * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.DialogflowInteractionData - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DialogflowInteractionData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.DialogflowInteractionData"; - }; + return TuningMetadata; + })(); - return DialogflowInteractionData; + return QaQuestion; })(); - v1.ConversationSummarizationSuggestionData = (function() { + v1.QaScorecard = (function() { /** - * Properties of a ConversationSummarizationSuggestionData. + * Properties of a QaScorecard. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IConversationSummarizationSuggestionData - * @property {string|null} [text] ConversationSummarizationSuggestionData text - * @property {Object.|null} [textSections] ConversationSummarizationSuggestionData textSections - * @property {number|null} [confidence] ConversationSummarizationSuggestionData confidence - * @property {Object.|null} [metadata] ConversationSummarizationSuggestionData metadata - * @property {string|null} [answerRecord] ConversationSummarizationSuggestionData answerRecord - * @property {string|null} [conversationModel] ConversationSummarizationSuggestionData conversationModel + * @interface IQaScorecard + * @property {string|null} [name] QaScorecard name + * @property {string|null} [displayName] QaScorecard displayName + * @property {string|null} [description] QaScorecard description + * @property {google.protobuf.ITimestamp|null} [createTime] QaScorecard createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] QaScorecard updateTime */ /** - * Constructs a new ConversationSummarizationSuggestionData. + * Constructs a new QaScorecard. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a ConversationSummarizationSuggestionData. - * @implements IConversationSummarizationSuggestionData + * @classdesc Represents a QaScorecard. + * @implements IQaScorecard * @constructor - * @param {google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IQaScorecard=} [properties] Properties to set */ - function ConversationSummarizationSuggestionData(properties) { - this.textSections = {}; - this.metadata = {}; + function QaScorecard(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -38080,185 +59716,131 @@ } /** - * ConversationSummarizationSuggestionData text. - * @member {string} text - * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData - * @instance - */ - ConversationSummarizationSuggestionData.prototype.text = ""; - - /** - * ConversationSummarizationSuggestionData textSections. - * @member {Object.} textSections - * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData + * QaScorecard name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.QaScorecard * @instance */ - ConversationSummarizationSuggestionData.prototype.textSections = $util.emptyObject; + QaScorecard.prototype.name = ""; /** - * ConversationSummarizationSuggestionData confidence. - * @member {number} confidence - * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData + * QaScorecard displayName. + * @member {string} displayName + * @memberof google.cloud.contactcenterinsights.v1.QaScorecard * @instance */ - ConversationSummarizationSuggestionData.prototype.confidence = 0; + QaScorecard.prototype.displayName = ""; /** - * ConversationSummarizationSuggestionData metadata. - * @member {Object.} metadata - * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData + * QaScorecard description. + * @member {string} description + * @memberof google.cloud.contactcenterinsights.v1.QaScorecard * @instance */ - ConversationSummarizationSuggestionData.prototype.metadata = $util.emptyObject; + QaScorecard.prototype.description = ""; /** - * ConversationSummarizationSuggestionData answerRecord. - * @member {string} answerRecord - * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData + * QaScorecard createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.contactcenterinsights.v1.QaScorecard * @instance */ - ConversationSummarizationSuggestionData.prototype.answerRecord = ""; + QaScorecard.prototype.createTime = null; /** - * ConversationSummarizationSuggestionData conversationModel. - * @member {string} conversationModel - * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData + * QaScorecard updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.contactcenterinsights.v1.QaScorecard * @instance */ - ConversationSummarizationSuggestionData.prototype.conversationModel = ""; + QaScorecard.prototype.updateTime = null; /** - * Creates a new ConversationSummarizationSuggestionData instance using the specified properties. + * Creates a new QaScorecard instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData + * @memberof google.cloud.contactcenterinsights.v1.QaScorecard * @static - * @param {google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData} ConversationSummarizationSuggestionData instance + * @param {google.cloud.contactcenterinsights.v1.IQaScorecard=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.QaScorecard} QaScorecard instance */ - ConversationSummarizationSuggestionData.create = function create(properties) { - return new ConversationSummarizationSuggestionData(properties); + QaScorecard.create = function create(properties) { + return new QaScorecard(properties); }; /** - * Encodes the specified ConversationSummarizationSuggestionData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.verify|verify} messages. + * Encodes the specified QaScorecard message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaScorecard.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData + * @memberof google.cloud.contactcenterinsights.v1.QaScorecard * @static - * @param {google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData} message ConversationSummarizationSuggestionData message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IQaScorecard} message QaScorecard message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConversationSummarizationSuggestionData.encode = function encode(message, writer) { + QaScorecard.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.confidence != null && Object.hasOwnProperty.call(message, "confidence")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); - if (message.answerRecord != null && Object.hasOwnProperty.call(message, "answerRecord")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.answerRecord); - if (message.textSections != null && Object.hasOwnProperty.call(message, "textSections")) - for (var keys = Object.keys(message.textSections), i = 0; i < keys.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.textSections[keys[i]]).ldelim(); - if (message.conversationModel != null && Object.hasOwnProperty.call(message, "conversationModel")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.conversationModel); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, 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); return writer; }; /** - * Encodes the specified ConversationSummarizationSuggestionData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.verify|verify} messages. + * Encodes the specified QaScorecard message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaScorecard.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData + * @memberof google.cloud.contactcenterinsights.v1.QaScorecard * @static - * @param {google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData} message ConversationSummarizationSuggestionData message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IQaScorecard} message QaScorecard message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConversationSummarizationSuggestionData.encodeDelimited = function encodeDelimited(message, writer) { + QaScorecard.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ConversationSummarizationSuggestionData message from the specified reader or buffer. + * Decodes a QaScorecard message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData + * @memberof google.cloud.contactcenterinsights.v1.QaScorecard * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData} ConversationSummarizationSuggestionData + * @returns {google.cloud.contactcenterinsights.v1.QaScorecard} QaScorecard * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConversationSummarizationSuggestionData.decode = function decode(reader, length) { + QaScorecard.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.QaScorecard(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.text = reader.string(); + message.name = reader.string(); break; } - case 5: { - if (message.textSections === $util.emptyObject) - message.textSections = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.textSections[key] = value; + case 7: { + message.displayName = reader.string(); break; } case 2: { - message.confidence = reader.float(); + message.description = reader.string(); break; } case 3: { - if (message.metadata === $util.emptyObject) - message.metadata = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.metadata[key] = value; + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 4: { - message.answerRecord = reader.string(); - break; - } - case 6: { - message.conversationModel = reader.string(); + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } default: @@ -38270,196 +59852,170 @@ }; /** - * Decodes a ConversationSummarizationSuggestionData message from the specified reader or buffer, length delimited. + * Decodes a QaScorecard message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData + * @memberof google.cloud.contactcenterinsights.v1.QaScorecard * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData} ConversationSummarizationSuggestionData + * @returns {google.cloud.contactcenterinsights.v1.QaScorecard} QaScorecard * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConversationSummarizationSuggestionData.decodeDelimited = function decodeDelimited(reader) { + QaScorecard.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ConversationSummarizationSuggestionData message. + * Verifies a QaScorecard message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData + * @memberof google.cloud.contactcenterinsights.v1.QaScorecard * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ConversationSummarizationSuggestionData.verify = function verify(message) { + QaScorecard.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.textSections != null && message.hasOwnProperty("textSections")) { - if (!$util.isObject(message.textSections)) - return "textSections: object expected"; - var key = Object.keys(message.textSections); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.textSections[key[i]])) - return "textSections: string{k:string} expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: 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.confidence != null && message.hasOwnProperty("confidence")) - if (typeof message.confidence !== "number") - return "confidence: number expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - if (!$util.isObject(message.metadata)) - return "metadata: object expected"; - var key = Object.keys(message.metadata); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.metadata[key[i]])) - return "metadata: string{k:string} expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; } - if (message.answerRecord != null && message.hasOwnProperty("answerRecord")) - if (!$util.isString(message.answerRecord)) - return "answerRecord: string expected"; - if (message.conversationModel != null && message.hasOwnProperty("conversationModel")) - if (!$util.isString(message.conversationModel)) - return "conversationModel: string expected"; return null; }; /** - * Creates a ConversationSummarizationSuggestionData message from a plain object. Also converts values to their respective internal types. + * Creates a QaScorecard message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData + * @memberof google.cloud.contactcenterinsights.v1.QaScorecard * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData} ConversationSummarizationSuggestionData + * @returns {google.cloud.contactcenterinsights.v1.QaScorecard} QaScorecard */ - ConversationSummarizationSuggestionData.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData) + QaScorecard.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.QaScorecard) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData(); - if (object.text != null) - message.text = String(object.text); - if (object.textSections) { - if (typeof object.textSections !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.textSections: object expected"); - message.textSections = {}; - for (var keys = Object.keys(object.textSections), i = 0; i < keys.length; ++i) - message.textSections[keys[i]] = String(object.textSections[keys[i]]); + var message = new $root.google.cloud.contactcenterinsights.v1.QaScorecard(); + 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.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.QaScorecard.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - if (object.confidence != null) - message.confidence = Number(object.confidence); - if (object.metadata) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.metadata: object expected"); - message.metadata = {}; - for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) - message.metadata[keys[i]] = String(object.metadata[keys[i]]); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.QaScorecard.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } - if (object.answerRecord != null) - message.answerRecord = String(object.answerRecord); - if (object.conversationModel != null) - message.conversationModel = String(object.conversationModel); return message; }; /** - * Creates a plain object from a ConversationSummarizationSuggestionData message. Also converts values to other types if specified. + * Creates a plain object from a QaScorecard message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData + * @memberof google.cloud.contactcenterinsights.v1.QaScorecard * @static - * @param {google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData} message ConversationSummarizationSuggestionData + * @param {google.cloud.contactcenterinsights.v1.QaScorecard} message QaScorecard * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ConversationSummarizationSuggestionData.toObject = function toObject(message, options) { + QaScorecard.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) { - object.metadata = {}; - object.textSections = {}; - } if (options.defaults) { - object.text = ""; - object.confidence = 0; - object.answerRecord = ""; - object.conversationModel = ""; - } - if (message.text != null && message.hasOwnProperty("text")) - object.text = message.text; - if (message.confidence != null && message.hasOwnProperty("confidence")) - object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; - var keys2; - if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { - object.metadata = {}; - for (var j = 0; j < keys2.length; ++j) - object.metadata[keys2[j]] = message.metadata[keys2[j]]; - } - if (message.answerRecord != null && message.hasOwnProperty("answerRecord")) - object.answerRecord = message.answerRecord; - if (message.textSections && (keys2 = Object.keys(message.textSections)).length) { - object.textSections = {}; - for (var j = 0; j < keys2.length; ++j) - object.textSections[keys2[j]] = message.textSections[keys2[j]]; + object.name = ""; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.displayName = ""; } - if (message.conversationModel != null && message.hasOwnProperty("conversationModel")) - object.conversationModel = message.conversationModel; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; return object; }; /** - * Converts this ConversationSummarizationSuggestionData to JSON. + * Converts this QaScorecard to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData + * @memberof google.cloud.contactcenterinsights.v1.QaScorecard * @instance * @returns {Object.} JSON object */ - ConversationSummarizationSuggestionData.prototype.toJSON = function toJSON() { + QaScorecard.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ConversationSummarizationSuggestionData + * Gets the default type url for QaScorecard * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData + * @memberof google.cloud.contactcenterinsights.v1.QaScorecard * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ConversationSummarizationSuggestionData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + QaScorecard.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.QaScorecard"; }; - return ConversationSummarizationSuggestionData; + return QaScorecard; })(); - v1.ConversationParticipant = (function() { + v1.QaScorecardRevision = (function() { /** - * Properties of a ConversationParticipant. + * Properties of a QaScorecardRevision. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IConversationParticipant - * @property {string|null} [dialogflowParticipantName] ConversationParticipant dialogflowParticipantName - * @property {string|null} [userId] ConversationParticipant userId - * @property {string|null} [dialogflowParticipant] ConversationParticipant dialogflowParticipant - * @property {string|null} [obfuscatedExternalUserId] ConversationParticipant obfuscatedExternalUserId - * @property {google.cloud.contactcenterinsights.v1.ConversationParticipant.Role|null} [role] ConversationParticipant role + * @interface IQaScorecardRevision + * @property {string|null} [name] QaScorecardRevision name + * @property {google.cloud.contactcenterinsights.v1.IQaScorecard|null} [snapshot] QaScorecardRevision snapshot + * @property {google.protobuf.ITimestamp|null} [createTime] QaScorecardRevision createTime + * @property {Array.|null} [alternateIds] QaScorecardRevision alternateIds + * @property {google.cloud.contactcenterinsights.v1.QaScorecardRevision.State|null} [state] QaScorecardRevision state */ /** - * Constructs a new ConversationParticipant. + * Constructs a new QaScorecardRevision. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a ConversationParticipant. - * @implements IConversationParticipant + * @classdesc Represents a QaScorecardRevision. + * @implements IQaScorecardRevision * @constructor - * @param {google.cloud.contactcenterinsights.v1.IConversationParticipant=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IQaScorecardRevision=} [properties] Properties to set */ - function ConversationParticipant(properties) { + function QaScorecardRevision(properties) { + this.alternateIds = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -38467,145 +60023,134 @@ } /** - * ConversationParticipant dialogflowParticipantName. - * @member {string|null|undefined} dialogflowParticipantName - * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant - * @instance - */ - ConversationParticipant.prototype.dialogflowParticipantName = null; - - /** - * ConversationParticipant userId. - * @member {string|null|undefined} userId - * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant + * QaScorecardRevision name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardRevision * @instance */ - ConversationParticipant.prototype.userId = null; + QaScorecardRevision.prototype.name = ""; /** - * ConversationParticipant dialogflowParticipant. - * @member {string} dialogflowParticipant - * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant + * QaScorecardRevision snapshot. + * @member {google.cloud.contactcenterinsights.v1.IQaScorecard|null|undefined} snapshot + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardRevision * @instance */ - ConversationParticipant.prototype.dialogflowParticipant = ""; + QaScorecardRevision.prototype.snapshot = null; /** - * ConversationParticipant obfuscatedExternalUserId. - * @member {string} obfuscatedExternalUserId - * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant + * QaScorecardRevision createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardRevision * @instance */ - ConversationParticipant.prototype.obfuscatedExternalUserId = ""; + QaScorecardRevision.prototype.createTime = null; /** - * ConversationParticipant role. - * @member {google.cloud.contactcenterinsights.v1.ConversationParticipant.Role} role - * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant + * QaScorecardRevision alternateIds. + * @member {Array.} alternateIds + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardRevision * @instance */ - ConversationParticipant.prototype.role = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + QaScorecardRevision.prototype.alternateIds = $util.emptyArray; /** - * ConversationParticipant participant. - * @member {"dialogflowParticipantName"|"userId"|undefined} participant - * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant + * QaScorecardRevision state. + * @member {google.cloud.contactcenterinsights.v1.QaScorecardRevision.State} state + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardRevision * @instance */ - Object.defineProperty(ConversationParticipant.prototype, "participant", { - get: $util.oneOfGetter($oneOfFields = ["dialogflowParticipantName", "userId"]), - set: $util.oneOfSetter($oneOfFields) - }); + QaScorecardRevision.prototype.state = 0; /** - * Creates a new ConversationParticipant instance using the specified properties. + * Creates a new QaScorecardRevision instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardRevision * @static - * @param {google.cloud.contactcenterinsights.v1.IConversationParticipant=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.ConversationParticipant} ConversationParticipant instance + * @param {google.cloud.contactcenterinsights.v1.IQaScorecardRevision=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.QaScorecardRevision} QaScorecardRevision instance */ - ConversationParticipant.create = function create(properties) { - return new ConversationParticipant(properties); + QaScorecardRevision.create = function create(properties) { + return new QaScorecardRevision(properties); }; /** - * Encodes the specified ConversationParticipant message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationParticipant.verify|verify} messages. + * Encodes the specified QaScorecardRevision message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaScorecardRevision.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardRevision * @static - * @param {google.cloud.contactcenterinsights.v1.IConversationParticipant} message ConversationParticipant message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IQaScorecardRevision} message QaScorecardRevision message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConversationParticipant.encode = function encode(message, writer) { + QaScorecardRevision.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dialogflowParticipant != null && Object.hasOwnProperty.call(message, "dialogflowParticipant")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dialogflowParticipant); - if (message.role != null && Object.hasOwnProperty.call(message, "role")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.role); - if (message.obfuscatedExternalUserId != null && Object.hasOwnProperty.call(message, "obfuscatedExternalUserId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.obfuscatedExternalUserId); - if (message.dialogflowParticipantName != null && Object.hasOwnProperty.call(message, "dialogflowParticipantName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.dialogflowParticipantName); - if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.userId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.snapshot != null && Object.hasOwnProperty.call(message, "snapshot")) + $root.google.cloud.contactcenterinsights.v1.QaScorecard.encode(message.snapshot, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.alternateIds != null && message.alternateIds.length) + for (var i = 0; i < message.alternateIds.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.alternateIds[i]); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); return writer; }; /** - * Encodes the specified ConversationParticipant message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationParticipant.verify|verify} messages. + * Encodes the specified QaScorecardRevision message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaScorecardRevision.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardRevision * @static - * @param {google.cloud.contactcenterinsights.v1.IConversationParticipant} message ConversationParticipant message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IQaScorecardRevision} message QaScorecardRevision message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConversationParticipant.encodeDelimited = function encodeDelimited(message, writer) { + QaScorecardRevision.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ConversationParticipant message from the specified reader or buffer. + * Decodes a QaScorecardRevision message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardRevision * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.ConversationParticipant} ConversationParticipant + * @returns {google.cloud.contactcenterinsights.v1.QaScorecardRevision} QaScorecardRevision * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConversationParticipant.decode = function decode(reader, length) { + QaScorecardRevision.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ConversationParticipant(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.QaScorecardRevision(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 5: { - message.dialogflowParticipantName = reader.string(); + case 1: { + message.name = reader.string(); break; } - case 6: { - message.userId = reader.string(); + case 2: { + message.snapshot = $root.google.cloud.contactcenterinsights.v1.QaScorecard.decode(reader, reader.uint32()); break; } - case 1: { - message.dialogflowParticipant = reader.string(); + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } - case 3: { - message.obfuscatedExternalUserId = reader.string(); + case 4: { + if (!(message.alternateIds && message.alternateIds.length)) + message.alternateIds = []; + message.alternateIds.push(reader.string()); break; } - case 2: { - message.role = reader.int32(); + case 5: { + message.state = reader.int32(); break; } default: @@ -38617,224 +60162,253 @@ }; /** - * Decodes a ConversationParticipant message from the specified reader or buffer, length delimited. + * Decodes a QaScorecardRevision message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardRevision * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.ConversationParticipant} ConversationParticipant + * @returns {google.cloud.contactcenterinsights.v1.QaScorecardRevision} QaScorecardRevision * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConversationParticipant.decodeDelimited = function decodeDelimited(reader) { + QaScorecardRevision.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ConversationParticipant message. + * Verifies a QaScorecardRevision message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardRevision * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ConversationParticipant.verify = function verify(message) { + QaScorecardRevision.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.dialogflowParticipantName != null && message.hasOwnProperty("dialogflowParticipantName")) { - properties.participant = 1; - if (!$util.isString(message.dialogflowParticipantName)) - return "dialogflowParticipantName: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.snapshot != null && message.hasOwnProperty("snapshot")) { + var error = $root.google.cloud.contactcenterinsights.v1.QaScorecard.verify(message.snapshot); + if (error) + return "snapshot." + error; } - if (message.userId != null && message.hasOwnProperty("userId")) { - if (properties.participant === 1) - return "participant: multiple values"; - properties.participant = 1; - if (!$util.isString(message.userId)) - return "userId: 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.dialogflowParticipant != null && message.hasOwnProperty("dialogflowParticipant")) - if (!$util.isString(message.dialogflowParticipant)) - return "dialogflowParticipant: string expected"; - if (message.obfuscatedExternalUserId != null && message.hasOwnProperty("obfuscatedExternalUserId")) - if (!$util.isString(message.obfuscatedExternalUserId)) - return "obfuscatedExternalUserId: string expected"; - if (message.role != null && message.hasOwnProperty("role")) - switch (message.role) { + if (message.alternateIds != null && message.hasOwnProperty("alternateIds")) { + if (!Array.isArray(message.alternateIds)) + return "alternateIds: array expected"; + for (var i = 0; i < message.alternateIds.length; ++i) + if (!$util.isString(message.alternateIds[i])) + return "alternateIds: string[] expected"; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { default: - return "role: enum value expected"; + return "state: enum value expected"; case 0: - case 1: + case 12: case 2: - case 3: - case 4: + case 9: + case 11: + case 7: + case 14: break; } return null; }; /** - * Creates a ConversationParticipant message from a plain object. Also converts values to their respective internal types. + * Creates a QaScorecardRevision message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardRevision * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.ConversationParticipant} ConversationParticipant + * @returns {google.cloud.contactcenterinsights.v1.QaScorecardRevision} QaScorecardRevision */ - ConversationParticipant.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.ConversationParticipant) + QaScorecardRevision.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.QaScorecardRevision) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.ConversationParticipant(); - if (object.dialogflowParticipantName != null) - message.dialogflowParticipantName = String(object.dialogflowParticipantName); - if (object.userId != null) - message.userId = String(object.userId); - if (object.dialogflowParticipant != null) - message.dialogflowParticipant = String(object.dialogflowParticipant); - if (object.obfuscatedExternalUserId != null) - message.obfuscatedExternalUserId = String(object.obfuscatedExternalUserId); - switch (object.role) { + var message = new $root.google.cloud.contactcenterinsights.v1.QaScorecardRevision(); + if (object.name != null) + message.name = String(object.name); + if (object.snapshot != null) { + if (typeof object.snapshot !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.QaScorecardRevision.snapshot: object expected"); + message.snapshot = $root.google.cloud.contactcenterinsights.v1.QaScorecard.fromObject(object.snapshot); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.QaScorecardRevision.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.alternateIds) { + if (!Array.isArray(object.alternateIds)) + throw TypeError(".google.cloud.contactcenterinsights.v1.QaScorecardRevision.alternateIds: array expected"); + message.alternateIds = []; + for (var i = 0; i < object.alternateIds.length; ++i) + message.alternateIds[i] = String(object.alternateIds[i]); + } + switch (object.state) { default: - if (typeof object.role === "number") { - message.role = object.role; + if (typeof object.state === "number") { + message.state = object.state; break; } break; - case "ROLE_UNSPECIFIED": + case "STATE_UNSPECIFIED": case 0: - message.role = 0; + message.state = 0; break; - case "HUMAN_AGENT": - case 1: - message.role = 1; + case "EDITABLE": + case 12: + message.state = 12; break; - case "AUTOMATED_AGENT": + case "TRAINING": case 2: - message.role = 2; + message.state = 2; break; - case "END_USER": - case 3: - message.role = 3; + case "TRAINING_FAILED": + case 9: + message.state = 9; break; - case "ANY_AGENT": - case 4: - message.role = 4; + case "READY": + case 11: + message.state = 11; + break; + case "DELETING": + case 7: + message.state = 7; + break; + case "TRAINING_CANCELLED": + case 14: + message.state = 14; break; } return message; }; /** - * Creates a plain object from a ConversationParticipant message. Also converts values to other types if specified. + * Creates a plain object from a QaScorecardRevision message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardRevision * @static - * @param {google.cloud.contactcenterinsights.v1.ConversationParticipant} message ConversationParticipant + * @param {google.cloud.contactcenterinsights.v1.QaScorecardRevision} message QaScorecardRevision * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ConversationParticipant.toObject = function toObject(message, options) { + QaScorecardRevision.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.alternateIds = []; if (options.defaults) { - object.dialogflowParticipant = ""; - object.role = options.enums === String ? "ROLE_UNSPECIFIED" : 0; - object.obfuscatedExternalUserId = ""; - } - if (message.dialogflowParticipant != null && message.hasOwnProperty("dialogflowParticipant")) - object.dialogflowParticipant = message.dialogflowParticipant; - if (message.role != null && message.hasOwnProperty("role")) - object.role = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.ConversationParticipant.Role[message.role] === undefined ? message.role : $root.google.cloud.contactcenterinsights.v1.ConversationParticipant.Role[message.role] : message.role; - if (message.obfuscatedExternalUserId != null && message.hasOwnProperty("obfuscatedExternalUserId")) - object.obfuscatedExternalUserId = message.obfuscatedExternalUserId; - if (message.dialogflowParticipantName != null && message.hasOwnProperty("dialogflowParticipantName")) { - object.dialogflowParticipantName = message.dialogflowParticipantName; - if (options.oneofs) - object.participant = "dialogflowParticipantName"; + object.name = ""; + object.snapshot = null; + object.createTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; } - if (message.userId != null && message.hasOwnProperty("userId")) { - object.userId = message.userId; - if (options.oneofs) - object.participant = "userId"; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.snapshot != null && message.hasOwnProperty("snapshot")) + object.snapshot = $root.google.cloud.contactcenterinsights.v1.QaScorecard.toObject(message.snapshot, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.alternateIds && message.alternateIds.length) { + object.alternateIds = []; + for (var j = 0; j < message.alternateIds.length; ++j) + object.alternateIds[j] = message.alternateIds[j]; } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.QaScorecardRevision.State[message.state] === undefined ? message.state : $root.google.cloud.contactcenterinsights.v1.QaScorecardRevision.State[message.state] : message.state; return object; }; /** - * Converts this ConversationParticipant to JSON. + * Converts this QaScorecardRevision to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardRevision * @instance * @returns {Object.} JSON object */ - ConversationParticipant.prototype.toJSON = function toJSON() { + QaScorecardRevision.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ConversationParticipant + * Gets the default type url for QaScorecardRevision * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.ConversationParticipant + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardRevision * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ConversationParticipant.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + QaScorecardRevision.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ConversationParticipant"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.QaScorecardRevision"; }; /** - * Role enum. - * @name google.cloud.contactcenterinsights.v1.ConversationParticipant.Role + * State enum. + * @name google.cloud.contactcenterinsights.v1.QaScorecardRevision.State * @enum {number} - * @property {number} ROLE_UNSPECIFIED=0 ROLE_UNSPECIFIED value - * @property {number} HUMAN_AGENT=1 HUMAN_AGENT value - * @property {number} AUTOMATED_AGENT=2 AUTOMATED_AGENT value - * @property {number} END_USER=3 END_USER value - * @property {number} ANY_AGENT=4 ANY_AGENT value - */ - ConversationParticipant.Role = (function() { + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} EDITABLE=12 EDITABLE value + * @property {number} TRAINING=2 TRAINING value + * @property {number} TRAINING_FAILED=9 TRAINING_FAILED value + * @property {number} READY=11 READY value + * @property {number} DELETING=7 DELETING value + * @property {number} TRAINING_CANCELLED=14 TRAINING_CANCELLED value + */ + QaScorecardRevision.State = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ROLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "HUMAN_AGENT"] = 1; - values[valuesById[2] = "AUTOMATED_AGENT"] = 2; - values[valuesById[3] = "END_USER"] = 3; - values[valuesById[4] = "ANY_AGENT"] = 4; + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[12] = "EDITABLE"] = 12; + values[valuesById[2] = "TRAINING"] = 2; + values[valuesById[9] = "TRAINING_FAILED"] = 9; + values[valuesById[11] = "READY"] = 11; + values[valuesById[7] = "DELETING"] = 7; + values[valuesById[14] = "TRAINING_CANCELLED"] = 14; return values; })(); - return ConversationParticipant; + return QaScorecardRevision; })(); - v1.View = (function() { + v1.QaAnswer = (function() { /** - * Properties of a View. + * Properties of a QaAnswer. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IView - * @property {string|null} [name] View name - * @property {string|null} [displayName] View displayName - * @property {google.protobuf.ITimestamp|null} [createTime] View createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] View updateTime - * @property {string|null} [value] View value + * @interface IQaAnswer + * @property {string|null} [qaQuestion] QaAnswer qaQuestion + * @property {string|null} [conversation] QaAnswer conversation + * @property {string|null} [questionBody] QaAnswer questionBody + * @property {google.cloud.contactcenterinsights.v1.QaAnswer.IAnswerValue|null} [answerValue] QaAnswer answerValue + * @property {Array.|null} [tags] QaAnswer tags + * @property {Array.|null} [answerSources] QaAnswer answerSources */ /** - * Constructs a new View. + * Constructs a new QaAnswer. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a View. - * @implements IView + * @classdesc Represents a QaAnswer. + * @implements IQaAnswer * @constructor - * @param {google.cloud.contactcenterinsights.v1.IView=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IQaAnswer=} [properties] Properties to set */ - function View(properties) { + function QaAnswer(properties) { + this.tags = []; + this.answerSources = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -38842,131 +60416,151 @@ } /** - * View name. - * @member {string} name - * @memberof google.cloud.contactcenterinsights.v1.View + * QaAnswer qaQuestion. + * @member {string} qaQuestion + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer * @instance */ - View.prototype.name = ""; + QaAnswer.prototype.qaQuestion = ""; /** - * View displayName. - * @member {string} displayName - * @memberof google.cloud.contactcenterinsights.v1.View + * QaAnswer conversation. + * @member {string} conversation + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer * @instance */ - View.prototype.displayName = ""; + QaAnswer.prototype.conversation = ""; /** - * View createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.contactcenterinsights.v1.View + * QaAnswer questionBody. + * @member {string} questionBody + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer * @instance */ - View.prototype.createTime = null; + QaAnswer.prototype.questionBody = ""; /** - * View updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.contactcenterinsights.v1.View + * QaAnswer answerValue. + * @member {google.cloud.contactcenterinsights.v1.QaAnswer.IAnswerValue|null|undefined} answerValue + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer * @instance */ - View.prototype.updateTime = null; + QaAnswer.prototype.answerValue = null; /** - * View value. - * @member {string} value - * @memberof google.cloud.contactcenterinsights.v1.View + * QaAnswer tags. + * @member {Array.} tags + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer * @instance */ - View.prototype.value = ""; + QaAnswer.prototype.tags = $util.emptyArray; /** - * Creates a new View instance using the specified properties. + * QaAnswer answerSources. + * @member {Array.} answerSources + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer + * @instance + */ + QaAnswer.prototype.answerSources = $util.emptyArray; + + /** + * Creates a new QaAnswer instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.View + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer * @static - * @param {google.cloud.contactcenterinsights.v1.IView=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.View} View instance + * @param {google.cloud.contactcenterinsights.v1.IQaAnswer=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.QaAnswer} QaAnswer instance */ - View.create = function create(properties) { - return new View(properties); + QaAnswer.create = function create(properties) { + return new QaAnswer(properties); }; /** - * Encodes the specified View message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.View.verify|verify} messages. + * Encodes the specified QaAnswer message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaAnswer.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.View + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer * @static - * @param {google.cloud.contactcenterinsights.v1.IView} message View message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IQaAnswer} message QaAnswer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - View.encode = function encode(message, writer) { + QaAnswer.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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.value); + if (message.conversation != null && Object.hasOwnProperty.call(message, "conversation")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.conversation); + if (message.answerValue != null && Object.hasOwnProperty.call(message, "answerValue")) + $root.google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue.encode(message.answerValue, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.tags[i]); + if (message.questionBody != null && Object.hasOwnProperty.call(message, "questionBody")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.questionBody); + if (message.qaQuestion != null && Object.hasOwnProperty.call(message, "qaQuestion")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.qaQuestion); + if (message.answerSources != null && message.answerSources.length) + for (var i = 0; i < message.answerSources.length; ++i) + $root.google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource.encode(message.answerSources[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; /** - * Encodes the specified View message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.View.verify|verify} messages. + * Encodes the specified QaAnswer message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaAnswer.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.View + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer * @static - * @param {google.cloud.contactcenterinsights.v1.IView} message View message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IQaAnswer} message QaAnswer message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - View.encodeDelimited = function encodeDelimited(message, writer) { + QaAnswer.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a View message from the specified reader or buffer. + * Decodes a QaAnswer message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.View + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.View} View + * @returns {google.cloud.contactcenterinsights.v1.QaAnswer} QaAnswer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - View.decode = function decode(reader, length) { + QaAnswer.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.View(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.QaAnswer(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.name = reader.string(); + case 7: { + message.qaQuestion = reader.string(); break; } case 2: { - message.displayName = reader.string(); + message.conversation = reader.string(); break; } - case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 6: { + message.questionBody = reader.string(); break; } - case 4: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 3: { + message.answerValue = $root.google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue.decode(reader, reader.uint32()); break; } case 5: { - message.value = reader.string(); + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + } + case 8: { + if (!(message.answerSources && message.answerSources.length)) + message.answerSources = []; + message.answerSources.push($root.google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource.decode(reader, reader.uint32())); break; } default: @@ -38978,177 +60572,930 @@ }; /** - * Decodes a View message from the specified reader or buffer, length delimited. + * Decodes a QaAnswer message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.View + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.View} View + * @returns {google.cloud.contactcenterinsights.v1.QaAnswer} QaAnswer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - View.decodeDelimited = function decodeDelimited(reader) { + QaAnswer.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a View message. + * Verifies a QaAnswer message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.View + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - View.verify = function verify(message) { + QaAnswer.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.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (message.qaQuestion != null && message.hasOwnProperty("qaQuestion")) + if (!$util.isString(message.qaQuestion)) + return "qaQuestion: string expected"; + if (message.conversation != null && message.hasOwnProperty("conversation")) + if (!$util.isString(message.conversation)) + return "conversation: string expected"; + if (message.questionBody != null && message.hasOwnProperty("questionBody")) + if (!$util.isString(message.questionBody)) + return "questionBody: string expected"; + if (message.answerValue != null && message.hasOwnProperty("answerValue")) { + var error = $root.google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue.verify(message.answerValue); if (error) - return "updateTime." + error; + return "answerValue." + error; + } + 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.answerSources != null && message.hasOwnProperty("answerSources")) { + if (!Array.isArray(message.answerSources)) + return "answerSources: array expected"; + for (var i = 0; i < message.answerSources.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource.verify(message.answerSources[i]); + if (error) + return "answerSources." + error; + } } - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; return null; }; - /** - * Creates a View message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.View - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.View} View - */ - View.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.View) + /** + * Creates a QaAnswer message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.QaAnswer} QaAnswer + */ + QaAnswer.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.QaAnswer) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.QaAnswer(); + if (object.qaQuestion != null) + message.qaQuestion = String(object.qaQuestion); + if (object.conversation != null) + message.conversation = String(object.conversation); + if (object.questionBody != null) + message.questionBody = String(object.questionBody); + if (object.answerValue != null) { + if (typeof object.answerValue !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.QaAnswer.answerValue: object expected"); + message.answerValue = $root.google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue.fromObject(object.answerValue); + } + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.cloud.contactcenterinsights.v1.QaAnswer.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + if (object.answerSources) { + if (!Array.isArray(object.answerSources)) + throw TypeError(".google.cloud.contactcenterinsights.v1.QaAnswer.answerSources: array expected"); + message.answerSources = []; + for (var i = 0; i < object.answerSources.length; ++i) { + if (typeof object.answerSources[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.QaAnswer.answerSources: object expected"); + message.answerSources[i] = $root.google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource.fromObject(object.answerSources[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a QaAnswer message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer + * @static + * @param {google.cloud.contactcenterinsights.v1.QaAnswer} message QaAnswer + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QaAnswer.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.tags = []; + object.answerSources = []; + } + if (options.defaults) { + object.conversation = ""; + object.answerValue = null; + object.questionBody = ""; + object.qaQuestion = ""; + } + if (message.conversation != null && message.hasOwnProperty("conversation")) + object.conversation = message.conversation; + if (message.answerValue != null && message.hasOwnProperty("answerValue")) + object.answerValue = $root.google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue.toObject(message.answerValue, options); + 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.questionBody != null && message.hasOwnProperty("questionBody")) + object.questionBody = message.questionBody; + if (message.qaQuestion != null && message.hasOwnProperty("qaQuestion")) + object.qaQuestion = message.qaQuestion; + if (message.answerSources && message.answerSources.length) { + object.answerSources = []; + for (var j = 0; j < message.answerSources.length; ++j) + object.answerSources[j] = $root.google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource.toObject(message.answerSources[j], options); + } + return object; + }; + + /** + * Converts this QaAnswer to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer + * @instance + * @returns {Object.} JSON object + */ + QaAnswer.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QaAnswer + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QaAnswer.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.QaAnswer"; + }; + + QaAnswer.AnswerValue = (function() { + + /** + * Properties of an AnswerValue. + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer + * @interface IAnswerValue + * @property {string|null} [strValue] AnswerValue strValue + * @property {number|null} [numValue] AnswerValue numValue + * @property {boolean|null} [boolValue] AnswerValue boolValue + * @property {boolean|null} [naValue] AnswerValue naValue + * @property {string|null} [key] AnswerValue key + * @property {number|null} [score] AnswerValue score + * @property {number|null} [potentialScore] AnswerValue potentialScore + * @property {number|null} [normalizedScore] AnswerValue normalizedScore + */ + + /** + * Constructs a new AnswerValue. + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer + * @classdesc Represents an AnswerValue. + * @implements IAnswerValue + * @constructor + * @param {google.cloud.contactcenterinsights.v1.QaAnswer.IAnswerValue=} [properties] Properties to set + */ + function AnswerValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnswerValue strValue. + * @member {string|null|undefined} strValue + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue + * @instance + */ + AnswerValue.prototype.strValue = null; + + /** + * AnswerValue numValue. + * @member {number|null|undefined} numValue + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue + * @instance + */ + AnswerValue.prototype.numValue = null; + + /** + * AnswerValue boolValue. + * @member {boolean|null|undefined} boolValue + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue + * @instance + */ + AnswerValue.prototype.boolValue = null; + + /** + * AnswerValue naValue. + * @member {boolean|null|undefined} naValue + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue + * @instance + */ + AnswerValue.prototype.naValue = null; + + /** + * AnswerValue key. + * @member {string} key + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue + * @instance + */ + AnswerValue.prototype.key = ""; + + /** + * AnswerValue score. + * @member {number|null|undefined} score + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue + * @instance + */ + AnswerValue.prototype.score = null; + + /** + * AnswerValue potentialScore. + * @member {number|null|undefined} potentialScore + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue + * @instance + */ + AnswerValue.prototype.potentialScore = null; + + /** + * AnswerValue normalizedScore. + * @member {number|null|undefined} normalizedScore + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue + * @instance + */ + AnswerValue.prototype.normalizedScore = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AnswerValue value. + * @member {"strValue"|"numValue"|"boolValue"|"naValue"|undefined} value + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue + * @instance + */ + Object.defineProperty(AnswerValue.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["strValue", "numValue", "boolValue", "naValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AnswerValue _score. + * @member {"score"|undefined} _score + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue + * @instance + */ + Object.defineProperty(AnswerValue.prototype, "_score", { + get: $util.oneOfGetter($oneOfFields = ["score"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AnswerValue _potentialScore. + * @member {"potentialScore"|undefined} _potentialScore + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue + * @instance + */ + Object.defineProperty(AnswerValue.prototype, "_potentialScore", { + get: $util.oneOfGetter($oneOfFields = ["potentialScore"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AnswerValue _normalizedScore. + * @member {"normalizedScore"|undefined} _normalizedScore + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue + * @instance + */ + Object.defineProperty(AnswerValue.prototype, "_normalizedScore", { + get: $util.oneOfGetter($oneOfFields = ["normalizedScore"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AnswerValue instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue + * @static + * @param {google.cloud.contactcenterinsights.v1.QaAnswer.IAnswerValue=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue} AnswerValue instance + */ + AnswerValue.create = function create(properties) { + return new AnswerValue(properties); + }; + + /** + * Encodes the specified AnswerValue message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue + * @static + * @param {google.cloud.contactcenterinsights.v1.QaAnswer.IAnswerValue} message AnswerValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnswerValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.strValue != null && Object.hasOwnProperty.call(message, "strValue")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.strValue); + if (message.numValue != null && Object.hasOwnProperty.call(message, "numValue")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.numValue); + if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); + if (message.naValue != null && Object.hasOwnProperty.call(message, "naValue")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.naValue); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.score); + if (message.potentialScore != null && Object.hasOwnProperty.call(message, "potentialScore")) + writer.uint32(/* id 7, wireType 1 =*/57).double(message.potentialScore); + if (message.normalizedScore != null && Object.hasOwnProperty.call(message, "normalizedScore")) + writer.uint32(/* id 8, wireType 1 =*/65).double(message.normalizedScore); + return writer; + }; + + /** + * Encodes the specified AnswerValue message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue + * @static + * @param {google.cloud.contactcenterinsights.v1.QaAnswer.IAnswerValue} message AnswerValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnswerValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnswerValue message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue} AnswerValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnswerValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.strValue = reader.string(); + break; + } + case 3: { + message.numValue = reader.double(); + break; + } + case 4: { + message.boolValue = reader.bool(); + break; + } + case 5: { + message.naValue = reader.bool(); + break; + } + case 1: { + message.key = reader.string(); + break; + } + case 6: { + message.score = reader.double(); + break; + } + case 7: { + message.potentialScore = reader.double(); + break; + } + case 8: { + message.normalizedScore = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnswerValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue} AnswerValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnswerValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnswerValue message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnswerValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.strValue != null && message.hasOwnProperty("strValue")) { + properties.value = 1; + if (!$util.isString(message.strValue)) + return "strValue: string expected"; + } + if (message.numValue != null && message.hasOwnProperty("numValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (typeof message.numValue !== "number") + return "numValue: number expected"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.naValue != null && message.hasOwnProperty("naValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (typeof message.naValue !== "boolean") + return "naValue: boolean expected"; + } + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.score != null && message.hasOwnProperty("score")) { + properties._score = 1; + if (typeof message.score !== "number") + return "score: number expected"; + } + if (message.potentialScore != null && message.hasOwnProperty("potentialScore")) { + properties._potentialScore = 1; + if (typeof message.potentialScore !== "number") + return "potentialScore: number expected"; + } + if (message.normalizedScore != null && message.hasOwnProperty("normalizedScore")) { + properties._normalizedScore = 1; + if (typeof message.normalizedScore !== "number") + return "normalizedScore: number expected"; + } + return null; + }; + + /** + * Creates an AnswerValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue} AnswerValue + */ + AnswerValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue(); + if (object.strValue != null) + message.strValue = String(object.strValue); + if (object.numValue != null) + message.numValue = Number(object.numValue); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.naValue != null) + message.naValue = Boolean(object.naValue); + if (object.key != null) + message.key = String(object.key); + if (object.score != null) + message.score = Number(object.score); + if (object.potentialScore != null) + message.potentialScore = Number(object.potentialScore); + if (object.normalizedScore != null) + message.normalizedScore = Number(object.normalizedScore); + return message; + }; + + /** + * Creates a plain object from an AnswerValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue + * @static + * @param {google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue} message AnswerValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnswerValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.key = ""; + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.strValue != null && message.hasOwnProperty("strValue")) { + object.strValue = message.strValue; + if (options.oneofs) + object.value = "strValue"; + } + if (message.numValue != null && message.hasOwnProperty("numValue")) { + object.numValue = options.json && !isFinite(message.numValue) ? String(message.numValue) : message.numValue; + if (options.oneofs) + object.value = "numValue"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.value = "boolValue"; + } + if (message.naValue != null && message.hasOwnProperty("naValue")) { + object.naValue = message.naValue; + if (options.oneofs) + object.value = "naValue"; + } + if (message.score != null && message.hasOwnProperty("score")) { + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (options.oneofs) + object._score = "score"; + } + if (message.potentialScore != null && message.hasOwnProperty("potentialScore")) { + object.potentialScore = options.json && !isFinite(message.potentialScore) ? String(message.potentialScore) : message.potentialScore; + if (options.oneofs) + object._potentialScore = "potentialScore"; + } + if (message.normalizedScore != null && message.hasOwnProperty("normalizedScore")) { + object.normalizedScore = options.json && !isFinite(message.normalizedScore) ? String(message.normalizedScore) : message.normalizedScore; + if (options.oneofs) + object._normalizedScore = "normalizedScore"; + } + return object; + }; + + /** + * Converts this AnswerValue to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue + * @instance + * @returns {Object.} JSON object + */ + AnswerValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AnswerValue + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnswerValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue"; + }; + + return AnswerValue; + })(); + + QaAnswer.AnswerSource = (function() { + + /** + * Properties of an AnswerSource. + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer + * @interface IAnswerSource + * @property {google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource.SourceType|null} [sourceType] AnswerSource sourceType + * @property {google.cloud.contactcenterinsights.v1.QaAnswer.IAnswerValue|null} [answerValue] AnswerSource answerValue + */ + + /** + * Constructs a new AnswerSource. + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer + * @classdesc Represents an AnswerSource. + * @implements IAnswerSource + * @constructor + * @param {google.cloud.contactcenterinsights.v1.QaAnswer.IAnswerSource=} [properties] Properties to set + */ + function AnswerSource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnswerSource sourceType. + * @member {google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource.SourceType} sourceType + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource + * @instance + */ + AnswerSource.prototype.sourceType = 0; + + /** + * AnswerSource answerValue. + * @member {google.cloud.contactcenterinsights.v1.QaAnswer.IAnswerValue|null|undefined} answerValue + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource + * @instance + */ + AnswerSource.prototype.answerValue = null; + + /** + * Creates a new AnswerSource instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource + * @static + * @param {google.cloud.contactcenterinsights.v1.QaAnswer.IAnswerSource=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource} AnswerSource instance + */ + AnswerSource.create = function create(properties) { + return new AnswerSource(properties); + }; + + /** + * Encodes the specified AnswerSource message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource + * @static + * @param {google.cloud.contactcenterinsights.v1.QaAnswer.IAnswerSource} message AnswerSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnswerSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sourceType != null && Object.hasOwnProperty.call(message, "sourceType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sourceType); + if (message.answerValue != null && Object.hasOwnProperty.call(message, "answerValue")) + $root.google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue.encode(message.answerValue, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AnswerSource message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource + * @static + * @param {google.cloud.contactcenterinsights.v1.QaAnswer.IAnswerSource} message AnswerSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnswerSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnswerSource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource} AnswerSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnswerSource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.sourceType = reader.int32(); + break; + } + case 2: { + message.answerValue = $root.google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnswerSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource} AnswerSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnswerSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnswerSource message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnswerSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sourceType != null && message.hasOwnProperty("sourceType")) + switch (message.sourceType) { + default: + return "sourceType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.answerValue != null && message.hasOwnProperty("answerValue")) { + var error = $root.google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue.verify(message.answerValue); + if (error) + return "answerValue." + error; + } + return null; + }; + + /** + * Creates an AnswerSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource} AnswerSource + */ + AnswerSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource(); + switch (object.sourceType) { + default: + if (typeof object.sourceType === "number") { + message.sourceType = object.sourceType; + break; + } + break; + case "SOURCE_TYPE_UNSPECIFIED": + case 0: + message.sourceType = 0; + break; + case "SYSTEM_GENERATED": + case 1: + message.sourceType = 1; + break; + case "MANUAL_EDIT": + case 2: + message.sourceType = 2; + break; + } + if (object.answerValue != null) { + if (typeof object.answerValue !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource.answerValue: object expected"); + message.answerValue = $root.google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue.fromObject(object.answerValue); + } + return message; + }; + + /** + * Creates a plain object from an AnswerSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource + * @static + * @param {google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource} message AnswerSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnswerSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sourceType = options.enums === String ? "SOURCE_TYPE_UNSPECIFIED" : 0; + object.answerValue = null; + } + if (message.sourceType != null && message.hasOwnProperty("sourceType")) + object.sourceType = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource.SourceType[message.sourceType] === undefined ? message.sourceType : $root.google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource.SourceType[message.sourceType] : message.sourceType; + if (message.answerValue != null && message.hasOwnProperty("answerValue")) + object.answerValue = $root.google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue.toObject(message.answerValue, options); return object; - var message = new $root.google.cloud.contactcenterinsights.v1.View(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.View.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.View.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.value != null) - message.value = String(object.value); - return message; - }; + }; - /** - * Creates a plain object from a View message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.View - * @static - * @param {google.cloud.contactcenterinsights.v1.View} message View - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - View.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.createTime = null; - object.updateTime = null; - object.value = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; + /** + * Converts this AnswerSource to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource + * @instance + * @returns {Object.} JSON object + */ + AnswerSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this View to JSON. - * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.View - * @instance - * @returns {Object.} JSON object - */ - View.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for AnswerSource + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnswerSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource"; + }; - /** - * Gets the default type url for View - * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.View - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - View.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.View"; - }; + /** + * SourceType enum. + * @name google.cloud.contactcenterinsights.v1.QaAnswer.AnswerSource.SourceType + * @enum {number} + * @property {number} SOURCE_TYPE_UNSPECIFIED=0 SOURCE_TYPE_UNSPECIFIED value + * @property {number} SYSTEM_GENERATED=1 SYSTEM_GENERATED value + * @property {number} MANUAL_EDIT=2 MANUAL_EDIT value + */ + AnswerSource.SourceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SOURCE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SYSTEM_GENERATED"] = 1; + values[valuesById[2] = "MANUAL_EDIT"] = 2; + return values; + })(); - return View; + return AnswerSource; + })(); + + return QaAnswer; })(); - v1.AnnotatorSelector = (function() { + v1.QaScorecardResult = (function() { /** - * Properties of an AnnotatorSelector. + * Properties of a QaScorecardResult. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IAnnotatorSelector - * @property {boolean|null} [runInterruptionAnnotator] AnnotatorSelector runInterruptionAnnotator - * @property {boolean|null} [runSilenceAnnotator] AnnotatorSelector runSilenceAnnotator - * @property {boolean|null} [runPhraseMatcherAnnotator] AnnotatorSelector runPhraseMatcherAnnotator - * @property {Array.|null} [phraseMatchers] AnnotatorSelector phraseMatchers - * @property {boolean|null} [runSentimentAnnotator] AnnotatorSelector runSentimentAnnotator - * @property {boolean|null} [runEntityAnnotator] AnnotatorSelector runEntityAnnotator - * @property {boolean|null} [runIntentAnnotator] AnnotatorSelector runIntentAnnotator - * @property {boolean|null} [runIssueModelAnnotator] AnnotatorSelector runIssueModelAnnotator - * @property {Array.|null} [issueModels] AnnotatorSelector issueModels - * @property {boolean|null} [runSummarizationAnnotator] AnnotatorSelector runSummarizationAnnotator - * @property {google.cloud.contactcenterinsights.v1.AnnotatorSelector.ISummarizationConfig|null} [summarizationConfig] AnnotatorSelector summarizationConfig - */ - - /** - * Constructs a new AnnotatorSelector. + * @interface IQaScorecardResult + * @property {string|null} [name] QaScorecardResult name + * @property {string|null} [qaScorecardRevision] QaScorecardResult qaScorecardRevision + * @property {string|null} [conversation] QaScorecardResult conversation + * @property {google.protobuf.ITimestamp|null} [createTime] QaScorecardResult createTime + * @property {string|null} [agentId] QaScorecardResult agentId + * @property {Array.|null} [qaAnswers] QaScorecardResult qaAnswers + * @property {number|null} [score] QaScorecardResult score + * @property {number|null} [potentialScore] QaScorecardResult potentialScore + * @property {number|null} [normalizedScore] QaScorecardResult normalizedScore + * @property {Array.|null} [qaTagResults] QaScorecardResult qaTagResults + * @property {Array.|null} [scoreSources] QaScorecardResult scoreSources + */ + + /** + * Constructs a new QaScorecardResult. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents an AnnotatorSelector. - * @implements IAnnotatorSelector + * @classdesc Represents a QaScorecardResult. + * @implements IQaScorecardResult * @constructor - * @param {google.cloud.contactcenterinsights.v1.IAnnotatorSelector=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IQaScorecardResult=} [properties] Properties to set */ - function AnnotatorSelector(properties) { - this.phraseMatchers = []; - this.issueModels = []; + function QaScorecardResult(properties) { + this.qaAnswers = []; + this.qaTagResults = []; + this.scoreSources = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39156,221 +61503,260 @@ } /** - * AnnotatorSelector runInterruptionAnnotator. - * @member {boolean} runInterruptionAnnotator - * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * QaScorecardResult name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult * @instance */ - AnnotatorSelector.prototype.runInterruptionAnnotator = false; + QaScorecardResult.prototype.name = ""; /** - * AnnotatorSelector runSilenceAnnotator. - * @member {boolean} runSilenceAnnotator - * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * QaScorecardResult qaScorecardRevision. + * @member {string} qaScorecardRevision + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult * @instance */ - AnnotatorSelector.prototype.runSilenceAnnotator = false; + QaScorecardResult.prototype.qaScorecardRevision = ""; /** - * AnnotatorSelector runPhraseMatcherAnnotator. - * @member {boolean} runPhraseMatcherAnnotator - * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * QaScorecardResult conversation. + * @member {string} conversation + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult * @instance */ - AnnotatorSelector.prototype.runPhraseMatcherAnnotator = false; + QaScorecardResult.prototype.conversation = ""; /** - * AnnotatorSelector phraseMatchers. - * @member {Array.} phraseMatchers - * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * QaScorecardResult createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult * @instance */ - AnnotatorSelector.prototype.phraseMatchers = $util.emptyArray; + QaScorecardResult.prototype.createTime = null; /** - * AnnotatorSelector runSentimentAnnotator. - * @member {boolean} runSentimentAnnotator - * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * QaScorecardResult agentId. + * @member {string} agentId + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult * @instance */ - AnnotatorSelector.prototype.runSentimentAnnotator = false; + QaScorecardResult.prototype.agentId = ""; /** - * AnnotatorSelector runEntityAnnotator. - * @member {boolean} runEntityAnnotator - * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * QaScorecardResult qaAnswers. + * @member {Array.} qaAnswers + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult * @instance */ - AnnotatorSelector.prototype.runEntityAnnotator = false; + QaScorecardResult.prototype.qaAnswers = $util.emptyArray; /** - * AnnotatorSelector runIntentAnnotator. - * @member {boolean} runIntentAnnotator - * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * QaScorecardResult score. + * @member {number|null|undefined} score + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult * @instance */ - AnnotatorSelector.prototype.runIntentAnnotator = false; + QaScorecardResult.prototype.score = null; /** - * AnnotatorSelector runIssueModelAnnotator. - * @member {boolean} runIssueModelAnnotator - * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * QaScorecardResult potentialScore. + * @member {number|null|undefined} potentialScore + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult * @instance */ - AnnotatorSelector.prototype.runIssueModelAnnotator = false; + QaScorecardResult.prototype.potentialScore = null; /** - * AnnotatorSelector issueModels. - * @member {Array.} issueModels - * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * QaScorecardResult normalizedScore. + * @member {number|null|undefined} normalizedScore + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult * @instance */ - AnnotatorSelector.prototype.issueModels = $util.emptyArray; + QaScorecardResult.prototype.normalizedScore = null; /** - * AnnotatorSelector runSummarizationAnnotator. - * @member {boolean} runSummarizationAnnotator - * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * QaScorecardResult qaTagResults. + * @member {Array.} qaTagResults + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult * @instance */ - AnnotatorSelector.prototype.runSummarizationAnnotator = false; + QaScorecardResult.prototype.qaTagResults = $util.emptyArray; /** - * AnnotatorSelector summarizationConfig. - * @member {google.cloud.contactcenterinsights.v1.AnnotatorSelector.ISummarizationConfig|null|undefined} summarizationConfig - * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * QaScorecardResult scoreSources. + * @member {Array.} scoreSources + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult * @instance */ - AnnotatorSelector.prototype.summarizationConfig = null; + QaScorecardResult.prototype.scoreSources = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new AnnotatorSelector instance using the specified properties. + * QaScorecardResult _score. + * @member {"score"|undefined} _score + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult + * @instance + */ + Object.defineProperty(QaScorecardResult.prototype, "_score", { + get: $util.oneOfGetter($oneOfFields = ["score"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * QaScorecardResult _potentialScore. + * @member {"potentialScore"|undefined} _potentialScore + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult + * @instance + */ + Object.defineProperty(QaScorecardResult.prototype, "_potentialScore", { + get: $util.oneOfGetter($oneOfFields = ["potentialScore"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * QaScorecardResult _normalizedScore. + * @member {"normalizedScore"|undefined} _normalizedScore + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult + * @instance + */ + Object.defineProperty(QaScorecardResult.prototype, "_normalizedScore", { + get: $util.oneOfGetter($oneOfFields = ["normalizedScore"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new QaScorecardResult instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult * @static - * @param {google.cloud.contactcenterinsights.v1.IAnnotatorSelector=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.AnnotatorSelector} AnnotatorSelector instance + * @param {google.cloud.contactcenterinsights.v1.IQaScorecardResult=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.QaScorecardResult} QaScorecardResult instance */ - AnnotatorSelector.create = function create(properties) { - return new AnnotatorSelector(properties); + QaScorecardResult.create = function create(properties) { + return new QaScorecardResult(properties); }; /** - * Encodes the specified AnnotatorSelector message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotatorSelector.verify|verify} messages. + * Encodes the specified QaScorecardResult message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaScorecardResult.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult * @static - * @param {google.cloud.contactcenterinsights.v1.IAnnotatorSelector} message AnnotatorSelector message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IQaScorecardResult} message QaScorecardResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnnotatorSelector.encode = function encode(message, writer) { + QaScorecardResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.runInterruptionAnnotator != null && Object.hasOwnProperty.call(message, "runInterruptionAnnotator")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.runInterruptionAnnotator); - if (message.runSilenceAnnotator != null && Object.hasOwnProperty.call(message, "runSilenceAnnotator")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.runSilenceAnnotator); - if (message.runPhraseMatcherAnnotator != null && Object.hasOwnProperty.call(message, "runPhraseMatcherAnnotator")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.runPhraseMatcherAnnotator); - if (message.phraseMatchers != null && message.phraseMatchers.length) - for (var i = 0; i < message.phraseMatchers.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.phraseMatchers[i]); - if (message.runSentimentAnnotator != null && Object.hasOwnProperty.call(message, "runSentimentAnnotator")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.runSentimentAnnotator); - if (message.runEntityAnnotator != null && Object.hasOwnProperty.call(message, "runEntityAnnotator")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.runEntityAnnotator); - if (message.runIntentAnnotator != null && Object.hasOwnProperty.call(message, "runIntentAnnotator")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.runIntentAnnotator); - if (message.runIssueModelAnnotator != null && Object.hasOwnProperty.call(message, "runIssueModelAnnotator")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.runIssueModelAnnotator); - if (message.runSummarizationAnnotator != null && Object.hasOwnProperty.call(message, "runSummarizationAnnotator")) - writer.uint32(/* id 9, wireType 0 =*/72).bool(message.runSummarizationAnnotator); - if (message.issueModels != null && message.issueModels.length) - for (var i = 0; i < message.issueModels.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.issueModels[i]); - if (message.summarizationConfig != null && Object.hasOwnProperty.call(message, "summarizationConfig")) - $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.encode(message.summarizationConfig, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.qaScorecardRevision != null && Object.hasOwnProperty.call(message, "qaScorecardRevision")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.qaScorecardRevision); + if (message.conversation != null && Object.hasOwnProperty.call(message, "conversation")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.conversation); + 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.agentId != null && Object.hasOwnProperty.call(message, "agentId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.agentId); + if (message.qaAnswers != null && message.qaAnswers.length) + for (var i = 0; i < message.qaAnswers.length; ++i) + $root.google.cloud.contactcenterinsights.v1.QaAnswer.encode(message.qaAnswers[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 7, wireType 1 =*/57).double(message.score); + if (message.potentialScore != null && Object.hasOwnProperty.call(message, "potentialScore")) + writer.uint32(/* id 8, wireType 1 =*/65).double(message.potentialScore); + if (message.normalizedScore != null && Object.hasOwnProperty.call(message, "normalizedScore")) + writer.uint32(/* id 9, wireType 1 =*/73).double(message.normalizedScore); + if (message.qaTagResults != null && message.qaTagResults.length) + for (var i = 0; i < message.qaTagResults.length; ++i) + $root.google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult.encode(message.qaTagResults[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.scoreSources != null && message.scoreSources.length) + for (var i = 0; i < message.scoreSources.length; ++i) + $root.google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource.encode(message.scoreSources[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); return writer; }; /** - * Encodes the specified AnnotatorSelector message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotatorSelector.verify|verify} messages. + * Encodes the specified QaScorecardResult message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaScorecardResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult * @static - * @param {google.cloud.contactcenterinsights.v1.IAnnotatorSelector} message AnnotatorSelector message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IQaScorecardResult} message QaScorecardResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnnotatorSelector.encodeDelimited = function encodeDelimited(message, writer) { + QaScorecardResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AnnotatorSelector message from the specified reader or buffer. + * Decodes a QaScorecardResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.AnnotatorSelector} AnnotatorSelector + * @returns {google.cloud.contactcenterinsights.v1.QaScorecardResult} QaScorecardResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnnotatorSelector.decode = function decode(reader, length) { + QaScorecardResult.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.QaScorecardResult(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.runInterruptionAnnotator = reader.bool(); + message.name = reader.string(); break; } case 2: { - message.runSilenceAnnotator = reader.bool(); + message.qaScorecardRevision = reader.string(); break; } case 3: { - message.runPhraseMatcherAnnotator = reader.bool(); + message.conversation = reader.string(); break; } case 4: { - if (!(message.phraseMatchers && message.phraseMatchers.length)) - message.phraseMatchers = []; - message.phraseMatchers.push(reader.string()); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 5: { - message.runSentimentAnnotator = reader.bool(); + message.agentId = reader.string(); break; } case 6: { - message.runEntityAnnotator = reader.bool(); + if (!(message.qaAnswers && message.qaAnswers.length)) + message.qaAnswers = []; + message.qaAnswers.push($root.google.cloud.contactcenterinsights.v1.QaAnswer.decode(reader, reader.uint32())); break; } case 7: { - message.runIntentAnnotator = reader.bool(); + message.score = reader.double(); break; } case 8: { - message.runIssueModelAnnotator = reader.bool(); + message.potentialScore = reader.double(); break; } - case 10: { - if (!(message.issueModels && message.issueModels.length)) - message.issueModels = []; - message.issueModels.push(reader.string()); + case 9: { + message.normalizedScore = reader.double(); break; } - case 9: { - message.runSummarizationAnnotator = reader.bool(); + case 10: { + if (!(message.qaTagResults && message.qaTagResults.length)) + message.qaTagResults = []; + message.qaTagResults.push($root.google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult.decode(reader, reader.uint32())); break; } case 11: { - message.summarizationConfig = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.decode(reader, reader.uint32()); + if (!(message.scoreSources && message.scoreSources.length)) + message.scoreSources = []; + message.scoreSources.push($root.google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource.decode(reader, reader.uint32())); break; } default: @@ -39382,232 +61768,274 @@ }; /** - * Decodes an AnnotatorSelector message from the specified reader or buffer, length delimited. + * Decodes a QaScorecardResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.AnnotatorSelector} AnnotatorSelector + * @returns {google.cloud.contactcenterinsights.v1.QaScorecardResult} QaScorecardResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnnotatorSelector.decodeDelimited = function decodeDelimited(reader) { + QaScorecardResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AnnotatorSelector message. + * Verifies a QaScorecardResult message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AnnotatorSelector.verify = function verify(message) { + QaScorecardResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.runInterruptionAnnotator != null && message.hasOwnProperty("runInterruptionAnnotator")) - if (typeof message.runInterruptionAnnotator !== "boolean") - return "runInterruptionAnnotator: boolean expected"; - if (message.runSilenceAnnotator != null && message.hasOwnProperty("runSilenceAnnotator")) - if (typeof message.runSilenceAnnotator !== "boolean") - return "runSilenceAnnotator: boolean expected"; - if (message.runPhraseMatcherAnnotator != null && message.hasOwnProperty("runPhraseMatcherAnnotator")) - if (typeof message.runPhraseMatcherAnnotator !== "boolean") - return "runPhraseMatcherAnnotator: boolean expected"; - if (message.phraseMatchers != null && message.hasOwnProperty("phraseMatchers")) { - if (!Array.isArray(message.phraseMatchers)) - return "phraseMatchers: array expected"; - for (var i = 0; i < message.phraseMatchers.length; ++i) - if (!$util.isString(message.phraseMatchers[i])) - return "phraseMatchers: string[] expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.qaScorecardRevision != null && message.hasOwnProperty("qaScorecardRevision")) + if (!$util.isString(message.qaScorecardRevision)) + return "qaScorecardRevision: string expected"; + if (message.conversation != null && message.hasOwnProperty("conversation")) + if (!$util.isString(message.conversation)) + return "conversation: 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.runSentimentAnnotator != null && message.hasOwnProperty("runSentimentAnnotator")) - if (typeof message.runSentimentAnnotator !== "boolean") - return "runSentimentAnnotator: boolean expected"; - if (message.runEntityAnnotator != null && message.hasOwnProperty("runEntityAnnotator")) - if (typeof message.runEntityAnnotator !== "boolean") - return "runEntityAnnotator: boolean expected"; - if (message.runIntentAnnotator != null && message.hasOwnProperty("runIntentAnnotator")) - if (typeof message.runIntentAnnotator !== "boolean") - return "runIntentAnnotator: boolean expected"; - if (message.runIssueModelAnnotator != null && message.hasOwnProperty("runIssueModelAnnotator")) - if (typeof message.runIssueModelAnnotator !== "boolean") - return "runIssueModelAnnotator: boolean expected"; - if (message.issueModels != null && message.hasOwnProperty("issueModels")) { - if (!Array.isArray(message.issueModels)) - return "issueModels: array expected"; - for (var i = 0; i < message.issueModels.length; ++i) - if (!$util.isString(message.issueModels[i])) - return "issueModels: string[] expected"; + if (message.agentId != null && message.hasOwnProperty("agentId")) + if (!$util.isString(message.agentId)) + return "agentId: string expected"; + if (message.qaAnswers != null && message.hasOwnProperty("qaAnswers")) { + if (!Array.isArray(message.qaAnswers)) + return "qaAnswers: array expected"; + for (var i = 0; i < message.qaAnswers.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.QaAnswer.verify(message.qaAnswers[i]); + if (error) + return "qaAnswers." + error; + } } - if (message.runSummarizationAnnotator != null && message.hasOwnProperty("runSummarizationAnnotator")) - if (typeof message.runSummarizationAnnotator !== "boolean") - return "runSummarizationAnnotator: boolean expected"; - if (message.summarizationConfig != null && message.hasOwnProperty("summarizationConfig")) { - var error = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.verify(message.summarizationConfig); - if (error) - return "summarizationConfig." + error; + if (message.score != null && message.hasOwnProperty("score")) { + properties._score = 1; + if (typeof message.score !== "number") + return "score: number expected"; + } + if (message.potentialScore != null && message.hasOwnProperty("potentialScore")) { + properties._potentialScore = 1; + if (typeof message.potentialScore !== "number") + return "potentialScore: number expected"; + } + if (message.normalizedScore != null && message.hasOwnProperty("normalizedScore")) { + properties._normalizedScore = 1; + if (typeof message.normalizedScore !== "number") + return "normalizedScore: number expected"; + } + if (message.qaTagResults != null && message.hasOwnProperty("qaTagResults")) { + if (!Array.isArray(message.qaTagResults)) + return "qaTagResults: array expected"; + for (var i = 0; i < message.qaTagResults.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult.verify(message.qaTagResults[i]); + if (error) + return "qaTagResults." + error; + } + } + if (message.scoreSources != null && message.hasOwnProperty("scoreSources")) { + if (!Array.isArray(message.scoreSources)) + return "scoreSources: array expected"; + for (var i = 0; i < message.scoreSources.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource.verify(message.scoreSources[i]); + if (error) + return "scoreSources." + error; + } } return null; }; /** - * Creates an AnnotatorSelector message from a plain object. Also converts values to their respective internal types. + * Creates a QaScorecardResult message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.AnnotatorSelector} AnnotatorSelector + * @returns {google.cloud.contactcenterinsights.v1.QaScorecardResult} QaScorecardResult */ - AnnotatorSelector.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector) + QaScorecardResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.QaScorecardResult) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector(); - if (object.runInterruptionAnnotator != null) - message.runInterruptionAnnotator = Boolean(object.runInterruptionAnnotator); - if (object.runSilenceAnnotator != null) - message.runSilenceAnnotator = Boolean(object.runSilenceAnnotator); - if (object.runPhraseMatcherAnnotator != null) - message.runPhraseMatcherAnnotator = Boolean(object.runPhraseMatcherAnnotator); - if (object.phraseMatchers) { - if (!Array.isArray(object.phraseMatchers)) - throw TypeError(".google.cloud.contactcenterinsights.v1.AnnotatorSelector.phraseMatchers: array expected"); - message.phraseMatchers = []; - for (var i = 0; i < object.phraseMatchers.length; ++i) - message.phraseMatchers[i] = String(object.phraseMatchers[i]); + var message = new $root.google.cloud.contactcenterinsights.v1.QaScorecardResult(); + if (object.name != null) + message.name = String(object.name); + if (object.qaScorecardRevision != null) + message.qaScorecardRevision = String(object.qaScorecardRevision); + if (object.conversation != null) + message.conversation = String(object.conversation); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.QaScorecardResult.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - if (object.runSentimentAnnotator != null) - message.runSentimentAnnotator = Boolean(object.runSentimentAnnotator); - if (object.runEntityAnnotator != null) - message.runEntityAnnotator = Boolean(object.runEntityAnnotator); - if (object.runIntentAnnotator != null) - message.runIntentAnnotator = Boolean(object.runIntentAnnotator); - if (object.runIssueModelAnnotator != null) - message.runIssueModelAnnotator = Boolean(object.runIssueModelAnnotator); - if (object.issueModels) { - if (!Array.isArray(object.issueModels)) - throw TypeError(".google.cloud.contactcenterinsights.v1.AnnotatorSelector.issueModels: array expected"); - message.issueModels = []; - for (var i = 0; i < object.issueModels.length; ++i) - message.issueModels[i] = String(object.issueModels[i]); + if (object.agentId != null) + message.agentId = String(object.agentId); + if (object.qaAnswers) { + if (!Array.isArray(object.qaAnswers)) + throw TypeError(".google.cloud.contactcenterinsights.v1.QaScorecardResult.qaAnswers: array expected"); + message.qaAnswers = []; + for (var i = 0; i < object.qaAnswers.length; ++i) { + if (typeof object.qaAnswers[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.QaScorecardResult.qaAnswers: object expected"); + message.qaAnswers[i] = $root.google.cloud.contactcenterinsights.v1.QaAnswer.fromObject(object.qaAnswers[i]); + } } - if (object.runSummarizationAnnotator != null) - message.runSummarizationAnnotator = Boolean(object.runSummarizationAnnotator); - if (object.summarizationConfig != null) { - if (typeof object.summarizationConfig !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.AnnotatorSelector.summarizationConfig: object expected"); - message.summarizationConfig = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.fromObject(object.summarizationConfig); + if (object.score != null) + message.score = Number(object.score); + if (object.potentialScore != null) + message.potentialScore = Number(object.potentialScore); + if (object.normalizedScore != null) + message.normalizedScore = Number(object.normalizedScore); + if (object.qaTagResults) { + if (!Array.isArray(object.qaTagResults)) + throw TypeError(".google.cloud.contactcenterinsights.v1.QaScorecardResult.qaTagResults: array expected"); + message.qaTagResults = []; + for (var i = 0; i < object.qaTagResults.length; ++i) { + if (typeof object.qaTagResults[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.QaScorecardResult.qaTagResults: object expected"); + message.qaTagResults[i] = $root.google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult.fromObject(object.qaTagResults[i]); + } + } + if (object.scoreSources) { + if (!Array.isArray(object.scoreSources)) + throw TypeError(".google.cloud.contactcenterinsights.v1.QaScorecardResult.scoreSources: array expected"); + message.scoreSources = []; + for (var i = 0; i < object.scoreSources.length; ++i) { + if (typeof object.scoreSources[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.QaScorecardResult.scoreSources: object expected"); + message.scoreSources[i] = $root.google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource.fromObject(object.scoreSources[i]); + } } return message; }; /** - * Creates a plain object from an AnnotatorSelector message. Also converts values to other types if specified. + * Creates a plain object from a QaScorecardResult message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult * @static - * @param {google.cloud.contactcenterinsights.v1.AnnotatorSelector} message AnnotatorSelector + * @param {google.cloud.contactcenterinsights.v1.QaScorecardResult} message QaScorecardResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AnnotatorSelector.toObject = function toObject(message, options) { + QaScorecardResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) { - object.phraseMatchers = []; - object.issueModels = []; + object.qaAnswers = []; + object.qaTagResults = []; + object.scoreSources = []; } if (options.defaults) { - object.runInterruptionAnnotator = false; - object.runSilenceAnnotator = false; - object.runPhraseMatcherAnnotator = false; - object.runSentimentAnnotator = false; - object.runEntityAnnotator = false; - object.runIntentAnnotator = false; - object.runIssueModelAnnotator = false; - object.runSummarizationAnnotator = false; - object.summarizationConfig = null; + object.name = ""; + object.qaScorecardRevision = ""; + object.conversation = ""; + object.createTime = null; + object.agentId = ""; } - if (message.runInterruptionAnnotator != null && message.hasOwnProperty("runInterruptionAnnotator")) - object.runInterruptionAnnotator = message.runInterruptionAnnotator; - if (message.runSilenceAnnotator != null && message.hasOwnProperty("runSilenceAnnotator")) - object.runSilenceAnnotator = message.runSilenceAnnotator; - if (message.runPhraseMatcherAnnotator != null && message.hasOwnProperty("runPhraseMatcherAnnotator")) - object.runPhraseMatcherAnnotator = message.runPhraseMatcherAnnotator; - if (message.phraseMatchers && message.phraseMatchers.length) { - object.phraseMatchers = []; - for (var j = 0; j < message.phraseMatchers.length; ++j) - object.phraseMatchers[j] = message.phraseMatchers[j]; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.qaScorecardRevision != null && message.hasOwnProperty("qaScorecardRevision")) + object.qaScorecardRevision = message.qaScorecardRevision; + if (message.conversation != null && message.hasOwnProperty("conversation")) + object.conversation = message.conversation; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.agentId != null && message.hasOwnProperty("agentId")) + object.agentId = message.agentId; + if (message.qaAnswers && message.qaAnswers.length) { + object.qaAnswers = []; + for (var j = 0; j < message.qaAnswers.length; ++j) + object.qaAnswers[j] = $root.google.cloud.contactcenterinsights.v1.QaAnswer.toObject(message.qaAnswers[j], options); } - if (message.runSentimentAnnotator != null && message.hasOwnProperty("runSentimentAnnotator")) - object.runSentimentAnnotator = message.runSentimentAnnotator; - if (message.runEntityAnnotator != null && message.hasOwnProperty("runEntityAnnotator")) - object.runEntityAnnotator = message.runEntityAnnotator; - if (message.runIntentAnnotator != null && message.hasOwnProperty("runIntentAnnotator")) - object.runIntentAnnotator = message.runIntentAnnotator; - if (message.runIssueModelAnnotator != null && message.hasOwnProperty("runIssueModelAnnotator")) - object.runIssueModelAnnotator = message.runIssueModelAnnotator; - if (message.runSummarizationAnnotator != null && message.hasOwnProperty("runSummarizationAnnotator")) - object.runSummarizationAnnotator = message.runSummarizationAnnotator; - if (message.issueModels && message.issueModels.length) { - object.issueModels = []; - for (var j = 0; j < message.issueModels.length; ++j) - object.issueModels[j] = message.issueModels[j]; + if (message.score != null && message.hasOwnProperty("score")) { + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (options.oneofs) + object._score = "score"; + } + if (message.potentialScore != null && message.hasOwnProperty("potentialScore")) { + object.potentialScore = options.json && !isFinite(message.potentialScore) ? String(message.potentialScore) : message.potentialScore; + if (options.oneofs) + object._potentialScore = "potentialScore"; + } + if (message.normalizedScore != null && message.hasOwnProperty("normalizedScore")) { + object.normalizedScore = options.json && !isFinite(message.normalizedScore) ? String(message.normalizedScore) : message.normalizedScore; + if (options.oneofs) + object._normalizedScore = "normalizedScore"; + } + if (message.qaTagResults && message.qaTagResults.length) { + object.qaTagResults = []; + for (var j = 0; j < message.qaTagResults.length; ++j) + object.qaTagResults[j] = $root.google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult.toObject(message.qaTagResults[j], options); + } + if (message.scoreSources && message.scoreSources.length) { + object.scoreSources = []; + for (var j = 0; j < message.scoreSources.length; ++j) + object.scoreSources[j] = $root.google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource.toObject(message.scoreSources[j], options); } - if (message.summarizationConfig != null && message.hasOwnProperty("summarizationConfig")) - object.summarizationConfig = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.toObject(message.summarizationConfig, options); return object; }; /** - * Converts this AnnotatorSelector to JSON. + * Converts this QaScorecardResult to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult * @instance * @returns {Object.} JSON object */ - AnnotatorSelector.prototype.toJSON = function toJSON() { + QaScorecardResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AnnotatorSelector + * Gets the default type url for QaScorecardResult * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AnnotatorSelector.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + QaScorecardResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.AnnotatorSelector"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.QaScorecardResult"; }; - AnnotatorSelector.SummarizationConfig = (function() { + QaScorecardResult.QaTagResult = (function() { /** - * Properties of a SummarizationConfig. - * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector - * @interface ISummarizationConfig - * @property {string|null} [conversationProfile] SummarizationConfig conversationProfile - * @property {google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.SummarizationModel|null} [summarizationModel] SummarizationConfig summarizationModel + * Properties of a QaTagResult. + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult + * @interface IQaTagResult + * @property {string|null} [tag] QaTagResult tag + * @property {number|null} [score] QaTagResult score + * @property {number|null} [potentialScore] QaTagResult potentialScore + * @property {number|null} [normalizedScore] QaTagResult normalizedScore */ /** - * Constructs a new SummarizationConfig. - * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector - * @classdesc Represents a SummarizationConfig. - * @implements ISummarizationConfig + * Constructs a new QaTagResult. + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult + * @classdesc Represents a QaTagResult. + * @implements IQaTagResult * @constructor - * @param {google.cloud.contactcenterinsights.v1.AnnotatorSelector.ISummarizationConfig=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.QaScorecardResult.IQaTagResult=} [properties] Properties to set */ - function SummarizationConfig(properties) { + function QaTagResult(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39615,103 +62043,153 @@ } /** - * SummarizationConfig conversationProfile. - * @member {string|null|undefined} conversationProfile - * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * QaTagResult tag. + * @member {string} tag + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult * @instance */ - SummarizationConfig.prototype.conversationProfile = null; + QaTagResult.prototype.tag = ""; /** - * SummarizationConfig summarizationModel. - * @member {google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.SummarizationModel|null|undefined} summarizationModel - * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * QaTagResult score. + * @member {number|null|undefined} score + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult * @instance */ - SummarizationConfig.prototype.summarizationModel = null; + QaTagResult.prototype.score = null; + + /** + * QaTagResult potentialScore. + * @member {number|null|undefined} potentialScore + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult + * @instance + */ + QaTagResult.prototype.potentialScore = null; + + /** + * QaTagResult normalizedScore. + * @member {number|null|undefined} normalizedScore + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult + * @instance + */ + QaTagResult.prototype.normalizedScore = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * SummarizationConfig modelSource. - * @member {"conversationProfile"|"summarizationModel"|undefined} modelSource - * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * QaTagResult _score. + * @member {"score"|undefined} _score + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult * @instance */ - Object.defineProperty(SummarizationConfig.prototype, "modelSource", { - get: $util.oneOfGetter($oneOfFields = ["conversationProfile", "summarizationModel"]), + Object.defineProperty(QaTagResult.prototype, "_score", { + get: $util.oneOfGetter($oneOfFields = ["score"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new SummarizationConfig instance using the specified properties. + * QaTagResult _potentialScore. + * @member {"potentialScore"|undefined} _potentialScore + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult + * @instance + */ + Object.defineProperty(QaTagResult.prototype, "_potentialScore", { + get: $util.oneOfGetter($oneOfFields = ["potentialScore"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * QaTagResult _normalizedScore. + * @member {"normalizedScore"|undefined} _normalizedScore + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult + * @instance + */ + Object.defineProperty(QaTagResult.prototype, "_normalizedScore", { + get: $util.oneOfGetter($oneOfFields = ["normalizedScore"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new QaTagResult instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult * @static - * @param {google.cloud.contactcenterinsights.v1.AnnotatorSelector.ISummarizationConfig=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig} SummarizationConfig instance + * @param {google.cloud.contactcenterinsights.v1.QaScorecardResult.IQaTagResult=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult} QaTagResult instance */ - SummarizationConfig.create = function create(properties) { - return new SummarizationConfig(properties); + QaTagResult.create = function create(properties) { + return new QaTagResult(properties); }; /** - * Encodes the specified SummarizationConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.verify|verify} messages. + * Encodes the specified QaTagResult message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult * @static - * @param {google.cloud.contactcenterinsights.v1.AnnotatorSelector.ISummarizationConfig} message SummarizationConfig message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.QaScorecardResult.IQaTagResult} message QaTagResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SummarizationConfig.encode = function encode(message, writer) { + QaTagResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.conversationProfile != null && Object.hasOwnProperty.call(message, "conversationProfile")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversationProfile); - if (message.summarizationModel != null && Object.hasOwnProperty.call(message, "summarizationModel")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.summarizationModel); + if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.tag); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.score); + if (message.potentialScore != null && Object.hasOwnProperty.call(message, "potentialScore")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.potentialScore); + if (message.normalizedScore != null && Object.hasOwnProperty.call(message, "normalizedScore")) + writer.uint32(/* id 4, wireType 1 =*/33).double(message.normalizedScore); return writer; }; /** - * Encodes the specified SummarizationConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.verify|verify} messages. + * Encodes the specified QaTagResult message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult * @static - * @param {google.cloud.contactcenterinsights.v1.AnnotatorSelector.ISummarizationConfig} message SummarizationConfig message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.QaScorecardResult.IQaTagResult} message QaTagResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SummarizationConfig.encodeDelimited = function encodeDelimited(message, writer) { + QaTagResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SummarizationConfig message from the specified reader or buffer. + * Decodes a QaTagResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig} SummarizationConfig + * @returns {google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult} QaTagResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SummarizationConfig.decode = function decode(reader, length) { + QaTagResult.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.conversationProfile = reader.string(); + message.tag = reader.string(); break; } case 2: { - message.summarizationModel = reader.int32(); + message.score = reader.double(); + break; + } + case 3: { + message.potentialScore = reader.double(); + break; + } + case 4: { + message.normalizedScore = reader.double(); break; } default: @@ -39723,163 +62201,548 @@ }; /** - * Decodes a SummarizationConfig message from the specified reader or buffer, length delimited. + * Decodes a QaTagResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig} SummarizationConfig + * @returns {google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult} QaTagResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SummarizationConfig.decodeDelimited = function decodeDelimited(reader) { + QaTagResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SummarizationConfig message. + * Verifies a QaTagResult message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SummarizationConfig.verify = function verify(message) { + QaTagResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) { - properties.modelSource = 1; - if (!$util.isString(message.conversationProfile)) - return "conversationProfile: string expected"; + if (message.tag != null && message.hasOwnProperty("tag")) + if (!$util.isString(message.tag)) + return "tag: string expected"; + if (message.score != null && message.hasOwnProperty("score")) { + properties._score = 1; + if (typeof message.score !== "number") + return "score: number expected"; } - if (message.summarizationModel != null && message.hasOwnProperty("summarizationModel")) { - if (properties.modelSource === 1) - return "modelSource: multiple values"; - properties.modelSource = 1; - switch (message.summarizationModel) { + if (message.potentialScore != null && message.hasOwnProperty("potentialScore")) { + properties._potentialScore = 1; + if (typeof message.potentialScore !== "number") + return "potentialScore: number expected"; + } + if (message.normalizedScore != null && message.hasOwnProperty("normalizedScore")) { + properties._normalizedScore = 1; + if (typeof message.normalizedScore !== "number") + return "normalizedScore: number expected"; + } + return null; + }; + + /** + * Creates a QaTagResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult} QaTagResult + */ + QaTagResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult(); + if (object.tag != null) + message.tag = String(object.tag); + if (object.score != null) + message.score = Number(object.score); + if (object.potentialScore != null) + message.potentialScore = Number(object.potentialScore); + if (object.normalizedScore != null) + message.normalizedScore = Number(object.normalizedScore); + return message; + }; + + /** + * Creates a plain object from a QaTagResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult + * @static + * @param {google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult} message QaTagResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QaTagResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.tag = ""; + if (message.tag != null && message.hasOwnProperty("tag")) + object.tag = message.tag; + if (message.score != null && message.hasOwnProperty("score")) { + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (options.oneofs) + object._score = "score"; + } + if (message.potentialScore != null && message.hasOwnProperty("potentialScore")) { + object.potentialScore = options.json && !isFinite(message.potentialScore) ? String(message.potentialScore) : message.potentialScore; + if (options.oneofs) + object._potentialScore = "potentialScore"; + } + if (message.normalizedScore != null && message.hasOwnProperty("normalizedScore")) { + object.normalizedScore = options.json && !isFinite(message.normalizedScore) ? String(message.normalizedScore) : message.normalizedScore; + if (options.oneofs) + object._normalizedScore = "normalizedScore"; + } + return object; + }; + + /** + * Converts this QaTagResult to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult + * @instance + * @returns {Object.} JSON object + */ + QaTagResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QaTagResult + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QaTagResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult"; + }; + + return QaTagResult; + })(); + + QaScorecardResult.ScoreSource = (function() { + + /** + * Properties of a ScoreSource. + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult + * @interface IScoreSource + * @property {google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource.SourceType|null} [sourceType] ScoreSource sourceType + * @property {number|null} [score] ScoreSource score + * @property {number|null} [potentialScore] ScoreSource potentialScore + * @property {number|null} [normalizedScore] ScoreSource normalizedScore + * @property {Array.|null} [qaTagResults] ScoreSource qaTagResults + */ + + /** + * Constructs a new ScoreSource. + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult + * @classdesc Represents a ScoreSource. + * @implements IScoreSource + * @constructor + * @param {google.cloud.contactcenterinsights.v1.QaScorecardResult.IScoreSource=} [properties] Properties to set + */ + function ScoreSource(properties) { + this.qaTagResults = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ScoreSource sourceType. + * @member {google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource.SourceType} sourceType + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource + * @instance + */ + ScoreSource.prototype.sourceType = 0; + + /** + * ScoreSource score. + * @member {number|null|undefined} score + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource + * @instance + */ + ScoreSource.prototype.score = null; + + /** + * ScoreSource potentialScore. + * @member {number|null|undefined} potentialScore + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource + * @instance + */ + ScoreSource.prototype.potentialScore = null; + + /** + * ScoreSource normalizedScore. + * @member {number|null|undefined} normalizedScore + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource + * @instance + */ + ScoreSource.prototype.normalizedScore = null; + + /** + * ScoreSource qaTagResults. + * @member {Array.} qaTagResults + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource + * @instance + */ + ScoreSource.prototype.qaTagResults = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ScoreSource _score. + * @member {"score"|undefined} _score + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource + * @instance + */ + Object.defineProperty(ScoreSource.prototype, "_score", { + get: $util.oneOfGetter($oneOfFields = ["score"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ScoreSource _potentialScore. + * @member {"potentialScore"|undefined} _potentialScore + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource + * @instance + */ + Object.defineProperty(ScoreSource.prototype, "_potentialScore", { + get: $util.oneOfGetter($oneOfFields = ["potentialScore"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ScoreSource _normalizedScore. + * @member {"normalizedScore"|undefined} _normalizedScore + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource + * @instance + */ + Object.defineProperty(ScoreSource.prototype, "_normalizedScore", { + get: $util.oneOfGetter($oneOfFields = ["normalizedScore"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ScoreSource instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource + * @static + * @param {google.cloud.contactcenterinsights.v1.QaScorecardResult.IScoreSource=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource} ScoreSource instance + */ + ScoreSource.create = function create(properties) { + return new ScoreSource(properties); + }; + + /** + * Encodes the specified ScoreSource message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource + * @static + * @param {google.cloud.contactcenterinsights.v1.QaScorecardResult.IScoreSource} message ScoreSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScoreSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sourceType != null && Object.hasOwnProperty.call(message, "sourceType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sourceType); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.score); + if (message.potentialScore != null && Object.hasOwnProperty.call(message, "potentialScore")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.potentialScore); + if (message.normalizedScore != null && Object.hasOwnProperty.call(message, "normalizedScore")) + writer.uint32(/* id 4, wireType 1 =*/33).double(message.normalizedScore); + if (message.qaTagResults != null && message.qaTagResults.length) + for (var i = 0; i < message.qaTagResults.length; ++i) + $root.google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult.encode(message.qaTagResults[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ScoreSource message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource + * @static + * @param {google.cloud.contactcenterinsights.v1.QaScorecardResult.IScoreSource} message ScoreSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScoreSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ScoreSource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource} ScoreSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScoreSource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.sourceType = reader.int32(); + break; + } + case 2: { + message.score = reader.double(); + break; + } + case 3: { + message.potentialScore = reader.double(); + break; + } + case 4: { + message.normalizedScore = reader.double(); + break; + } + case 5: { + if (!(message.qaTagResults && message.qaTagResults.length)) + message.qaTagResults = []; + message.qaTagResults.push($root.google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult.decode(reader, reader.uint32())); + break; + } default: - return "summarizationModel: enum value expected"; + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ScoreSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource} ScoreSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScoreSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ScoreSource message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ScoreSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.sourceType != null && message.hasOwnProperty("sourceType")) + switch (message.sourceType) { + default: + return "sourceType: enum value expected"; case 0: case 1: case 2: break; } + if (message.score != null && message.hasOwnProperty("score")) { + properties._score = 1; + if (typeof message.score !== "number") + return "score: number expected"; + } + if (message.potentialScore != null && message.hasOwnProperty("potentialScore")) { + properties._potentialScore = 1; + if (typeof message.potentialScore !== "number") + return "potentialScore: number expected"; + } + if (message.normalizedScore != null && message.hasOwnProperty("normalizedScore")) { + properties._normalizedScore = 1; + if (typeof message.normalizedScore !== "number") + return "normalizedScore: number expected"; + } + if (message.qaTagResults != null && message.hasOwnProperty("qaTagResults")) { + if (!Array.isArray(message.qaTagResults)) + return "qaTagResults: array expected"; + for (var i = 0; i < message.qaTagResults.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult.verify(message.qaTagResults[i]); + if (error) + return "qaTagResults." + error; + } } return null; }; /** - * Creates a SummarizationConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ScoreSource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig} SummarizationConfig + * @returns {google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource} ScoreSource */ - SummarizationConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig) + ScoreSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig(); - if (object.conversationProfile != null) - message.conversationProfile = String(object.conversationProfile); - switch (object.summarizationModel) { + var message = new $root.google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource(); + switch (object.sourceType) { default: - if (typeof object.summarizationModel === "number") { - message.summarizationModel = object.summarizationModel; + if (typeof object.sourceType === "number") { + message.sourceType = object.sourceType; break; } break; - case "SUMMARIZATION_MODEL_UNSPECIFIED": + case "SOURCE_TYPE_UNSPECIFIED": case 0: - message.summarizationModel = 0; + message.sourceType = 0; break; - case "BASELINE_MODEL": + case "SYSTEM_GENERATED_ONLY": case 1: - message.summarizationModel = 1; + message.sourceType = 1; break; - case "BASELINE_MODEL_V2_0": + case "INCLUDES_MANUAL_EDITS": case 2: - message.summarizationModel = 2; + message.sourceType = 2; break; } + if (object.score != null) + message.score = Number(object.score); + if (object.potentialScore != null) + message.potentialScore = Number(object.potentialScore); + if (object.normalizedScore != null) + message.normalizedScore = Number(object.normalizedScore); + if (object.qaTagResults) { + if (!Array.isArray(object.qaTagResults)) + throw TypeError(".google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource.qaTagResults: array expected"); + message.qaTagResults = []; + for (var i = 0; i < object.qaTagResults.length; ++i) { + if (typeof object.qaTagResults[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource.qaTagResults: object expected"); + message.qaTagResults[i] = $root.google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult.fromObject(object.qaTagResults[i]); + } + } return message; }; /** - * Creates a plain object from a SummarizationConfig message. Also converts values to other types if specified. + * Creates a plain object from a ScoreSource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource * @static - * @param {google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig} message SummarizationConfig + * @param {google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource} message ScoreSource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SummarizationConfig.toObject = function toObject(message, options) { + ScoreSource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) { - object.conversationProfile = message.conversationProfile; + if (options.arrays || options.defaults) + object.qaTagResults = []; + if (options.defaults) + object.sourceType = options.enums === String ? "SOURCE_TYPE_UNSPECIFIED" : 0; + if (message.sourceType != null && message.hasOwnProperty("sourceType")) + object.sourceType = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource.SourceType[message.sourceType] === undefined ? message.sourceType : $root.google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource.SourceType[message.sourceType] : message.sourceType; + if (message.score != null && message.hasOwnProperty("score")) { + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; if (options.oneofs) - object.modelSource = "conversationProfile"; + object._score = "score"; } - if (message.summarizationModel != null && message.hasOwnProperty("summarizationModel")) { - object.summarizationModel = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.SummarizationModel[message.summarizationModel] === undefined ? message.summarizationModel : $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.SummarizationModel[message.summarizationModel] : message.summarizationModel; + if (message.potentialScore != null && message.hasOwnProperty("potentialScore")) { + object.potentialScore = options.json && !isFinite(message.potentialScore) ? String(message.potentialScore) : message.potentialScore; if (options.oneofs) - object.modelSource = "summarizationModel"; + object._potentialScore = "potentialScore"; + } + if (message.normalizedScore != null && message.hasOwnProperty("normalizedScore")) { + object.normalizedScore = options.json && !isFinite(message.normalizedScore) ? String(message.normalizedScore) : message.normalizedScore; + if (options.oneofs) + object._normalizedScore = "normalizedScore"; + } + if (message.qaTagResults && message.qaTagResults.length) { + object.qaTagResults = []; + for (var j = 0; j < message.qaTagResults.length; ++j) + object.qaTagResults[j] = $root.google.cloud.contactcenterinsights.v1.QaScorecardResult.QaTagResult.toObject(message.qaTagResults[j], options); } return object; }; /** - * Converts this SummarizationConfig to JSON. + * Converts this ScoreSource to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource * @instance * @returns {Object.} JSON object */ - SummarizationConfig.prototype.toJSON = function toJSON() { + ScoreSource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SummarizationConfig + * Gets the default type url for ScoreSource * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * @memberof google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SummarizationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ScoreSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource"; }; /** - * SummarizationModel enum. - * @name google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.SummarizationModel + * SourceType enum. + * @name google.cloud.contactcenterinsights.v1.QaScorecardResult.ScoreSource.SourceType * @enum {number} - * @property {number} SUMMARIZATION_MODEL_UNSPECIFIED=0 SUMMARIZATION_MODEL_UNSPECIFIED value - * @property {number} BASELINE_MODEL=1 BASELINE_MODEL value - * @property {number} BASELINE_MODEL_V2_0=2 BASELINE_MODEL_V2_0 value + * @property {number} SOURCE_TYPE_UNSPECIFIED=0 SOURCE_TYPE_UNSPECIFIED value + * @property {number} SYSTEM_GENERATED_ONLY=1 SYSTEM_GENERATED_ONLY value + * @property {number} INCLUDES_MANUAL_EDITS=2 INCLUDES_MANUAL_EDITS value */ - SummarizationConfig.SummarizationModel = (function() { + ScoreSource.SourceType = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SUMMARIZATION_MODEL_UNSPECIFIED"] = 0; - values[valuesById[1] = "BASELINE_MODEL"] = 1; - values[valuesById[2] = "BASELINE_MODEL_V2_0"] = 2; + values[valuesById[0] = "SOURCE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SYSTEM_GENERATED_ONLY"] = 1; + values[valuesById[2] = "INCLUDES_MANUAL_EDITS"] = 2; return values; })(); - return SummarizationConfig; + return ScoreSource; })(); - return AnnotatorSelector; + return QaScorecardResult; })(); return v1; @@ -61070,6 +83933,255 @@ return rpc; })(); + google.type = (function() { + + /** + * Namespace type. + * @memberof google + * @namespace + */ + var type = {}; + + type.Interval = (function() { + + /** + * Properties of an Interval. + * @memberof google.type + * @interface IInterval + * @property {google.protobuf.ITimestamp|null} [startTime] Interval startTime + * @property {google.protobuf.ITimestamp|null} [endTime] Interval endTime + */ + + /** + * Constructs a new Interval. + * @memberof google.type + * @classdesc Represents an Interval. + * @implements IInterval + * @constructor + * @param {google.type.IInterval=} [properties] Properties to set + */ + function Interval(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Interval startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.type.Interval + * @instance + */ + Interval.prototype.startTime = null; + + /** + * Interval endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.type.Interval + * @instance + */ + Interval.prototype.endTime = null; + + /** + * Creates a new Interval instance using the specified properties. + * @function create + * @memberof google.type.Interval + * @static + * @param {google.type.IInterval=} [properties] Properties to set + * @returns {google.type.Interval} Interval instance + */ + Interval.create = function create(properties) { + return new Interval(properties); + }; + + /** + * Encodes the specified Interval message. Does not implicitly {@link google.type.Interval.verify|verify} messages. + * @function encode + * @memberof google.type.Interval + * @static + * @param {google.type.IInterval} message Interval message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Interval.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Interval message, length delimited. Does not implicitly {@link google.type.Interval.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.Interval + * @static + * @param {google.type.IInterval} message Interval message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Interval.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Interval message from the specified reader or buffer. + * @function decode + * @memberof google.type.Interval + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.Interval} Interval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Interval.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Interval(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Interval message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.Interval + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.Interval} Interval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Interval.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Interval message. + * @function verify + * @memberof google.type.Interval + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Interval.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + return null; + }; + + /** + * Creates an Interval message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.Interval + * @static + * @param {Object.} object Plain object + * @returns {google.type.Interval} Interval + */ + Interval.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.Interval) + return object; + var message = new $root.google.type.Interval(); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.type.Interval.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.type.Interval.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + return message; + }; + + /** + * Creates a plain object from an Interval message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.Interval + * @static + * @param {google.type.Interval} message Interval + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Interval.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startTime = null; + object.endTime = null; + } + 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 Interval to JSON. + * @function toJSON + * @memberof google.type.Interval + * @instance + * @returns {Object.} JSON object + */ + Interval.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Interval + * @function getTypeUrl + * @memberof google.type.Interval + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Interval.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.Interval"; + }; + + return Interval; + })(); + + return type; + })(); + return google; })(); diff --git a/packages/google-cloud-contactcenterinsights/protos/protos.json b/packages/google-cloud-contactcenterinsights/protos/protos.json index 38487ee46f5..28e3c6c4099 100644 --- a/packages/google-cloud-contactcenterinsights/protos/protos.json +++ b/packages/google-cloud-contactcenterinsights/protos/protos.json @@ -804,6 +804,100 @@ } ] }, + "CreateAnalysisRule": { + "requestType": "CreateAnalysisRuleRequest", + "responseType": "AnalysisRule", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/analysisRules", + "(google.api.http).body": "analysis_rule", + "(google.api.method_signature)": "parent,analysis_rule" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/analysisRules", + "body": "analysis_rule" + } + }, + { + "(google.api.method_signature)": "parent,analysis_rule" + } + ] + }, + "GetAnalysisRule": { + "requestType": "GetAnalysisRuleRequest", + "responseType": "AnalysisRule", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/analysisRules/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/analysisRules/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListAnalysisRules": { + "requestType": "ListAnalysisRulesRequest", + "responseType": "ListAnalysisRulesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/analysisRules", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/analysisRules" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "UpdateAnalysisRule": { + "requestType": "UpdateAnalysisRuleRequest", + "responseType": "AnalysisRule", + "options": { + "(google.api.http).patch": "/v1/{analysis_rule.name=projects/*/locations/*/analysisRules/*}", + "(google.api.http).body": "analysis_rule", + "(google.api.method_signature)": "analysis_rule,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{analysis_rule.name=projects/*/locations/*/analysisRules/*}", + "body": "analysis_rule" + } + }, + { + "(google.api.method_signature)": "analysis_rule,update_mask" + } + ] + }, + "DeleteAnalysisRule": { + "requestType": "DeleteAnalysisRuleRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/analysisRules/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/analysisRules/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, "GetEncryptionSpec": { "requestType": "GetEncryptionSpecRequest", "responseType": "EncryptionSpec", @@ -943,161 +1037,1895 @@ "(google.api.method_signature)": "name" } ] - } - } - }, - "ConversationView": { - "values": { - "CONVERSATION_VIEW_UNSPECIFIED": 0, - "FULL": 2, - "BASIC": 1 - } - }, - "CalculateStatsRequest": { - "fields": { - "location": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "filter": { - "type": "string", - "id": 2 - } - } - }, - "CalculateStatsResponse": { - "fields": { - "averageDuration": { - "type": "google.protobuf.Duration", - "id": 1 - }, - "averageTurnCount": { - "type": "int32", - "id": 2 - }, - "conversationCount": { - "type": "int32", - "id": 3 - }, - "smartHighlighterMatches": { - "keyType": "string", - "type": "int32", - "id": 4 - }, - "customHighlighterMatches": { - "keyType": "string", - "type": "int32", - "id": 5 }, - "issueMatches": { - "keyType": "string", - "type": "int32", - "id": 6, + "QueryMetrics": { + "requestType": "QueryMetricsRequest", + "responseType": "google.longrunning.Operation", "options": { - "deprecated": true - } - }, - "issueMatchesStats": { - "keyType": "string", - "type": "IssueModelLabelStats.IssueStats", - "id": 8 - }, - "conversationCountTimeSeries": { - "type": "TimeSeries", - "id": 7 - } - }, - "nested": { - "TimeSeries": { - "fields": { - "intervalDuration": { - "type": "google.protobuf.Duration", - "id": 1 + "(google.api.http).post": "/v1/{location=projects/*/locations/*}:queryMetrics", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "QueryMetricsResponse", + "(google.longrunning.operation_info).metadata_type": "QueryMetricsMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{location=projects/*/locations/*}:queryMetrics", + "body": "*" + } }, - "points": { - "rule": "repeated", - "type": "Interval", - "id": 2 + { + "(google.longrunning.operation_info)": { + "response_type": "QueryMetricsResponse", + "metadata_type": "QueryMetricsMetadata" + } } + ] + }, + "CreateQaQuestion": { + "requestType": "CreateQaQuestionRequest", + "responseType": "QaQuestion", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/qaScorecards/*/revisions/*}/qaQuestions", + "(google.api.http).body": "qa_question", + "(google.api.method_signature)": "parent,qa_question, qa_question_id" }, - "nested": { - "Interval": { - "fields": { - "startTime": { - "type": "google.protobuf.Timestamp", - "id": 1 - }, - "conversationCount": { - "type": "int32", - "id": 2 - } + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/qaScorecards/*/revisions/*}/qaQuestions", + "body": "qa_question" } + }, + { + "(google.api.method_signature)": "parent,qa_question, qa_question_id" } - } - } - } - }, - "CreateAnalysisOperationMetadata": { - "fields": { - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + ] }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 2, + "GetQaQuestion": { + "requestType": "GetQaQuestionRequest", + "responseType": "QaQuestion", "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "(google.api.http).get": "/v1/{name=projects/*/locations/*/qaScorecards/*/revisions/*/qaQuestions/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/qaScorecards/*/revisions/*/qaQuestions/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, - "conversation": { - "type": "string", - "id": 3, + "UpdateQaQuestion": { + "requestType": "UpdateQaQuestionRequest", + "responseType": "QaQuestion", "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/Conversation" - } + "(google.api.http).patch": "/v1/{qa_question.name=projects/*/locations/*/qaScorecards/*/revisions/*/qaQuestions/*}", + "(google.api.http).body": "qa_question", + "(google.api.method_signature)": "qa_question,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{qa_question.name=projects/*/locations/*/qaScorecards/*/revisions/*/qaQuestions/*}", + "body": "qa_question" + } + }, + { + "(google.api.method_signature)": "qa_question,update_mask" + } + ] }, - "annotatorSelector": { - "type": "AnnotatorSelector", - "id": 4, + "DeleteQaQuestion": { + "requestType": "DeleteQaQuestionRequest", + "responseType": "google.protobuf.Empty", "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "CreateConversationRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/qaScorecards/*/revisions/*/qaQuestions/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/qaScorecards/*/revisions/*/qaQuestions/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListQaQuestions": { + "requestType": "ListQaQuestionsRequest", + "responseType": "ListQaQuestionsResponse", "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/qaScorecards/*/revisions/*}/qaQuestions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/qaScorecards/*/revisions/*}/qaQuestions" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, - "conversation": { - "type": "Conversation", - "id": 2, + "CreateQaScorecard": { + "requestType": "CreateQaScorecardRequest", + "responseType": "QaScorecard", "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/qaScorecards", + "(google.api.http).body": "qa_scorecard", + "(google.api.method_signature)": "parent,qa_scorecard,qa_scorecard_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/qaScorecards", + "body": "qa_scorecard" + } + }, + { + "(google.api.method_signature)": "parent,qa_scorecard,qa_scorecard_id" + } + ] + }, + "GetQaScorecard": { + "requestType": "GetQaScorecardRequest", + "responseType": "QaScorecard", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/qaScorecards/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/qaScorecards/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateQaScorecard": { + "requestType": "UpdateQaScorecardRequest", + "responseType": "QaScorecard", + "options": { + "(google.api.http).patch": "/v1/{qa_scorecard.name=projects/*/locations/*/qaScorecards/*}", + "(google.api.http).body": "qa_scorecard", + "(google.api.method_signature)": "qa_scorecard,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{qa_scorecard.name=projects/*/locations/*/qaScorecards/*}", + "body": "qa_scorecard" + } + }, + { + "(google.api.method_signature)": "qa_scorecard,update_mask" + } + ] + }, + "DeleteQaScorecard": { + "requestType": "DeleteQaScorecardRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/qaScorecards/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/qaScorecards/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListQaScorecards": { + "requestType": "ListQaScorecardsRequest", + "responseType": "ListQaScorecardsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/qaScorecards", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/qaScorecards" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateQaScorecardRevision": { + "requestType": "CreateQaScorecardRevisionRequest", + "responseType": "QaScorecardRevision", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/qaScorecards/*}/revisions", + "(google.api.http).body": "qa_scorecard_revision", + "(google.api.method_signature)": "parent,qa_scorecard_revision,qa_scorecard_revision_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/qaScorecards/*}/revisions", + "body": "qa_scorecard_revision" + } + }, + { + "(google.api.method_signature)": "parent,qa_scorecard_revision,qa_scorecard_revision_id" + } + ] + }, + "GetQaScorecardRevision": { + "requestType": "GetQaScorecardRevisionRequest", + "responseType": "QaScorecardRevision", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/qaScorecards/*/revisions/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/qaScorecards/*/revisions/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "TuneQaScorecardRevision": { + "requestType": "TuneQaScorecardRevisionRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/qaScorecards/*/revisions/*}:tuneQaScorecardRevision", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,filter,validate_only", + "(google.longrunning.operation_info).response_type": "TuneQaScorecardRevisionResponse", + "(google.longrunning.operation_info).metadata_type": "TuneQaScorecardRevisionMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/qaScorecards/*/revisions/*}:tuneQaScorecardRevision", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,filter,validate_only" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "TuneQaScorecardRevisionResponse", + "metadata_type": "TuneQaScorecardRevisionMetadata" + } + } + ] + }, + "DeployQaScorecardRevision": { + "requestType": "DeployQaScorecardRevisionRequest", + "responseType": "QaScorecardRevision", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/qaScorecards/*/revisions/*}:deploy", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/qaScorecards/*/revisions/*}:deploy", + "body": "*" + } + } + ] + }, + "UndeployQaScorecardRevision": { + "requestType": "UndeployQaScorecardRevisionRequest", + "responseType": "QaScorecardRevision", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/qaScorecards/*/revisions/*}:undeploy", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/qaScorecards/*/revisions/*}:undeploy", + "body": "*" + } + } + ] + }, + "DeleteQaScorecardRevision": { + "requestType": "DeleteQaScorecardRevisionRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/qaScorecards/*/revisions/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/qaScorecards/*/revisions/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListQaScorecardRevisions": { + "requestType": "ListQaScorecardRevisionsRequest", + "responseType": "ListQaScorecardRevisionsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/qaScorecards/*}/revisions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/qaScorecards/*}/revisions" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateFeedbackLabel": { + "requestType": "CreateFeedbackLabelRequest", + "responseType": "FeedbackLabel", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/conversations/*}/feedbackLabels", + "(google.api.http).body": "feedback_label", + "(google.api.method_signature)": "parent,feedback_label,feedback_label_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/conversations/*}/feedbackLabels", + "body": "feedback_label" + } + }, + { + "(google.api.method_signature)": "parent,feedback_label,feedback_label_id" + } + ] + }, + "ListFeedbackLabels": { + "requestType": "ListFeedbackLabelsRequest", + "responseType": "ListFeedbackLabelsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/conversations/*}/feedbackLabels", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/conversations/*}/feedbackLabels" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetFeedbackLabel": { + "requestType": "GetFeedbackLabelRequest", + "responseType": "FeedbackLabel", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/conversations/*/feedbackLabels/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/conversations/*/feedbackLabels/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateFeedbackLabel": { + "requestType": "UpdateFeedbackLabelRequest", + "responseType": "FeedbackLabel", + "options": { + "(google.api.http).patch": "/v1/{feedback_label.name=projects/*/locations/*/conversations/*/feedbackLabels/*}", + "(google.api.http).body": "feedback_label", + "(google.api.method_signature)": "feedback_label,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{feedback_label.name=projects/*/locations/*/conversations/*/feedbackLabels/*}", + "body": "feedback_label" + } + }, + { + "(google.api.method_signature)": "feedback_label,update_mask" + } + ] + }, + "DeleteFeedbackLabel": { + "requestType": "DeleteFeedbackLabelRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/conversations/*/feedbackLabels/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/conversations/*/feedbackLabels/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListAllFeedbackLabels": { + "requestType": "ListAllFeedbackLabelsRequest", + "responseType": "ListAllFeedbackLabelsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}:listAllFeedbackLabels", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}:listAllFeedbackLabels" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "BulkUploadFeedbackLabels": { + "requestType": "BulkUploadFeedbackLabelsRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}:bulkUploadFeedbackLabels", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent", + "(google.longrunning.operation_info).response_type": "BulkUploadFeedbackLabelsResponse", + "(google.longrunning.operation_info).metadata_type": "BulkUploadFeedbackLabelsMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}:bulkUploadFeedbackLabels", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "BulkUploadFeedbackLabelsResponse", + "metadata_type": "BulkUploadFeedbackLabelsMetadata" + } + } + ] + }, + "BulkDownloadFeedbackLabels": { + "requestType": "BulkDownloadFeedbackLabelsRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}:bulkDownloadFeedbackLabels", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent", + "(google.longrunning.operation_info).response_type": "BulkDownloadFeedbackLabelsResponse", + "(google.longrunning.operation_info).metadata_type": "BulkDownloadFeedbackLabelsMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}:bulkDownloadFeedbackLabels", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "BulkDownloadFeedbackLabelsResponse", + "metadata_type": "BulkDownloadFeedbackLabelsMetadata" + } + } + ] + } + } + }, + "ConversationView": { + "values": { + "CONVERSATION_VIEW_UNSPECIFIED": 0, + "FULL": 2, + "BASIC": 1 + } + }, + "CalculateStatsRequest": { + "fields": { + "location": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "filter": { + "type": "string", + "id": 2 + } + } + }, + "CalculateStatsResponse": { + "fields": { + "averageDuration": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "averageTurnCount": { + "type": "int32", + "id": 2 + }, + "conversationCount": { + "type": "int32", + "id": 3 + }, + "smartHighlighterMatches": { + "keyType": "string", + "type": "int32", + "id": 4 + }, + "customHighlighterMatches": { + "keyType": "string", + "type": "int32", + "id": 5 + }, + "issueMatches": { + "keyType": "string", + "type": "int32", + "id": 6, + "options": { + "deprecated": true + } + }, + "issueMatchesStats": { + "keyType": "string", + "type": "IssueModelLabelStats.IssueStats", + "id": 8 + }, + "conversationCountTimeSeries": { + "type": "TimeSeries", + "id": 7 + } + }, + "nested": { + "TimeSeries": { + "fields": { + "intervalDuration": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "points": { + "rule": "repeated", + "type": "Interval", + "id": 2 + } + }, + "nested": { + "Interval": { + "fields": { + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "conversationCount": { + "type": "int32", + "id": 2 + } + } + } + } + } + } + }, + "CreateAnalysisOperationMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "conversation": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/Conversation" + } + }, + "annotatorSelector": { + "type": "AnnotatorSelector", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "CreateConversationRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "conversation": { + "type": "Conversation", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "conversationId": { + "type": "string", + "id": 3 + } + } + }, + "UploadConversationRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "conversation": { + "type": "Conversation", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "conversationId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "redactionConfig": { + "type": "RedactionConfig", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "speechConfig": { + "type": "SpeechConfig", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UploadConversationMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "request": { + "type": "UploadConversationRequest", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "analysisOperation": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "appliedRedactionConfig": { + "type": "RedactionConfig", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ListConversationsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + }, + "orderBy": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "view": { + "type": "ConversationView", + "id": 5 + } + } + }, + "ListConversationsResponse": { + "fields": { + "conversations": { + "rule": "repeated", + "type": "Conversation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetConversationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/Conversation" + } + }, + "view": { + "type": "ConversationView", + "id": 2 + } + } + }, + "UpdateConversationRequest": { + "fields": { + "conversation": { + "type": "Conversation", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } + }, + "DeleteConversationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/Conversation" + } + }, + "force": { + "type": "bool", + "id": 2 + } + } + }, + "IngestConversationsRequest": { + "oneofs": { + "source": { + "oneof": [ + "gcsSource" + ] + }, + "objectConfig": { + "oneof": [ + "transcriptObjectConfig" + ] + }, + "_sampleSize": { + "oneof": [ + "sampleSize" + ] + } + }, + "fields": { + "gcsSource": { + "type": "GcsSource", + "id": 2 + }, + "transcriptObjectConfig": { + "type": "TranscriptObjectConfig", + "id": 3 + }, + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "conversationConfig": { + "type": "ConversationConfig", + "id": 4 + }, + "redactionConfig": { + "type": "RedactionConfig", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "speechConfig": { + "type": "SpeechConfig", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "sampleSize": { + "type": "int32", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "GcsSource": { + "oneofs": { + "_metadataBucketUri": { + "oneof": [ + "metadataBucketUri" + ] + } + }, + "fields": { + "bucketUri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "bucketObjectType": { + "type": "BucketObjectType", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "metadataBucketUri": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "customMetadataKeys": { + "rule": "repeated", + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "BucketObjectType": { + "values": { + "BUCKET_OBJECT_TYPE_UNSPECIFIED": 0, + "TRANSCRIPT": 1, + "AUDIO": 2 + } + } + } + }, + "TranscriptObjectConfig": { + "fields": { + "medium": { + "type": "Conversation.Medium", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ConversationConfig": { + "fields": { + "agentId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "agentChannel": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "customerChannel": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "IngestConversationsMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "request": { + "type": "IngestConversationsRequest", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "partialErrors": { + "rule": "repeated", + "type": "google.rpc.Status", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "ingestConversationsStats": { + "type": "IngestConversationsStats", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "IngestConversationsStats": { + "fields": { + "processedObjectCount": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "duplicatesSkippedCount": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "successfulIngestCount": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "failedIngestCount": { + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + } + } + }, + "IngestConversationsResponse": { + "fields": {} + }, + "CreateAnalysisRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/Conversation" + } + }, + "analysis": { + "type": "Analysis", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ListAnalysesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/Conversation" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + } + } + }, + "ListAnalysesResponse": { + "fields": { + "analyses": { + "rule": "repeated", + "type": "Analysis", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetAnalysisRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/Analysis" + } + } + } + }, + "DeleteAnalysisRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/Analysis" + } + } + } + }, + "BulkAnalyzeConversationsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "filter": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "analysisPercentage": { + "type": "float", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "annotatorSelector": { + "type": "AnnotatorSelector", + "id": 8 + } + } + }, + "BulkAnalyzeConversationsMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "request": { + "type": "BulkAnalyzeConversationsRequest", + "id": 3 + }, + "completedAnalysesCount": { + "type": "int32", + "id": 4 + }, + "failedAnalysesCount": { + "type": "int32", + "id": 5 + }, + "totalRequestedAnalysesCount": { + "type": "int32", + "id": 6 + }, + "partialErrors": { + "rule": "repeated", + "type": "google.rpc.Status", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "BulkAnalyzeConversationsResponse": { + "fields": { + "successfulAnalysisCount": { + "type": "int32", + "id": 1 + }, + "failedAnalysisCount": { + "type": "int32", + "id": 2 + } + } + }, + "BulkDeleteConversationsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "filter": { + "type": "string", + "id": 2 + }, + "maxDeleteCount": { + "type": "int32", + "id": 3 + }, + "force": { + "type": "bool", + "id": 4 + } + } + }, + "BulkDeleteConversationsMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "request": { + "type": "BulkDeleteConversationsRequest", + "id": 3 + }, + "partialErrors": { + "rule": "repeated", + "type": "google.rpc.Status", + "id": 4 + } + } + }, + "BulkDeleteConversationsResponse": { + "fields": {} + }, + "ExportInsightsDataRequest": { + "oneofs": { + "destination": { + "oneof": [ + "bigQueryDestination" + ] + } + }, + "fields": { + "bigQueryDestination": { + "type": "BigQueryDestination", + "id": 2 + }, + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "filter": { + "type": "string", + "id": 3 + }, + "kmsKey": { + "type": "string", + "id": 4 + }, + "writeDisposition": { + "type": "WriteDisposition", + "id": 5 + } + }, + "nested": { + "BigQueryDestination": { + "fields": { + "projectId": { + "type": "string", + "id": 3 + }, + "dataset": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "table": { + "type": "string", + "id": 2 + } + } + }, + "WriteDisposition": { + "values": { + "WRITE_DISPOSITION_UNSPECIFIED": 0, + "WRITE_TRUNCATE": 1, + "WRITE_APPEND": 2 + } + } + } + }, + "ExportInsightsDataMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "request": { + "type": "ExportInsightsDataRequest", + "id": 3 + }, + "partialErrors": { + "rule": "repeated", + "type": "google.rpc.Status", + "id": 4 + } + } + }, + "ExportInsightsDataResponse": { + "fields": {} + }, + "CreateIssueModelRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "issueModel": { + "type": "IssueModel", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CreateIssueModelMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "request": { + "type": "CreateIssueModelRequest", + "id": 3 + } + } + }, + "UpdateIssueModelRequest": { + "fields": { + "issueModel": { + "type": "IssueModel", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } + }, + "ListIssueModelsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + } + } + }, + "ListIssueModelsResponse": { + "fields": { + "issueModels": { + "rule": "repeated", + "type": "IssueModel", + "id": 1 + } + } + }, + "GetIssueModelRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/IssueModel" + } + } + } + }, + "DeleteIssueModelRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/IssueModel" + } + } + } + }, + "DeleteIssueModelMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "request": { + "type": "DeleteIssueModelRequest", + "id": 3 + } + } + }, + "DeployIssueModelRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/IssueModel" + } + } + } + }, + "DeployIssueModelResponse": { + "fields": {} + }, + "DeployIssueModelMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "request": { + "type": "DeployIssueModelRequest", + "id": 3 + } + } + }, + "UndeployIssueModelRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/IssueModel" + } + } + } + }, + "UndeployIssueModelResponse": { + "fields": {} + }, + "UndeployIssueModelMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "request": { + "type": "UndeployIssueModelRequest", + "id": 3 + } + } + }, + "ExportIssueModelRequest": { + "oneofs": { + "Destination": { + "oneof": [ + "gcsDestination" + ] + } + }, + "fields": { + "gcsDestination": { + "type": "GcsDestination", + "id": 2 + }, + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/IssueModel" + } + } + }, + "nested": { + "GcsDestination": { + "fields": { + "objectUri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "ExportIssueModelResponse": { + "fields": {} + }, + "ExportIssueModelMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "request": { + "type": "ExportIssueModelRequest", + "id": 3 + } + } + }, + "ImportIssueModelRequest": { + "oneofs": { + "Source": { + "oneof": [ + "gcsSource" + ] + } + }, + "fields": { + "gcsSource": { + "type": "GcsSource", + "id": 2 + }, + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "createNewModel": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "GcsSource": { + "fields": { + "objectUri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "ImportIssueModelResponse": { + "fields": {} + }, + "ImportIssueModelMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "request": { + "type": "ImportIssueModelRequest", + "id": 3 + } + } + }, + "GetIssueRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/Issue" + } + } + } + }, + "ListIssuesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/IssueModel" + } + } + } + }, + "ListIssuesResponse": { + "fields": { + "issues": { + "rule": "repeated", + "type": "Issue", + "id": 1 + } + } + }, + "UpdateIssueRequest": { + "fields": { + "issue": { + "type": "Issue", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } + }, + "DeleteIssueRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/Issue" + } + } + } + }, + "CalculateIssueModelStatsRequest": { + "fields": { + "issueModel": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/IssueModel" + } + } + } + }, + "CalculateIssueModelStatsResponse": { + "fields": { + "currentStats": { + "type": "IssueModelLabelStats", + "id": 4 + } + } + }, + "CreatePhraseMatcherRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "phraseMatcher": { + "type": "PhraseMatcher", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ListPhraseMatchersRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + } + } + }, + "ListPhraseMatchersResponse": { + "fields": { + "phraseMatchers": { + "rule": "repeated", + "type": "PhraseMatcher", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetPhraseMatcherRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/PhraseMatcher" + } + } + } + }, + "DeletePhraseMatcherRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/PhraseMatcher" + } + } + } + }, + "UpdatePhraseMatcherRequest": { + "fields": { + "phraseMatcher": { + "type": "PhraseMatcher", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" } }, - "conversationId": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } + }, + "GetSettingsRequest": { + "fields": { + "name": { "type": "string", - "id": 3 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/Settings" + } } } }, - "UploadConversationRequest": { + "UpdateSettingsRequest": { + "fields": { + "settings": { + "type": "Settings", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CreateAnalysisRuleRequest": { "fields": { "parent": { "type": "string", @@ -1107,37 +2935,123 @@ "(google.api.resource_reference).type": "locations.googleapis.com/Location" } }, - "conversation": { - "type": "Conversation", + "analysisRule": { + "type": "AnalysisRule", "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" } - }, - "conversationId": { + } + } + }, + "GetAnalysisRuleRequest": { + "fields": { + "name": { "type": "string", - "id": 3, + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/AnalysisRule" + } + } + } + }, + "UpdateAnalysisRuleRequest": { + "fields": { + "analysisRule": { + "type": "AnalysisRule", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, "options": { "(google.api.field_behavior)": "OPTIONAL" } + } + } + }, + "DeleteAnalysisRuleRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/AnalysisRule" + } + } + } + }, + "ListAnalysisRulesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } }, - "redactionConfig": { - "type": "RedactionConfig", - "id": 4, + "pageSize": { + "type": "int32", + "id": 2, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "speechConfig": { - "type": "SpeechConfig", - "id": 11, + "pageToken": { + "type": "string", + "id": 3, "options": { "(google.api.field_behavior)": "OPTIONAL" } } } }, - "UploadConversationMetadata": { + "ListAnalysisRulesResponse": { + "fields": { + "analysisRules": { + "rule": "repeated", + "type": "AnalysisRule", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetEncryptionSpecRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/EncryptionSpec" + } + } + } + }, + "InitializeEncryptionSpecRequest": { + "fields": { + "encryptionSpec": { + "type": "EncryptionSpec", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "InitializeEncryptionSpecResponse": { + "fields": {} + }, + "InitializeEncryptionSpecMetadata": { "fields": { "createTime": { "type": "google.protobuf.Timestamp", @@ -1154,29 +3068,51 @@ } }, "request": { - "type": "UploadConversationRequest", + "type": "InitializeEncryptionSpecRequest", "id": 3, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "analysisOperation": { + "partialErrors": { + "rule": "repeated", + "type": "google.rpc.Status", + "id": 4 + } + } + }, + "CreateViewRequest": { + "fields": { + "parent": { "type": "string", - "id": 4, + "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" } }, - "appliedRedactionConfig": { - "type": "RedactionConfig", - "id": 5, + "view": { + "type": "View", + "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED" } } } }, - "ListConversationsRequest": { + "GetViewRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/View" + } + } + } + }, + "ListViewsRequest": { "fields": { "parent": { "type": "string", @@ -1193,57 +3129,26 @@ "pageToken": { "type": "string", "id": 3 - }, - "filter": { - "type": "string", - "id": 4 - }, - "orderBy": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "view": { - "type": "ConversationView", - "id": 5 } } }, - "ListConversationsResponse": { + "ListViewsResponse": { "fields": { - "conversations": { + "views": { "rule": "repeated", - "type": "Conversation", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetConversationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/Conversation" - } + "type": "View", + "id": 1 }, - "view": { - "type": "ConversationView", + "nextPageToken": { + "type": "string", "id": 2 } } }, - "UpdateConversationRequest": { + "UpdateViewRequest": { "fields": { - "conversation": { - "type": "Conversation", + "view": { + "type": "View", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED" @@ -1255,147 +3160,87 @@ } } }, - "DeleteConversationRequest": { + "DeleteViewRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/Conversation" + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/View" } - }, - "force": { - "type": "bool", - "id": 2 } } }, - "IngestConversationsRequest": { + "Dimension": { "oneofs": { - "source": { - "oneof": [ - "gcsSource" - ] - }, - "objectConfig": { - "oneof": [ - "transcriptObjectConfig" - ] - }, - "_sampleSize": { + "dimensionMetadata": { "oneof": [ - "sampleSize" + "issueDimensionMetadata", + "agentDimensionMetadata", + "qaQuestionDimensionMetadata", + "qaQuestionAnswerDimensionMetadata" ] } }, "fields": { - "gcsSource": { - "type": "GcsSource", - "id": 2 - }, - "transcriptObjectConfig": { - "type": "TranscriptObjectConfig", - "id": 3 - }, - "parent": { - "type": "string", - "id": 1, + "issueDimensionMetadata": { + "type": "IssueDimensionMetadata", + "id": 2, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "conversationConfig": { - "type": "ConversationConfig", - "id": 4 - }, - "redactionConfig": { - "type": "RedactionConfig", - "id": 5, + "agentDimensionMetadata": { + "type": "AgentDimensionMetadata", + "id": 3, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "speechConfig": { - "type": "SpeechConfig", - "id": 6, + "qaQuestionDimensionMetadata": { + "type": "QaQuestionDimensionMetadata", + "id": 4, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "sampleSize": { - "type": "int32", - "id": 7, + "qaQuestionAnswerDimensionMetadata": { + "type": "QaQuestionAnswerDimensionMetadata", + "id": 5, "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true + "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "dimensionKey": { + "type": "DimensionKey", + "id": 1 } }, "nested": { - "GcsSource": { - "oneofs": { - "_metadataBucketUri": { - "oneof": [ - "metadataBucketUri" - ] - } - }, + "IssueDimensionMetadata": { "fields": { - "bucketUri": { + "issueId": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "bucketObjectType": { - "type": "BucketObjectType", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/Issue" } }, - "metadataBucketUri": { + "issueDisplayName": { "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } + "id": 2 }, - "customMetadataKeys": { - "rule": "repeated", + "issueModelId": { "type": "string", - "id": 12, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "BucketObjectType": { - "values": { - "BUCKET_OBJECT_TYPE_UNSPECIFIED": 0, - "TRANSCRIPT": 1, - "AUDIO": 2 - } - } - } - }, - "TranscriptObjectConfig": { - "fields": { - "medium": { - "type": "Conversation.Medium", - "id": 1, + "id": 3, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/IssueModel" } } } }, - "ConversationConfig": { + "AgentDimensionMetadata": { "fields": { "agentId": { "type": "string", @@ -1404,184 +3249,95 @@ "(google.api.field_behavior)": "OPTIONAL" } }, - "agentChannel": { - "type": "int32", + "agentDisplayName": { + "type": "string", "id": 2, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "customerChannel": { - "type": "int32", + "agentTeam": { + "type": "string", "id": 3, "options": { "(google.api.field_behavior)": "OPTIONAL" } } } - } - } - }, - "IngestConversationsMetadata": { - "fields": { - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "request": { - "type": "IngestConversationsRequest", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "partialErrors": { - "rule": "repeated", - "type": "google.rpc.Status", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } }, - "ingestConversationsStats": { - "type": "IngestConversationsStats", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "IngestConversationsStats": { + "QaQuestionDimensionMetadata": { "fields": { - "processedObjectCount": { - "type": "int32", + "qaScorecardId": { + "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "duplicatesSkippedCount": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "successfulIngestCount": { - "type": "int32", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "failedIngestCount": { - "type": "int32", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - } - } - }, - "IngestConversationsResponse": { - "fields": {} - }, - "CreateAnalysisRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/Conversation" - } - }, - "analysis": { - "type": "Analysis", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ListAnalysesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/Conversation" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "filter": { - "type": "string", - "id": 4 - } - } - }, - "ListAnalysesResponse": { - "fields": { - "analyses": { - "rule": "repeated", - "type": "Analysis", - "id": 1 + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "qaQuestionId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "questionBody": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetAnalysisRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/Analysis" + "QaQuestionAnswerDimensionMetadata": { + "fields": { + "qaScorecardId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "qaQuestionId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "questionBody": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "answerValue": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } } - } - } - }, - "DeleteAnalysisRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/Analysis" + }, + "DimensionKey": { + "values": { + "DIMENSION_KEY_UNSPECIFIED": 0, + "ISSUE": 1, + "AGENT": 2, + "AGENT_TEAM": 3, + "QA_QUESTION_ID": 4, + "QA_QUESTION_ANSWER_VALUE": 5, + "CONVERSATION_PROFILE_ID": 6 } } } }, - "BulkAnalyzeConversationsRequest": { + "QueryMetricsRequest": { "fields": { - "parent": { + "location": { "type": "string", "id": 1, "options": { @@ -1596,129 +3352,44 @@ "(google.api.field_behavior)": "REQUIRED" } }, - "analysisPercentage": { - "type": "float", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "annotatorSelector": { - "type": "AnnotatorSelector", - "id": 8 - } - } - }, - "BulkAnalyzeConversationsMetadata": { - "fields": { - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 1 - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 2 - }, - "request": { - "type": "BulkAnalyzeConversationsRequest", + "timeGranularity": { + "type": "TimeGranularity", "id": 3 }, - "completedAnalysesCount": { - "type": "int32", + "dimensions": { + "rule": "repeated", + "type": "Dimension", "id": 4 }, - "failedAnalysesCount": { - "type": "int32", + "measureMask": { + "type": "google.protobuf.FieldMask", "id": 5 - }, - "totalRequestedAnalysesCount": { - "type": "int32", - "id": 6 - }, - "partialErrors": { - "rule": "repeated", - "type": "google.rpc.Status", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "BulkAnalyzeConversationsResponse": { - "fields": { - "successfulAnalysisCount": { - "type": "int32", - "id": 1 - }, - "failedAnalysisCount": { - "type": "int32", - "id": 2 } - } - }, - "BulkDeleteConversationsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" + }, + "nested": { + "TimeGranularity": { + "values": { + "TIME_GRANULARITY_UNSPECIFIED": 0, + "NONE": 1, + "DAILY": 2, + "HOURLY": 3, + "PER_MINUTE": 4, + "PER_5_MINUTES": 5, + "MONTHLY": 6 } - }, - "filter": { - "type": "string", - "id": 2 - }, - "maxDeleteCount": { - "type": "int32", - "id": 3 - }, - "force": { - "type": "bool", - "id": 4 - } - } - }, - "BulkDeleteConversationsMetadata": { - "fields": { - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 1 - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 2 - }, - "request": { - "type": "BulkDeleteConversationsRequest", - "id": 3 - }, - "partialErrors": { - "rule": "repeated", - "type": "google.rpc.Status", - "id": 4 } } }, - "BulkDeleteConversationsResponse": { - "fields": {} - }, - "ExportInsightsDataRequest": { + "QueryMetricsResponse": { "oneofs": { - "destination": { + "_macroAverageSlice": { "oneof": [ - "bigQueryDestination" + "macroAverageSlice" ] } }, "fields": { - "bigQueryDestination": { - "type": "BigQueryDestination", - "id": 2 - }, - "parent": { + "location": { "type": "string", "id": 1, "options": { @@ -1726,123 +3397,292 @@ "(google.api.resource_reference).type": "locations.googleapis.com/Location" } }, - "filter": { - "type": "string", + "updateTime": { + "type": "google.protobuf.Timestamp", "id": 3 }, - "kmsKey": { - "type": "string", - "id": 4 + "slices": { + "rule": "repeated", + "type": "Slice", + "id": 2 }, - "writeDisposition": { - "type": "WriteDisposition", - "id": 5 + "macroAverageSlice": { + "type": "Slice", + "id": 4, + "options": { + "proto3_optional": true + } } }, "nested": { - "BigQueryDestination": { + "Slice": { "fields": { - "projectId": { - "type": "string", + "dimensions": { + "rule": "repeated", + "type": "Dimension", + "id": 1 + }, + "total": { + "type": "DataPoint", + "id": 2 + }, + "timeSeries": { + "type": "TimeSeries", "id": 3 + } + }, + "nested": { + "DataPoint": { + "oneofs": { + "measure": { + "oneof": [ + "conversationMeasure" + ] + } + }, + "fields": { + "conversationMeasure": { + "type": "ConversationMeasure", + "id": 2 + }, + "interval": { + "type": "google.type.Interval", + "id": 1 + } + }, + "nested": { + "ConversationMeasure": { + "oneofs": { + "_conversationCount": { + "oneof": [ + "conversationCount" + ] + }, + "_averageSilencePercentage": { + "oneof": [ + "averageSilencePercentage" + ] + }, + "_averageDuration": { + "oneof": [ + "averageDuration" + ] + }, + "_averageTurnCount": { + "oneof": [ + "averageTurnCount" + ] + }, + "_averageAgentSentimentScore": { + "oneof": [ + "averageAgentSentimentScore" + ] + }, + "_averageClientSentimentScore": { + "oneof": [ + "averageClientSentimentScore" + ] + }, + "_averageCustomerSatisfactionRating": { + "oneof": [ + "averageCustomerSatisfactionRating" + ] + }, + "_averageQaNormalizedScore": { + "oneof": [ + "averageQaNormalizedScore" + ] + }, + "_averageQaQuestionNormalizedScore": { + "oneof": [ + "averageQaQuestionNormalizedScore" + ] + } + }, + "fields": { + "conversationCount": { + "type": "int32", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "averageSilencePercentage": { + "type": "float", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "averageDuration": { + "type": "google.protobuf.Duration", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "averageTurnCount": { + "type": "float", + "id": 4, + "options": { + "proto3_optional": true + } + }, + "averageAgentSentimentScore": { + "type": "float", + "id": 5, + "options": { + "proto3_optional": true + } + }, + "averageClientSentimentScore": { + "type": "float", + "id": 6, + "options": { + "proto3_optional": true + } + }, + "averageCustomerSatisfactionRating": { + "type": "double", + "id": 8, + "options": { + "proto3_optional": true + } + }, + "averageQaNormalizedScore": { + "type": "double", + "id": 7, + "options": { + "proto3_optional": true + } + }, + "qaTagScores": { + "rule": "repeated", + "type": "QaTagScore", + "id": 9 + }, + "averageQaQuestionNormalizedScore": { + "type": "double", + "id": 10, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "QaTagScore": { + "fields": { + "tag": { + "type": "string", + "id": 1 + }, + "averageTagNormalizedScore": { + "type": "double", + "id": 2 + } + } + } + } + } + } }, - "dataset": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" + "TimeSeries": { + "fields": { + "dataPoints": { + "rule": "repeated", + "type": "DataPoint", + "id": 4 + } } - }, - "table": { - "type": "string", - "id": 2 } } - }, - "WriteDisposition": { - "values": { - "WRITE_DISPOSITION_UNSPECIFIED": 0, - "WRITE_TRUNCATE": 1, - "WRITE_APPEND": 2 - } } } }, - "ExportInsightsDataMetadata": { + "QueryMetricsMetadata": { + "fields": {} + }, + "CreateQaQuestionRequest": { "fields": { - "createTime": { - "type": "google.protobuf.Timestamp", + "parent": { + "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/QaScorecardRevision" } }, - "endTime": { - "type": "google.protobuf.Timestamp", + "qaQuestion": { + "type": "QaQuestion", "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED" } }, - "request": { - "type": "ExportInsightsDataRequest", - "id": 3 - }, - "partialErrors": { - "rule": "repeated", - "type": "google.rpc.Status", - "id": 4 + "qaQuestionId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, - "ExportInsightsDataResponse": { - "fields": {} - }, - "CreateIssueModelRequest": { + "GetQaQuestionRequest": { "fields": { - "parent": { + "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "issueModel": { - "type": "IssueModel", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/QaQuestion" } } } }, - "CreateIssueModelMetadata": { + "ListQaQuestionsRequest": { "fields": { - "createTime": { - "type": "google.protobuf.Timestamp", + "parent": { + "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/QaScorecardRevision" } }, - "endTime": { - "type": "google.protobuf.Timestamp", + "pageSize": { + "type": "int32", "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL" } }, - "request": { - "type": "CreateIssueModelRequest", - "id": 3 + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, - "UpdateIssueModelRequest": { + "ListQaQuestionsResponse": { "fields": { - "issueModel": { - "type": "IssueModel", + "qaQuestions": { + "rule": "repeated", + "type": "QaQuestion", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "UpdateQaQuestionRequest": { + "fields": { + "qaQuestion": { + "type": "QaQuestion", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED" @@ -1850,396 +3690,459 @@ }, "updateMask": { "type": "google.protobuf.FieldMask", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, - "ListIssueModelsRequest": { + "DeleteQaQuestionRequest": { "fields": { - "parent": { + "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/QaQuestion" } } } }, - "ListIssueModelsResponse": { - "fields": { - "issueModels": { - "rule": "repeated", - "type": "IssueModel", - "id": 1 - } - } - }, - "GetIssueModelRequest": { + "CreateQaScorecardRequest": { "fields": { - "name": { + "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/IssueModel" + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "qaScorecard": { + "type": "QaScorecard", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "qaScorecardId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "DeleteIssueModelRequest": { + "GetQaScorecardRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/IssueModel" + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/QaScorecard" } } } }, - "DeleteIssueModelMetadata": { + "UpdateQaScorecardRequest": { "fields": { - "createTime": { - "type": "google.protobuf.Timestamp", + "qaScorecard": { + "type": "QaScorecard", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED" } }, - "endTime": { - "type": "google.protobuf.Timestamp", + "updateMask": { + "type": "google.protobuf.FieldMask", "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED" } - }, - "request": { - "type": "DeleteIssueModelRequest", - "id": 3 } } }, - "DeployIssueModelRequest": { + "DeleteQaScorecardRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/IssueModel" + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/QaScorecard" + } + }, + "force": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "DeployIssueModelResponse": { - "fields": {} - }, - "DeployIssueModelMetadata": { + "CreateQaScorecardRevisionRequest": { "fields": { - "createTime": { - "type": "google.protobuf.Timestamp", + "parent": { + "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/QaScorecard" } }, - "endTime": { - "type": "google.protobuf.Timestamp", + "qaScorecardRevision": { + "type": "QaScorecardRevision", "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED" } }, - "request": { - "type": "DeployIssueModelRequest", - "id": 3 + "qaScorecardRevisionId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, - "UndeployIssueModelRequest": { + "GetQaScorecardRevisionRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/IssueModel" + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/QaScorecardRevision" } } } }, - "UndeployIssueModelResponse": { - "fields": {} - }, - "UndeployIssueModelMetadata": { + "TuneQaScorecardRevisionRequest": { "fields": { - "createTime": { - "type": "google.protobuf.Timestamp", + "parent": { + "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/QaScorecardRevision" } }, - "endTime": { - "type": "google.protobuf.Timestamp", + "filter": { + "type": "string", "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED" } }, - "request": { - "type": "UndeployIssueModelRequest", - "id": 3 - } - } - }, - "ExportIssueModelRequest": { - "oneofs": { - "Destination": { - "oneof": [ - "gcsDestination" - ] - } - }, - "fields": { - "gcsDestination": { - "type": "GcsDestination", - "id": 2 - }, - "name": { - "type": "string", - "id": 1, + "validateOnly": { + "type": "bool", + "id": 3, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/IssueModel" - } - } - }, - "nested": { - "GcsDestination": { - "fields": { - "objectUri": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "ExportIssueModelResponse": { + "TuneQaScorecardRevisionResponse": { "fields": {} }, - "ExportIssueModelMetadata": { + "TuneQaScorecardRevisionMetadata": { "fields": { "createTime": { "type": "google.protobuf.Timestamp", - "id": 1 - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 2 - }, - "request": { - "type": "ExportIssueModelRequest", - "id": 3 - } - } - }, - "ImportIssueModelRequest": { - "oneofs": { - "Source": { - "oneof": [ - "gcsSource" - ] - } - }, - "fields": { - "gcsSource": { - "type": "GcsSource", - "id": 2 - }, - "parent": { - "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "createNewModel": { - "type": "bool", + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "request": { + "type": "TuneQaScorecardRevisionRequest", "id": 3, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "qaQuestionDatasetValidationResults": { + "rule": "repeated", + "type": "QaQuestionDatasetValidationResult", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "qaQuestionDatasetTuningMetrics": { + "rule": "repeated", + "type": "QaQuestionDatasetTuningMetrics", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "tuningCompletionRatio": { + "type": "double", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" } } }, "nested": { - "GcsSource": { + "QaQuestionDatasetValidationResult": { "fields": { - "objectUri": { + "question": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/QaQuestion" } + }, + "datasetValidationWarnings": { + "rule": "repeated", + "type": "DatasetValidationWarning", + "id": 2 + }, + "validFeedbackLabelsCount": { + "type": "int32", + "id": 3 } } - } - } - }, - "ImportIssueModelResponse": { - "fields": {} - }, - "ImportIssueModelMetadata": { - "fields": { - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 1 - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 2 }, - "request": { - "type": "ImportIssueModelRequest", - "id": 3 + "QaQuestionDatasetTuningMetrics": { + "fields": { + "question": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/QaQuestion" + } + }, + "metrics": { + "type": "Metrics", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Metrics": { + "fields": { + "accuracy": { + "type": "double", + "id": 1 + } + } + } + } } } }, - "GetIssueRequest": { + "DeployQaScorecardRevisionRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/Issue" + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/QaScorecardRevision" } } } }, - "ListIssuesRequest": { + "UndeployQaScorecardRevisionRequest": { "fields": { - "parent": { + "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/IssueModel" + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/QaScorecardRevision" } } } }, - "ListIssuesResponse": { - "fields": { - "issues": { - "rule": "repeated", - "type": "Issue", - "id": 1 - } - } - }, - "UpdateIssueRequest": { + "DeleteQaScorecardRevisionRequest": { "fields": { - "issue": { - "type": "Issue", + "name": { + "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/QaScorecardRevision" } }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2 + "force": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, - "DeleteIssueRequest": { + "ListQaScorecardsRequest": { "fields": { - "name": { + "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/Issue" + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "CalculateIssueModelStatsRequest": { + "ListQaScorecardsResponse": { "fields": { - "issueModel": { + "qaScorecards": { + "rule": "repeated", + "type": "QaScorecard", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ListQaScorecardRevisionsRequest": { + "fields": { + "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/IssueModel" + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/QaScorecard" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "CalculateIssueModelStatsResponse": { + "ListQaScorecardRevisionsResponse": { "fields": { - "currentStats": { - "type": "IssueModelLabelStats", - "id": 4 + "qaScorecardRevisions": { + "rule": "repeated", + "type": "QaScorecardRevision", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 } } }, - "CreatePhraseMatcherRequest": { + "CreateFeedbackLabelRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/Conversation" } }, - "phraseMatcher": { - "type": "PhraseMatcher", + "feedbackLabelId": { + "type": "string", "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "feedbackLabel": { + "type": "FeedbackLabel", + "id": 3, "options": { "(google.api.field_behavior)": "REQUIRED" } } } }, - "ListPhraseMatchersRequest": { + "ListFeedbackLabelsRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/Conversation" + } + }, + "filter": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } }, "pageSize": { "type": "int32", - "id": 2 + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "pageToken": { "type": "string", - "id": 3 - }, - "filter": { - "type": "string", - "id": 4 + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, - "ListPhraseMatchersResponse": { + "ListFeedbackLabelsResponse": { "fields": { - "phraseMatchers": { + "feedbackLabels": { "rule": "repeated", - "type": "PhraseMatcher", + "type": "FeedbackLabel", "id": 1 }, "nextPageToken": { @@ -2248,102 +4151,157 @@ } } }, - "GetPhraseMatcherRequest": { + "GetFeedbackLabelRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/PhraseMatcher" + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/FeedbackLabel" } } } }, - "DeletePhraseMatcherRequest": { + "UpdateFeedbackLabelRequest": { "fields": { - "name": { - "type": "string", + "feedbackLabel": { + "type": "FeedbackLabel", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/PhraseMatcher" + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" } } } }, - "UpdatePhraseMatcherRequest": { + "DeleteFeedbackLabelRequest": { "fields": { - "phraseMatcher": { - "type": "PhraseMatcher", + "name": { + "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/FeedbackLabel" } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2 } } }, - "GetSettingsRequest": { + "ListAllFeedbackLabelsRequest": { "fields": { - "name": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { "type": "string", - "id": 1, + "id": 3, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/Settings" + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "UpdateSettingsRequest": { + "ListAllFeedbackLabelsResponse": { "fields": { - "settings": { - "type": "Settings", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "feedbackLabels": { + "rule": "repeated", + "type": "FeedbackLabel", + "id": 1 }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "nextPageToken": { + "type": "string", + "id": 2 } } }, - "GetEncryptionSpecRequest": { + "BulkUploadFeedbackLabelsRequest": { + "oneofs": { + "source": { + "oneof": [ + "gcsSource" + ] + } + }, "fields": { - "name": { + "gcsSource": { + "type": "GcsSource", + "id": 2 + }, + "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/EncryptionSpec" + "(google.api.resource_reference).type": "locations.googleapis.com/Location" } - } - } - }, - "InitializeEncryptionSpecRequest": { - "fields": { - "encryptionSpec": { - "type": "EncryptionSpec", - "id": 1, + }, + "validateOnly": { + "type": "bool", + "id": 3, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "GcsSource": { + "fields": { + "format": { + "type": "Format", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "objectUri": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "Format": { + "values": { + "FORMAT_UNSPECIFIED": 0, + "CSV": 1, + "JSON": 2 + } + } } } } }, - "InitializeEncryptionSpecResponse": { + "BulkUploadFeedbackLabelsResponse": { "fields": {} }, - "InitializeEncryptionSpecMetadata": { + "BulkUploadFeedbackLabelsMetadata": { "fields": { "createTime": { "type": "google.protobuf.Timestamp", @@ -2360,7 +4318,7 @@ } }, "request": { - "type": "InitializeEncryptionSpecRequest", + "type": "BulkUploadFeedbackLabelsRequest", "id": 3, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" @@ -2370,11 +4328,47 @@ "rule": "repeated", "type": "google.rpc.Status", "id": 4 + }, + "uploadStats": { + "type": "UploadStats", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "UploadStats": { + "fields": { + "processedObjectCount": { + "type": "int32", + "id": 1 + }, + "failedValidationCount": { + "type": "int32", + "id": 2 + }, + "successfulUploadCount": { + "type": "int32", + "id": 3 + } + } } } }, - "CreateViewRequest": { + "BulkDownloadFeedbackLabelsRequest": { + "oneofs": { + "destination": { + "oneof": [ + "gcsDestination" + ] + } + }, "fields": { + "gcsDestination": { + "type": "GcsDestination", + "id": 3 + }, "parent": { "type": "string", "id": 1, @@ -2383,91 +4377,182 @@ "(google.api.resource_reference).type": "locations.googleapis.com/Location" } }, - "view": { - "type": "View", + "filter": { + "type": "string", "id": 2, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } - } - } - }, - "GetViewRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, + }, + "maxDownloadCount": { + "type": "int32", + "id": 4, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/View" + "(google.api.field_behavior)": "OPTIONAL" } - } - } - }, - "ListViewsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, + }, + "feedbackLabelType": { + "type": "FeedbackLabelType", + "id": 5, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" + "(google.api.field_behavior)": "OPTIONAL" } }, - "pageSize": { - "type": "int32", - "id": 2 + "conversationFilter": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, - "pageToken": { + "templateQaScorecardId": { + "rule": "repeated", "type": "string", - "id": 3 + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } - } - }, - "ListViewsResponse": { - "fields": { - "views": { - "rule": "repeated", - "type": "View", - "id": 1 + }, + "nested": { + "GcsDestination": { + "fields": { + "format": { + "type": "Format", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "objectUri": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "addWhitespace": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "alwaysPrintEmptyFields": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "recordsPerFileCount": { + "type": "int64", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Format": { + "values": { + "FORMAT_UNSPECIFIED": 0, + "CSV": 1, + "JSON": 2 + } + } + } }, - "nextPageToken": { - "type": "string", - "id": 2 + "FeedbackLabelType": { + "values": { + "FEEDBACK_LABEL_TYPE_UNSPECIFIED": 0, + "QUALITY_AI": 1, + "TOPIC_MODELING": 2 + } } } }, - "UpdateViewRequest": { + "BulkDownloadFeedbackLabelsResponse": { + "fields": {} + }, + "BulkDownloadFeedbackLabelsMetadata": { "fields": { - "view": { - "type": "View", + "createTime": { + "type": "google.protobuf.Timestamp", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "request": { + "type": "BulkDownloadFeedbackLabelsRequest", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "partialErrors": { + "rule": "repeated", + "type": "google.rpc.Status", + "id": 4 + }, + "downloadStats": { + "type": "DownloadStats", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "DownloadStats": { + "fields": { + "processedObjectCount": { + "type": "int32", + "id": 1 + }, + "successfulDownloadCount": { + "type": "int32", + "id": 2 + }, + "totalFilesWritten": { + "type": "int32", + "id": 3 + }, + "fileNames": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2 } } }, - "DeleteViewRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/View" - } - } + "DatasetValidationWarning": { + "values": { + "DATASET_VALIDATION_WARNING_UNSPECIFIED": 0, + "TOO_MANY_INVALID_FEEDBACK_LABELS": 1, + "INSUFFICIENT_FEEDBACK_LABELS": 2, + "INSUFFICIENT_FEEDBACK_LABELS_PER_ANSWER": 3, + "ALL_FEEDBACK_LABELS_HAVE_THE_SAME_ANSWER": 4 } }, "Conversation": { "options": { "(google.api.resource).type": "contactcenterinsights.googleapis.com/Conversation", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/conversations/{conversation}" + "(google.api.resource).pattern": "projects/{project}/locations/{location}/conversations/{conversation}", + "(google.api.resource).plural": "conversations", + "(google.api.resource).singular": "conversation" }, "oneofs": { "metadata": { @@ -2761,543 +4846,961 @@ } } }, - "Analysis": { - "options": { - "(google.api.resource).type": "contactcenterinsights.googleapis.com/Analysis", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/conversations/{conversation}/analyses/{analysis}" - }, + "Analysis": { + "options": { + "(google.api.resource).type": "contactcenterinsights.googleapis.com/Analysis", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/conversations/{conversation}/analyses/{analysis}", + "(google.api.resource).plural": "analyses", + "(google.api.resource).singular": "analysis" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "requestTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "analysisResult": { + "type": "AnalysisResult", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "annotatorSelector": { + "type": "AnnotatorSelector", + "id": 8 + } + } + }, + "ConversationDataSource": { + "oneofs": { + "source": { + "oneof": [ + "gcsSource", + "dialogflowSource" + ] + } + }, + "fields": { + "gcsSource": { + "type": "GcsSource", + "id": 1 + }, + "dialogflowSource": { + "type": "DialogflowSource", + "id": 3 + } + } + }, + "GcsSource": { + "fields": { + "audioUri": { + "type": "string", + "id": 1 + }, + "transcriptUri": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + } + }, + "DialogflowSource": { + "fields": { + "dialogflowConversation": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "audioUri": { + "type": "string", + "id": 3 + } + } + }, + "AnalysisResult": { + "oneofs": { + "metadata": { + "oneof": [ + "callAnalysisMetadata" + ] + } + }, + "fields": { + "callAnalysisMetadata": { + "type": "CallAnalysisMetadata", + "id": 2 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + } + }, + "nested": { + "CallAnalysisMetadata": { + "fields": { + "annotations": { + "rule": "repeated", + "type": "CallAnnotation", + "id": 2 + }, + "entities": { + "keyType": "string", + "type": "Entity", + "id": 3 + }, + "sentiments": { + "rule": "repeated", + "type": "ConversationLevelSentiment", + "id": 4 + }, + "silence": { + "type": "ConversationLevelSilence", + "id": 11 + }, + "intents": { + "keyType": "string", + "type": "Intent", + "id": 6 + }, + "phraseMatchers": { + "keyType": "string", + "type": "PhraseMatchData", + "id": 7 + }, + "issueModelResult": { + "type": "IssueModelResult", + "id": 8 + }, + "qaScorecardResults": { + "rule": "repeated", + "type": "QaScorecardResult", + "id": 10 + } + } + } + } + }, + "IssueModelResult": { + "fields": { + "issueModel": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/IssueModel" + } + }, + "issues": { + "rule": "repeated", + "type": "IssueAssignment", + "id": 2 + } + } + }, + "FeedbackLabel": { + "options": { + "(google.api.resource).type": "contactcenterinsights.googleapis.com/FeedbackLabel", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/conversations/{conversation}/feedbackLabels/{feedback_label}", + "(google.api.resource).plural": "feedbackLabels", + "(google.api.resource).singular": "feedbackLabel" + }, + "oneofs": { + "labelType": { + "oneof": [ + "label", + "qaAnswerLabel" + ] + } + }, + "fields": { + "label": { + "type": "string", + "id": 4 + }, + "qaAnswerLabel": { + "type": "QaAnswer.AnswerValue", + "id": 7 + }, + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "labeledResource": { + "type": "string", + "id": 3 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ConversationLevelSentiment": { + "fields": { + "channelTag": { + "type": "int32", + "id": 1 + }, + "sentimentData": { + "type": "SentimentData", + "id": 2 + } + } + }, + "ConversationLevelSilence": { + "fields": { + "silenceDuration": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "silencePercentage": { + "type": "float", + "id": 2 + } + } + }, + "IssueAssignment": { "fields": { - "name": { + "issue": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } + "id": 1 }, - "requestTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "score": { + "type": "double", + "id": 2 }, - "createTime": { - "type": "google.protobuf.Timestamp", + "displayName": { + "type": "string", "id": 3, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "IMMUTABLE" } + } + } + }, + "CallAnnotation": { + "oneofs": { + "data": { + "oneof": [ + "interruptionData", + "sentimentData", + "silenceData", + "holdData", + "entityMentionData", + "intentMatchData", + "phraseMatchData", + "issueMatchData" + ] + } + }, + "fields": { + "interruptionData": { + "type": "InterruptionData", + "id": 10 }, - "analysisResult": { - "type": "AnalysisResult", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "sentimentData": { + "type": "SentimentData", + "id": 11 }, - "annotatorSelector": { - "type": "AnnotatorSelector", - "id": 8 + "silenceData": { + "type": "SilenceData", + "id": 12 + }, + "holdData": { + "type": "HoldData", + "id": 13 + }, + "entityMentionData": { + "type": "EntityMentionData", + "id": 15 + }, + "intentMatchData": { + "type": "IntentMatchData", + "id": 16 + }, + "phraseMatchData": { + "type": "PhraseMatchData", + "id": 17 + }, + "issueMatchData": { + "type": "IssueMatchData", + "id": 18 + }, + "channelTag": { + "type": "int32", + "id": 1 + }, + "annotationStartBoundary": { + "type": "AnnotationBoundary", + "id": 4 + }, + "annotationEndBoundary": { + "type": "AnnotationBoundary", + "id": 5 } } }, - "ConversationDataSource": { + "AnnotationBoundary": { "oneofs": { - "source": { + "detailedBoundary": { "oneof": [ - "gcsSource", - "dialogflowSource" + "wordIndex" ] } }, "fields": { - "gcsSource": { - "type": "GcsSource", + "wordIndex": { + "type": "int32", + "id": 3 + }, + "transcriptIndex": { + "type": "int32", + "id": 1 + } + } + }, + "Entity": { + "fields": { + "displayName": { + "type": "string", "id": 1 }, - "dialogflowSource": { - "type": "DialogflowSource", + "type": { + "type": "Type", + "id": 2 + }, + "metadata": { + "keyType": "string", + "type": "string", "id": 3 + }, + "salience": { + "type": "float", + "id": 4 + }, + "sentiment": { + "type": "SentimentData", + "id": 5 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "PERSON": 1, + "LOCATION": 2, + "ORGANIZATION": 3, + "EVENT": 4, + "WORK_OF_ART": 5, + "CONSUMER_GOOD": 6, + "OTHER": 7, + "PHONE_NUMBER": 9, + "ADDRESS": 10, + "DATE": 11, + "NUMBER": 12, + "PRICE": 13 + } } } }, - "GcsSource": { + "Intent": { "fields": { - "audioUri": { + "id": { "type": "string", "id": 1 }, - "transcriptUri": { + "displayName": { "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } + "id": 2 } } }, - "DialogflowSource": { + "PhraseMatchData": { "fields": { - "dialogflowConversation": { + "phraseMatcher": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "id": 1 }, - "audioUri": { + "displayName": { "type": "string", - "id": 3 + "id": 2 } } }, - "AnalysisResult": { - "oneofs": { - "metadata": { - "oneof": [ - "callAnalysisMetadata" - ] + "DialogflowIntent": { + "fields": { + "displayName": { + "type": "string", + "id": 1 } - }, + } + }, + "InterruptionData": { + "fields": {} + }, + "SilenceData": { + "fields": {} + }, + "HoldData": { + "fields": {} + }, + "EntityMentionData": { "fields": { - "callAnalysisMetadata": { - "type": "CallAnalysisMetadata", + "entityUniqueId": { + "type": "string", + "id": 1 + }, + "type": { + "type": "MentionType", "id": 2 }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 1 + "sentiment": { + "type": "SentimentData", + "id": 3 } }, "nested": { - "CallAnalysisMetadata": { - "fields": { - "annotations": { - "rule": "repeated", - "type": "CallAnnotation", - "id": 2 - }, - "entities": { - "keyType": "string", - "type": "Entity", - "id": 3 - }, - "sentiments": { - "rule": "repeated", - "type": "ConversationLevelSentiment", - "id": 4 - }, - "silence": { - "type": "ConversationLevelSilence", - "id": 11 - }, - "intents": { - "keyType": "string", - "type": "Intent", - "id": 6 - }, - "phraseMatchers": { - "keyType": "string", - "type": "PhraseMatchData", - "id": 7 - }, - "issueModelResult": { - "type": "IssueModelResult", - "id": 8 - } + "MentionType": { + "values": { + "MENTION_TYPE_UNSPECIFIED": 0, + "PROPER": 1, + "COMMON": 2 } } } }, - "IssueModelResult": { + "IntentMatchData": { "fields": { - "issueModel": { + "intentUniqueId": { "type": "string", - "id": 1, - "options": { - "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/IssueModel" - } - }, - "issues": { - "rule": "repeated", - "type": "IssueAssignment", - "id": 2 + "id": 1 } } }, - "ConversationLevelSentiment": { + "SentimentData": { "fields": { - "channelTag": { - "type": "int32", + "magnitude": { + "type": "float", "id": 1 }, - "sentimentData": { - "type": "SentimentData", + "score": { + "type": "float", "id": 2 } } }, - "ConversationLevelSilence": { + "IssueMatchData": { "fields": { - "silenceDuration": { - "type": "google.protobuf.Duration", + "issueAssignment": { + "type": "IssueAssignment", "id": 1 - }, - "silencePercentage": { - "type": "float", - "id": 2 } } }, - "IssueAssignment": { + "IssueModel": { + "options": { + "(google.api.resource).type": "contactcenterinsights.googleapis.com/IssueModel", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/issueModels/{issue_model}" + }, "fields": { - "issue": { + "name": { "type": "string", - "id": 1 - }, - "score": { - "type": "double", - "id": 2 + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } }, "displayName": { "type": "string", + "id": 2 + }, + "createTime": { + "type": "google.protobuf.Timestamp", "id": 3, "options": { - "(google.api.field_behavior)": "IMMUTABLE" + "(google.api.field_behavior)": "OUTPUT_ONLY" } - } - } - }, - "CallAnnotation": { - "oneofs": { - "data": { - "oneof": [ - "interruptionData", - "sentimentData", - "silenceData", - "holdData", - "entityMentionData", - "intentMatchData", - "phraseMatchData", - "issueMatchData" - ] - } - }, - "fields": { - "interruptionData": { - "type": "InterruptionData", - "id": 10 }, - "sentimentData": { - "type": "SentimentData", - "id": 11 - }, - "silenceData": { - "type": "SilenceData", - "id": 12 + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "holdData": { - "type": "HoldData", - "id": 13 + "issueCount": { + "type": "int64", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "entityMentionData": { - "type": "EntityMentionData", - "id": 15 + "state": { + "type": "State", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "intentMatchData": { - "type": "IntentMatchData", - "id": 16 + "inputDataConfig": { + "type": "InputDataConfig", + "id": 6 }, - "phraseMatchData": { - "type": "PhraseMatchData", - "id": 17 + "trainingStats": { + "type": "IssueModelLabelStats", + "id": 7, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } }, - "issueMatchData": { - "type": "IssueMatchData", - "id": 18 + "modelType": { + "type": "ModelType", + "id": 9 }, - "channelTag": { - "type": "int32", - "id": 1 + "languageCode": { + "type": "string", + "id": 10 + } + }, + "nested": { + "InputDataConfig": { + "fields": { + "medium": { + "type": "Conversation.Medium", + "id": 1, + "options": { + "deprecated": true + } + }, + "trainingConversationsCount": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "filter": { + "type": "string", + "id": 3 + } + } }, - "annotationStartBoundary": { - "type": "AnnotationBoundary", - "id": 4 + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "UNDEPLOYED": 1, + "DEPLOYING": 2, + "DEPLOYED": 3, + "UNDEPLOYING": 4, + "DELETING": 5 + } }, - "annotationEndBoundary": { - "type": "AnnotationBoundary", - "id": 5 + "ModelType": { + "values": { + "MODEL_TYPE_UNSPECIFIED": 0, + "TYPE_V1": 1, + "TYPE_V2": 2 + } } } }, - "AnnotationBoundary": { - "oneofs": { - "detailedBoundary": { - "oneof": [ - "wordIndex" - ] - } + "Issue": { + "options": { + "(google.api.resource).type": "contactcenterinsights.googleapis.com/Issue", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue}" }, "fields": { - "wordIndex": { - "type": "int32", - "id": 3 + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } }, - "transcriptIndex": { - "type": "int32", + "displayName": { + "type": "string", + "id": 2 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "sampleUtterances": { + "rule": "repeated", + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "displayDescription": { + "type": "string", + "id": 14 + } + } + }, + "IssueModelLabelStats": { + "fields": { + "analyzedConversationsCount": { + "type": "int64", "id": 1 + }, + "unclassifiedConversationsCount": { + "type": "int64", + "id": 2 + }, + "issueStats": { + "keyType": "string", + "type": "IssueStats", + "id": 3 + } + }, + "nested": { + "IssueStats": { + "fields": { + "issue": { + "type": "string", + "id": 1 + }, + "labeledConversationsCount": { + "type": "int64", + "id": 2 + }, + "displayName": { + "type": "string", + "id": 3 + } + } } } }, - "Entity": { + "PhraseMatcher": { + "options": { + "(google.api.resource).type": "contactcenterinsights.googleapis.com/PhraseMatcher", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher}" + }, "fields": { - "displayName": { + "name": { "type": "string", "id": 1 }, - "type": { - "type": "Type", - "id": 2 + "revisionId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "metadata": { - "keyType": "string", + "versionTag": { "type": "string", "id": 3 }, - "salience": { - "type": "float", - "id": 4 + "revisionCreateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "sentiment": { - "type": "SentimentData", + "displayName": { + "type": "string", "id": 5 + }, + "type": { + "type": "PhraseMatcherType", + "id": 6, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "active": { + "type": "bool", + "id": 7 + }, + "phraseMatchRuleGroups": { + "rule": "repeated", + "type": "PhraseMatchRuleGroup", + "id": 8 + }, + "activationUpdateTime": { + "type": "google.protobuf.Timestamp", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "roleMatch": { + "type": "ConversationParticipant.Role", + "id": 10 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { - "Type": { + "PhraseMatcherType": { "values": { - "TYPE_UNSPECIFIED": 0, - "PERSON": 1, - "LOCATION": 2, - "ORGANIZATION": 3, - "EVENT": 4, - "WORK_OF_ART": 5, - "CONSUMER_GOOD": 6, - "OTHER": 7, - "PHONE_NUMBER": 9, - "ADDRESS": 10, - "DATE": 11, - "NUMBER": 12, - "PRICE": 13 + "PHRASE_MATCHER_TYPE_UNSPECIFIED": 0, + "ALL_OF": 1, + "ANY_OF": 2 } } } }, - "Intent": { - "fields": { - "id": { - "type": "string", - "id": 1 - }, - "displayName": { - "type": "string", - "id": 2 - } - } - }, - "PhraseMatchData": { + "PhraseMatchRuleGroup": { "fields": { - "phraseMatcher": { - "type": "string", - "id": 1 + "type": { + "type": "PhraseMatchRuleGroupType", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, - "displayName": { - "type": "string", + "phraseMatchRules": { + "rule": "repeated", + "type": "PhraseMatchRule", "id": 2 } - } - }, - "DialogflowIntent": { - "fields": { - "displayName": { - "type": "string", - "id": 1 + }, + "nested": { + "PhraseMatchRuleGroupType": { + "values": { + "PHRASE_MATCH_RULE_GROUP_TYPE_UNSPECIFIED": 0, + "ALL_OF": 1, + "ANY_OF": 2 + } } } }, - "InterruptionData": { - "fields": {} - }, - "SilenceData": { - "fields": {} - }, - "HoldData": { - "fields": {} - }, - "EntityMentionData": { + "PhraseMatchRule": { "fields": { - "entityUniqueId": { + "query": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, - "type": { - "type": "MentionType", + "negated": { + "type": "bool", "id": 2 }, - "sentiment": { - "type": "SentimentData", + "config": { + "type": "PhraseMatchRuleConfig", "id": 3 } - }, - "nested": { - "MentionType": { - "values": { - "MENTION_TYPE_UNSPECIFIED": 0, - "PROPER": 1, - "COMMON": 2 - } - } } }, - "IntentMatchData": { + "PhraseMatchRuleConfig": { + "oneofs": { + "config": { + "oneof": [ + "exactMatchConfig" + ] + } + }, "fields": { - "intentUniqueId": { - "type": "string", + "exactMatchConfig": { + "type": "ExactMatchConfig", "id": 1 } } }, - "SentimentData": { + "ExactMatchConfig": { "fields": { - "magnitude": { - "type": "float", + "caseSensitive": { + "type": "bool", "id": 1 - }, - "score": { - "type": "float", - "id": 2 } } }, - "IssueMatchData": { + "Settings": { + "options": { + "(google.api.resource).type": "contactcenterinsights.googleapis.com/Settings", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/settings" + }, "fields": { - "issueAssignment": { - "type": "IssueAssignment", - "id": 1 + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "languageCode": { + "type": "string", + "id": 4 + }, + "conversationTtl": { + "type": "google.protobuf.Duration", + "id": 5 + }, + "pubsubNotificationSettings": { + "keyType": "string", + "type": "string", + "id": 6 + }, + "analysisConfig": { + "type": "AnalysisConfig", + "id": 7 + }, + "redactionConfig": { + "type": "RedactionConfig", + "id": 10 + }, + "speechConfig": { + "type": "SpeechConfig", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "AnalysisConfig": { + "fields": { + "runtimeIntegrationAnalysisPercentage": { + "type": "double", + "id": 1 + }, + "uploadConversationAnalysisPercentage": { + "type": "double", + "id": 6 + }, + "annotatorSelector": { + "type": "AnnotatorSelector", + "id": 5 + } + } } } }, - "IssueModel": { + "AnalysisRule": { "options": { - "(google.api.resource).type": "contactcenterinsights.googleapis.com/IssueModel", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/issueModels/{issue_model}" + "(google.api.resource).type": "contactcenterinsights.googleapis.com/AnalysisRule", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/analysisRules/{analysis_rule}", + "(google.api.resource).plural": "analysisRules", + "(google.api.resource).singular": "analysisRule" + }, + "oneofs": { + "_displayName": { + "oneof": [ + "displayName" + ] + } }, "fields": { "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "IMMUTABLE" + "(google.api.field_behavior)": "IDENTIFIER" } }, - "displayName": { - "type": "string", - "id": 2 - }, "createTime": { "type": "google.protobuf.Timestamp", - "id": 3, + "id": 2, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, "updateTime": { "type": "google.protobuf.Timestamp", - "id": 4, + "id": 3, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "issueCount": { - "type": "int64", - "id": 8, + "displayName": { + "type": "string", + "id": 4, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "proto3_optional": true } }, - "state": { - "type": "State", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "conversationFilter": { + "type": "string", + "id": 5 }, - "inputDataConfig": { - "type": "InputDataConfig", + "annotatorSelector": { + "type": "AnnotatorSelector", "id": 6 }, - "trainingStats": { - "type": "IssueModelLabelStats", - "id": 7, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - }, - "modelType": { - "type": "ModelType", - "id": 9 - }, - "languageCode": { - "type": "string", - "id": 10 - } - }, - "nested": { - "InputDataConfig": { - "fields": { - "medium": { - "type": "Conversation.Medium", - "id": 1, - "options": { - "deprecated": true - } - }, - "trainingConversationsCount": { - "type": "int64", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "filter": { - "type": "string", - "id": 3 - } - } - }, - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "UNDEPLOYED": 1, - "DEPLOYING": 2, - "DEPLOYED": 3, - "UNDEPLOYING": 4, - "DELETING": 5 - } + "analysisPercentage": { + "type": "double", + "id": 7 }, - "ModelType": { - "values": { - "MODEL_TYPE_UNSPECIFIED": 0, - "TYPE_V1": 1, - "TYPE_V2": 2 - } + "active": { + "type": "bool", + "id": 8 } } }, - "Issue": { + "EncryptionSpec": { "options": { - "(google.api.resource).type": "contactcenterinsights.googleapis.com/Issue", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue}" + "(google.api.resource).type": "contactcenterinsights.googleapis.com/EncryptionSpec", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/encryptionSpec" }, "fields": { "name": { @@ -3307,296 +5810,350 @@ "(google.api.field_behavior)": "IMMUTABLE" } }, - "displayName": { + "kmsKey": { "type": "string", - "id": 2 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 4, + "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED" } + } + } + }, + "RedactionConfig": { + "fields": { + "deidentifyTemplate": { + "type": "string", + "id": 1 }, - "sampleUtterances": { - "rule": "repeated", + "inspectTemplate": { "type": "string", - "id": 6, + "id": 2 + } + } + }, + "SpeechConfig": { + "fields": { + "speechRecognizer": { + "type": "string", + "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.resource_reference).type": "speech.googleapis.com/Recognizer" } + } + } + }, + "RuntimeAnnotation": { + "oneofs": { + "data": { + "oneof": [ + "articleSuggestion", + "faqAnswer", + "smartReply", + "smartComposeSuggestion", + "dialogflowInteraction", + "conversationSummarizationSuggestion" + ] + } + }, + "fields": { + "articleSuggestion": { + "type": "ArticleSuggestionData", + "id": 6 }, - "displayDescription": { + "faqAnswer": { + "type": "FaqAnswerData", + "id": 7 + }, + "smartReply": { + "type": "SmartReplyData", + "id": 8 + }, + "smartComposeSuggestion": { + "type": "SmartComposeSuggestionData", + "id": 9 + }, + "dialogflowInteraction": { + "type": "DialogflowInteractionData", + "id": 10 + }, + "conversationSummarizationSuggestion": { + "type": "ConversationSummarizationSuggestionData", + "id": 12 + }, + "annotationId": { "type": "string", - "id": 14 + "id": 1 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "startBoundary": { + "type": "AnnotationBoundary", + "id": 3 + }, + "endBoundary": { + "type": "AnnotationBoundary", + "id": 4 + }, + "answerFeedback": { + "type": "AnswerFeedback", + "id": 5 + }, + "userInput": { + "type": "UserInput", + "id": 16 + } + }, + "nested": { + "UserInput": { + "fields": { + "query": { + "type": "string", + "id": 1 + }, + "generatorName": { + "type": "string", + "id": 2 + }, + "querySource": { + "type": "QuerySource", + "id": 3 + } + }, + "nested": { + "QuerySource": { + "values": { + "QUERY_SOURCE_UNSPECIFIED": 0, + "AGENT_QUERY": 1, + "SUGGESTED_QUERY": 2 + } + } + } } } }, - "IssueModelLabelStats": { + "AnswerFeedback": { "fields": { - "analyzedConversationsCount": { - "type": "int64", + "correctnessLevel": { + "type": "CorrectnessLevel", "id": 1 }, - "unclassifiedConversationsCount": { - "type": "int64", + "clicked": { + "type": "bool", "id": 2 }, - "issueStats": { - "keyType": "string", - "type": "IssueStats", + "displayed": { + "type": "bool", "id": 3 } }, "nested": { - "IssueStats": { - "fields": { - "issue": { - "type": "string", - "id": 1 - }, - "labeledConversationsCount": { - "type": "int64", - "id": 2 - }, - "displayName": { - "type": "string", - "id": 3 - } + "CorrectnessLevel": { + "values": { + "CORRECTNESS_LEVEL_UNSPECIFIED": 0, + "NOT_CORRECT": 1, + "PARTIALLY_CORRECT": 2, + "FULLY_CORRECT": 3 } } } }, - "PhraseMatcher": { - "options": { - "(google.api.resource).type": "contactcenterinsights.googleapis.com/PhraseMatcher", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher}" - }, + "ArticleSuggestionData": { "fields": { - "name": { + "title": { "type": "string", "id": 1 }, - "revisionId": { + "uri": { "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "id": 2 }, - "versionTag": { - "type": "string", + "confidenceScore": { + "type": "float", "id": 3 }, - "revisionCreateTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "metadata": { + "keyType": "string", + "type": "string", + "id": 4 }, - "displayName": { + "queryRecord": { "type": "string", "id": 5 }, - "type": { - "type": "PhraseMatcherType", - "id": 6, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "source": { + "type": "string", + "id": 6 + } + } + }, + "FaqAnswerData": { + "fields": { + "answer": { + "type": "string", + "id": 1 }, - "active": { - "type": "bool", - "id": 7 + "confidenceScore": { + "type": "float", + "id": 2 }, - "phraseMatchRuleGroups": { - "rule": "repeated", - "type": "PhraseMatchRuleGroup", - "id": 8 + "question": { + "type": "string", + "id": 3 }, - "activationUpdateTime": { - "type": "google.protobuf.Timestamp", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "metadata": { + "keyType": "string", + "type": "string", + "id": 4 }, - "roleMatch": { - "type": "ConversationParticipant.Role", - "id": 10 + "queryRecord": { + "type": "string", + "id": 5 }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 11, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "PhraseMatcherType": { - "values": { - "PHRASE_MATCHER_TYPE_UNSPECIFIED": 0, - "ALL_OF": 1, - "ANY_OF": 2 - } + "source": { + "type": "string", + "id": 6 } } }, - "PhraseMatchRuleGroup": { + "SmartReplyData": { "fields": { - "type": { - "type": "PhraseMatchRuleGroupType", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "reply": { + "type": "string", + "id": 1 }, - "phraseMatchRules": { - "rule": "repeated", - "type": "PhraseMatchRule", + "confidenceScore": { + "type": "double", "id": 2 - } - }, - "nested": { - "PhraseMatchRuleGroupType": { - "values": { - "PHRASE_MATCH_RULE_GROUP_TYPE_UNSPECIFIED": 0, - "ALL_OF": 1, - "ANY_OF": 2 - } + }, + "metadata": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "queryRecord": { + "type": "string", + "id": 4 } } }, - "PhraseMatchRule": { + "SmartComposeSuggestionData": { "fields": { - "query": { + "suggestion": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "id": 1 }, - "negated": { - "type": "bool", + "confidenceScore": { + "type": "double", "id": 2 }, - "config": { - "type": "PhraseMatchRuleConfig", + "metadata": { + "keyType": "string", + "type": "string", "id": 3 + }, + "queryRecord": { + "type": "string", + "id": 4 } } }, - "PhraseMatchRuleConfig": { - "oneofs": { - "config": { - "oneof": [ - "exactMatchConfig" - ] - } - }, + "DialogflowInteractionData": { "fields": { - "exactMatchConfig": { - "type": "ExactMatchConfig", + "dialogflowIntentId": { + "type": "string", "id": 1 + }, + "confidence": { + "type": "float", + "id": 2 } } }, - "ExactMatchConfig": { + "ConversationSummarizationSuggestionData": { "fields": { - "caseSensitive": { - "type": "bool", + "text": { + "type": "string", "id": 1 + }, + "textSections": { + "keyType": "string", + "type": "string", + "id": 5 + }, + "confidence": { + "type": "float", + "id": 2 + }, + "metadata": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "answerRecord": { + "type": "string", + "id": 4 + }, + "conversationModel": { + "type": "string", + "id": 6 } } }, - "Settings": { - "options": { - "(google.api.resource).type": "contactcenterinsights.googleapis.com/Settings", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/settings" + "ConversationParticipant": { + "oneofs": { + "participant": { + "oneof": [ + "dialogflowParticipantName", + "userId" + ] + } }, "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 3, + "dialogflowParticipantName": { + "type": "string", + "id": 5, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Participant" } }, - "languageCode": { - "type": "string", - "id": 4 - }, - "conversationTtl": { - "type": "google.protobuf.Duration", - "id": 5 - }, - "pubsubNotificationSettings": { - "keyType": "string", + "userId": { "type": "string", "id": 6 }, - "analysisConfig": { - "type": "AnalysisConfig", - "id": 7 - }, - "redactionConfig": { - "type": "RedactionConfig", - "id": 10 - }, - "speechConfig": { - "type": "SpeechConfig", - "id": 11, + "dialogflowParticipant": { + "type": "string", + "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "deprecated": true } + }, + "obfuscatedExternalUserId": { + "type": "string", + "id": 3 + }, + "role": { + "type": "Role", + "id": 2 } }, "nested": { - "AnalysisConfig": { - "fields": { - "runtimeIntegrationAnalysisPercentage": { - "type": "double", - "id": 1 - }, - "uploadConversationAnalysisPercentage": { - "type": "double", - "id": 6 - }, - "annotatorSelector": { - "type": "AnnotatorSelector", - "id": 5 - } + "Role": { + "values": { + "ROLE_UNSPECIFIED": 0, + "HUMAN_AGENT": 1, + "AUTOMATED_AGENT": 2, + "END_USER": 3, + "ANY_AGENT": 4 } } } }, - "EncryptionSpec": { + "View": { "options": { - "(google.api.resource).type": "contactcenterinsights.googleapis.com/EncryptionSpec", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/encryptionSpec" + "(google.api.resource).type": "contactcenterinsights.googleapis.com/View", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/views/{view}" }, "fields": { "name": { @@ -3606,467 +6163,722 @@ "(google.api.field_behavior)": "IMMUTABLE" } }, - "kmsKey": { + "displayName": { "type": "string", - "id": 2, + "id": 2 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "value": { + "type": "string", + "id": 5 } } }, - "RedactionConfig": { + "AnnotatorSelector": { "fields": { - "deidentifyTemplate": { - "type": "string", + "runInterruptionAnnotator": { + "type": "bool", "id": 1 }, - "inspectTemplate": { - "type": "string", + "runSilenceAnnotator": { + "type": "bool", "id": 2 - } - } - }, - "SpeechConfig": { - "fields": { - "speechRecognizer": { + }, + "runPhraseMatcherAnnotator": { + "type": "bool", + "id": 3 + }, + "phraseMatchers": { + "rule": "repeated", "type": "string", - "id": 1, + "id": 4, "options": { - "(google.api.resource_reference).type": "speech.googleapis.com/Recognizer" + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/PhraseMatcher" } - } - } - }, - "RuntimeAnnotation": { - "oneofs": { - "data": { - "oneof": [ - "articleSuggestion", - "faqAnswer", - "smartReply", - "smartComposeSuggestion", - "dialogflowInteraction", - "conversationSummarizationSuggestion" - ] - } - }, - "fields": { - "articleSuggestion": { - "type": "ArticleSuggestionData", + }, + "runSentimentAnnotator": { + "type": "bool", + "id": 5 + }, + "runEntityAnnotator": { + "type": "bool", "id": 6 }, - "faqAnswer": { - "type": "FaqAnswerData", + "runIntentAnnotator": { + "type": "bool", "id": 7 }, - "smartReply": { - "type": "SmartReplyData", + "runIssueModelAnnotator": { + "type": "bool", "id": 8 }, - "smartComposeSuggestion": { - "type": "SmartComposeSuggestionData", - "id": 9 - }, - "dialogflowInteraction": { - "type": "DialogflowInteractionData", - "id": 10 - }, - "conversationSummarizationSuggestion": { - "type": "ConversationSummarizationSuggestionData", - "id": 12 - }, - "annotationId": { + "issueModels": { + "rule": "repeated", "type": "string", - "id": 1 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 2 + "id": 10, + "options": { + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/IssueModel" + } }, - "startBoundary": { - "type": "AnnotationBoundary", - "id": 3 + "runSummarizationAnnotator": { + "type": "bool", + "id": 9 }, - "endBoundary": { - "type": "AnnotationBoundary", - "id": 4 + "summarizationConfig": { + "type": "SummarizationConfig", + "id": 11 }, - "answerFeedback": { - "type": "AnswerFeedback", - "id": 5 + "runQaAnnotator": { + "type": "bool", + "id": 12 }, - "userInput": { - "type": "UserInput", - "id": 16 + "qaConfig": { + "type": "QaConfig", + "id": 13 } }, "nested": { - "UserInput": { + "SummarizationConfig": { + "oneofs": { + "modelSource": { + "oneof": [ + "conversationProfile", + "summarizationModel" + ] + } + }, "fields": { - "query": { + "conversationProfile": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.resource_reference).type": "dialogflow.googleapis.com/ConversationProfile" + } }, - "generatorName": { - "type": "string", + "summarizationModel": { + "type": "SummarizationModel", "id": 2 - }, - "querySource": { - "type": "QuerySource", - "id": 3 } }, "nested": { - "QuerySource": { + "SummarizationModel": { "values": { - "QUERY_SOURCE_UNSPECIFIED": 0, - "AGENT_QUERY": 1, - "SUGGESTED_QUERY": 2 + "SUMMARIZATION_MODEL_UNSPECIFIED": 0, + "BASELINE_MODEL": 1, + "BASELINE_MODEL_V2_0": 2 } } } - } - } - }, - "AnswerFeedback": { - "fields": { - "correctnessLevel": { - "type": "CorrectnessLevel", - "id": 1 - }, - "clicked": { - "type": "bool", - "id": 2 }, - "displayed": { - "type": "bool", - "id": 3 - } - }, - "nested": { - "CorrectnessLevel": { - "values": { - "CORRECTNESS_LEVEL_UNSPECIFIED": 0, - "NOT_CORRECT": 1, - "PARTIALLY_CORRECT": 2, - "FULLY_CORRECT": 3 + "QaConfig": { + "oneofs": { + "scorecardSource": { + "oneof": [ + "scorecardList" + ] + } + }, + "fields": { + "scorecardList": { + "type": "ScorecardList", + "id": 1 + } + }, + "nested": { + "ScorecardList": { + "fields": { + "qaScorecardRevisions": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/QaScorecardRevision" + } + } + } + } } } } }, - "ArticleSuggestionData": { + "QaQuestion": { + "options": { + "(google.api.resource).type": "contactcenterinsights.googleapis.com/QaQuestion", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/qaScorecards/{qa_scorecard}/revisions/{revision}/qaQuestions/{qa_question}", + "(google.api.resource).plural": "qaQuestions", + "(google.api.resource).singular": "qaQuestion" + }, "fields": { - "title": { + "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } }, - "uri": { + "abbreviation": { "type": "string", "id": 2 }, - "confidenceScore": { - "type": "float", - "id": 3 + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "metadata": { - "keyType": "string", - "type": "string", - "id": 4 + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "queryRecord": { + "questionBody": { "type": "string", "id": 5 }, - "source": { - "type": "string", - "id": 6 - } - } - }, - "FaqAnswerData": { - "fields": { - "answer": { + "answerInstructions": { "type": "string", - "id": 1 + "id": 9 }, - "confidenceScore": { - "type": "float", - "id": 2 + "answerChoices": { + "rule": "repeated", + "type": "AnswerChoice", + "id": 6 }, - "question": { + "tags": { + "rule": "repeated", "type": "string", - "id": 3 + "id": 7 }, - "metadata": { - "keyType": "string", - "type": "string", - "id": 4 + "order": { + "type": "int32", + "id": 8 }, - "queryRecord": { - "type": "string", - "id": 5 + "metrics": { + "type": "Metrics", + "id": 10 }, - "source": { - "type": "string", - "id": 6 + "tuningMetadata": { + "type": "TuningMetadata", + "id": 11 } - } - }, - "SmartReplyData": { - "fields": { - "reply": { - "type": "string", - "id": 1 - }, - "confidenceScore": { - "type": "double", - "id": 2 + }, + "nested": { + "AnswerChoice": { + "oneofs": { + "value": { + "oneof": [ + "strValue", + "numValue", + "boolValue", + "naValue" + ] + }, + "_score": { + "oneof": [ + "score" + ] + } + }, + "fields": { + "strValue": { + "type": "string", + "id": 2 + }, + "numValue": { + "type": "double", + "id": 3 + }, + "boolValue": { + "type": "bool", + "id": 4 + }, + "naValue": { + "type": "bool", + "id": 5 + }, + "key": { + "type": "string", + "id": 1 + }, + "score": { + "type": "double", + "id": 6, + "options": { + "proto3_optional": true + } + } + } }, - "metadata": { - "keyType": "string", - "type": "string", - "id": 3 + "Metrics": { + "fields": { + "accuracy": { + "type": "double", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } }, - "queryRecord": { - "type": "string", - "id": 4 + "TuningMetadata": { + "fields": { + "totalValidLabelCount": { + "type": "int64", + "id": 1 + }, + "datasetValidationWarnings": { + "rule": "repeated", + "type": "DatasetValidationWarning", + "id": 2 + }, + "tuningError": { + "type": "string", + "id": 3 + } + } } } }, - "SmartComposeSuggestionData": { + "QaScorecard": { + "options": { + "(google.api.resource).type": "contactcenterinsights.googleapis.com/QaScorecard", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/qaScorecards/{qa_scorecard}", + "(google.api.resource).plural": "qaScorecards", + "(google.api.resource).singular": "qaScorecard" + }, "fields": { - "suggestion": { + "name": { "type": "string", - "id": 1 - }, - "confidenceScore": { - "type": "double", - "id": 2 + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } }, - "metadata": { - "keyType": "string", + "displayName": { "type": "string", - "id": 3 + "id": 7 }, - "queryRecord": { - "type": "string", - "id": 4 - } - } - }, - "DialogflowInteractionData": { - "fields": { - "dialogflowIntentId": { + "description": { "type": "string", - "id": 1 - }, - "confidence": { - "type": "float", "id": 2 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, - "ConversationSummarizationSuggestionData": { + "QaScorecardRevision": { + "options": { + "(google.api.resource).type": "contactcenterinsights.googleapis.com/QaScorecardRevision", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/qaScorecards/{qa_scorecard}/revisions/{revision}", + "(google.api.resource).plural": "qaScorecardRevisions", + "(google.api.resource).singular": "qaScorecardRevision" + }, "fields": { - "text": { - "type": "string", - "id": 1 - }, - "textSections": { - "keyType": "string", + "name": { "type": "string", - "id": 5 + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } }, - "confidence": { - "type": "float", + "snapshot": { + "type": "QaScorecard", "id": 2 }, - "metadata": { - "keyType": "string", - "type": "string", - "id": 3 + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "answerRecord": { + "alternateIds": { + "rule": "repeated", "type": "string", - "id": 4 + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "conversationModel": { - "type": "string", - "id": 6 + "state": { + "type": "State", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "EDITABLE": 12, + "TRAINING": 2, + "TRAINING_FAILED": 9, + "READY": 11, + "DELETING": 7, + "TRAINING_CANCELLED": 14 + } } } }, - "ConversationParticipant": { - "oneofs": { - "participant": { - "oneof": [ - "dialogflowParticipantName", - "userId" - ] - } - }, + "QaAnswer": { "fields": { - "dialogflowParticipantName": { + "qaQuestion": { "type": "string", - "id": 5, + "id": 7, "options": { - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Participant" + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/QaQuestion" } }, - "userId": { - "type": "string", - "id": 6 - }, - "dialogflowParticipant": { + "conversation": { "type": "string", - "id": 1, + "id": 2, "options": { - "deprecated": true + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/Conversation" } }, - "obfuscatedExternalUserId": { + "questionBody": { "type": "string", + "id": 6 + }, + "answerValue": { + "type": "AnswerValue", "id": 3 }, - "role": { - "type": "Role", - "id": 2 + "tags": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "answerSources": { + "rule": "repeated", + "type": "AnswerSource", + "id": 8 } }, "nested": { - "Role": { - "values": { - "ROLE_UNSPECIFIED": 0, - "HUMAN_AGENT": 1, - "AUTOMATED_AGENT": 2, - "END_USER": 3, - "ANY_AGENT": 4 + "AnswerValue": { + "oneofs": { + "value": { + "oneof": [ + "strValue", + "numValue", + "boolValue", + "naValue" + ] + }, + "_score": { + "oneof": [ + "score" + ] + }, + "_potentialScore": { + "oneof": [ + "potentialScore" + ] + }, + "_normalizedScore": { + "oneof": [ + "normalizedScore" + ] + } + }, + "fields": { + "strValue": { + "type": "string", + "id": 2 + }, + "numValue": { + "type": "double", + "id": 3 + }, + "boolValue": { + "type": "bool", + "id": 4 + }, + "naValue": { + "type": "bool", + "id": 5 + }, + "key": { + "type": "string", + "id": 1 + }, + "score": { + "type": "double", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "potentialScore": { + "type": "double", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "normalizedScore": { + "type": "double", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, + "AnswerSource": { + "fields": { + "sourceType": { + "type": "SourceType", + "id": 1 + }, + "answerValue": { + "type": "AnswerValue", + "id": 2 + } + }, + "nested": { + "SourceType": { + "values": { + "SOURCE_TYPE_UNSPECIFIED": 0, + "SYSTEM_GENERATED": 1, + "MANUAL_EDIT": 2 + } + } } } } }, - "View": { + "QaScorecardResult": { "options": { - "(google.api.resource).type": "contactcenterinsights.googleapis.com/View", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/views/{view}" + "(google.api.resource).type": "contactcenterinsights.googleapis.com/QaScorecardResult", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/qaScorecardResults/{qa_scorecard_result}", + "(google.api.resource).plural": "qaScorecardResults", + "(google.api.resource).singular": "qaScorecardResult" + }, + "oneofs": { + "_score": { + "oneof": [ + "score" + ] + }, + "_potentialScore": { + "oneof": [ + "potentialScore" + ] + }, + "_normalizedScore": { + "oneof": [ + "normalizedScore" + ] + } }, "fields": { "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "IMMUTABLE" + "(google.api.field_behavior)": "IDENTIFIER" } }, - "displayName": { + "qaScorecardRevision": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/QaScorecardRevision" + } }, - "createTime": { - "type": "google.protobuf.Timestamp", + "conversation": { + "type": "string", "id": 3, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/Conversation" } }, - "updateTime": { + "createTime": { "type": "google.protobuf.Timestamp", "id": 4, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "value": { + "agentId": { "type": "string", "id": 5 - } - } - }, - "AnnotatorSelector": { - "fields": { - "runInterruptionAnnotator": { - "type": "bool", - "id": 1 - }, - "runSilenceAnnotator": { - "type": "bool", - "id": 2 - }, - "runPhraseMatcherAnnotator": { - "type": "bool", - "id": 3 }, - "phraseMatchers": { + "qaAnswers": { "rule": "repeated", - "type": "string", - "id": 4, - "options": { - "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/PhraseMatcher" - } - }, - "runSentimentAnnotator": { - "type": "bool", - "id": 5 - }, - "runEntityAnnotator": { - "type": "bool", + "type": "QaAnswer", "id": 6 }, - "runIntentAnnotator": { - "type": "bool", - "id": 7 + "score": { + "type": "double", + "id": 7, + "options": { + "proto3_optional": true + } }, - "runIssueModelAnnotator": { - "type": "bool", - "id": 8 + "potentialScore": { + "type": "double", + "id": 8, + "options": { + "proto3_optional": true + } }, - "issueModels": { - "rule": "repeated", - "type": "string", - "id": 10, + "normalizedScore": { + "type": "double", + "id": 9, "options": { - "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/IssueModel" + "proto3_optional": true } }, - "runSummarizationAnnotator": { - "type": "bool", - "id": 9 + "qaTagResults": { + "rule": "repeated", + "type": "QaTagResult", + "id": 10 }, - "summarizationConfig": { - "type": "SummarizationConfig", + "scoreSources": { + "rule": "repeated", + "type": "ScoreSource", "id": 11 } }, "nested": { - "SummarizationConfig": { + "QaTagResult": { "oneofs": { - "modelSource": { + "_score": { "oneof": [ - "conversationProfile", - "summarizationModel" + "score" + ] + }, + "_potentialScore": { + "oneof": [ + "potentialScore" + ] + }, + "_normalizedScore": { + "oneof": [ + "normalizedScore" ] } }, "fields": { - "conversationProfile": { + "tag": { "type": "string", - "id": 1, + "id": 1 + }, + "score": { + "type": "double", + "id": 2, "options": { - "(google.api.resource_reference).type": "dialogflow.googleapis.com/ConversationProfile" + "proto3_optional": true } }, - "summarizationModel": { - "type": "SummarizationModel", - "id": 2 + "potentialScore": { + "type": "double", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "normalizedScore": { + "type": "double", + "id": 4, + "options": { + "proto3_optional": true + } + } + } + }, + "ScoreSource": { + "oneofs": { + "_score": { + "oneof": [ + "score" + ] + }, + "_potentialScore": { + "oneof": [ + "potentialScore" + ] + }, + "_normalizedScore": { + "oneof": [ + "normalizedScore" + ] + } + }, + "fields": { + "sourceType": { + "type": "SourceType", + "id": 1 + }, + "score": { + "type": "double", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "potentialScore": { + "type": "double", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "normalizedScore": { + "type": "double", + "id": 4, + "options": { + "proto3_optional": true + } + }, + "qaTagResults": { + "rule": "repeated", + "type": "QaTagResult", + "id": 5 } }, "nested": { - "SummarizationModel": { + "SourceType": { "values": { - "SUMMARIZATION_MODEL_UNSPECIFIED": 0, - "BASELINE_MODEL": 1, - "BASELINE_MODEL_V2_0": 2 + "SOURCE_TYPE_UNSPECIFIED": 0, + "SYSTEM_GENERATED_ONLY": 1, + "INCLUDES_MANUAL_EDITS": 2 } } } @@ -6138,6 +8950,30 @@ } } } + }, + "type": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/type/interval;interval", + "java_multiple_files": true, + "java_outer_classname": "IntervalProto", + "java_package": "com.google.type", + "objc_class_prefix": "GTP" + }, + "nested": { + "Interval": { + "fields": { + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + } + } + } + } } } } diff --git a/packages/google-cloud-contactcenterinsights/samples/README.md b/packages/google-cloud-contactcenterinsights/samples/README.md index 6fd0853ae39..ded02b531cd 100644 --- a/packages/google-cloud-contactcenterinsights/samples/README.md +++ b/packages/google-cloud-contactcenterinsights/samples/README.md @@ -14,44 +14,75 @@ * [Samples](#samples) * [Contact_center_insights.bulk_analyze_conversations](#contact_center_insights.bulk_analyze_conversations) * [Contact_center_insights.bulk_delete_conversations](#contact_center_insights.bulk_delete_conversations) + * [Contact_center_insights.bulk_download_feedback_labels](#contact_center_insights.bulk_download_feedback_labels) + * [Contact_center_insights.bulk_upload_feedback_labels](#contact_center_insights.bulk_upload_feedback_labels) * [Contact_center_insights.calculate_issue_model_stats](#contact_center_insights.calculate_issue_model_stats) * [Contact_center_insights.calculate_stats](#contact_center_insights.calculate_stats) * [Contact_center_insights.create_analysis](#contact_center_insights.create_analysis) + * [Contact_center_insights.create_analysis_rule](#contact_center_insights.create_analysis_rule) * [Contact_center_insights.create_conversation](#contact_center_insights.create_conversation) + * [Contact_center_insights.create_feedback_label](#contact_center_insights.create_feedback_label) * [Contact_center_insights.create_issue_model](#contact_center_insights.create_issue_model) * [Contact_center_insights.create_phrase_matcher](#contact_center_insights.create_phrase_matcher) + * [Contact_center_insights.create_qa_question](#contact_center_insights.create_qa_question) + * [Contact_center_insights.create_qa_scorecard](#contact_center_insights.create_qa_scorecard) + * [Contact_center_insights.create_qa_scorecard_revision](#contact_center_insights.create_qa_scorecard_revision) * [Contact_center_insights.create_view](#contact_center_insights.create_view) * [Contact_center_insights.delete_analysis](#contact_center_insights.delete_analysis) + * [Contact_center_insights.delete_analysis_rule](#contact_center_insights.delete_analysis_rule) * [Contact_center_insights.delete_conversation](#contact_center_insights.delete_conversation) + * [Contact_center_insights.delete_feedback_label](#contact_center_insights.delete_feedback_label) * [Contact_center_insights.delete_issue](#contact_center_insights.delete_issue) * [Contact_center_insights.delete_issue_model](#contact_center_insights.delete_issue_model) * [Contact_center_insights.delete_phrase_matcher](#contact_center_insights.delete_phrase_matcher) + * [Contact_center_insights.delete_qa_question](#contact_center_insights.delete_qa_question) + * [Contact_center_insights.delete_qa_scorecard](#contact_center_insights.delete_qa_scorecard) + * [Contact_center_insights.delete_qa_scorecard_revision](#contact_center_insights.delete_qa_scorecard_revision) * [Contact_center_insights.delete_view](#contact_center_insights.delete_view) * [Contact_center_insights.deploy_issue_model](#contact_center_insights.deploy_issue_model) + * [Contact_center_insights.deploy_qa_scorecard_revision](#contact_center_insights.deploy_qa_scorecard_revision) * [Contact_center_insights.export_insights_data](#contact_center_insights.export_insights_data) * [Contact_center_insights.export_issue_model](#contact_center_insights.export_issue_model) * [Contact_center_insights.get_analysis](#contact_center_insights.get_analysis) + * [Contact_center_insights.get_analysis_rule](#contact_center_insights.get_analysis_rule) * [Contact_center_insights.get_conversation](#contact_center_insights.get_conversation) * [Contact_center_insights.get_encryption_spec](#contact_center_insights.get_encryption_spec) + * [Contact_center_insights.get_feedback_label](#contact_center_insights.get_feedback_label) * [Contact_center_insights.get_issue](#contact_center_insights.get_issue) * [Contact_center_insights.get_issue_model](#contact_center_insights.get_issue_model) * [Contact_center_insights.get_phrase_matcher](#contact_center_insights.get_phrase_matcher) + * [Contact_center_insights.get_qa_question](#contact_center_insights.get_qa_question) + * [Contact_center_insights.get_qa_scorecard](#contact_center_insights.get_qa_scorecard) + * [Contact_center_insights.get_qa_scorecard_revision](#contact_center_insights.get_qa_scorecard_revision) * [Contact_center_insights.get_settings](#contact_center_insights.get_settings) * [Contact_center_insights.get_view](#contact_center_insights.get_view) * [Contact_center_insights.import_issue_model](#contact_center_insights.import_issue_model) * [Contact_center_insights.ingest_conversations](#contact_center_insights.ingest_conversations) * [Contact_center_insights.initialize_encryption_spec](#contact_center_insights.initialize_encryption_spec) + * [Contact_center_insights.list_all_feedback_labels](#contact_center_insights.list_all_feedback_labels) * [Contact_center_insights.list_analyses](#contact_center_insights.list_analyses) + * [Contact_center_insights.list_analysis_rules](#contact_center_insights.list_analysis_rules) * [Contact_center_insights.list_conversations](#contact_center_insights.list_conversations) + * [Contact_center_insights.list_feedback_labels](#contact_center_insights.list_feedback_labels) * [Contact_center_insights.list_issue_models](#contact_center_insights.list_issue_models) * [Contact_center_insights.list_issues](#contact_center_insights.list_issues) * [Contact_center_insights.list_phrase_matchers](#contact_center_insights.list_phrase_matchers) + * [Contact_center_insights.list_qa_questions](#contact_center_insights.list_qa_questions) + * [Contact_center_insights.list_qa_scorecard_revisions](#contact_center_insights.list_qa_scorecard_revisions) + * [Contact_center_insights.list_qa_scorecards](#contact_center_insights.list_qa_scorecards) * [Contact_center_insights.list_views](#contact_center_insights.list_views) + * [Contact_center_insights.query_metrics](#contact_center_insights.query_metrics) + * [Contact_center_insights.tune_qa_scorecard_revision](#contact_center_insights.tune_qa_scorecard_revision) * [Contact_center_insights.undeploy_issue_model](#contact_center_insights.undeploy_issue_model) + * [Contact_center_insights.undeploy_qa_scorecard_revision](#contact_center_insights.undeploy_qa_scorecard_revision) + * [Contact_center_insights.update_analysis_rule](#contact_center_insights.update_analysis_rule) * [Contact_center_insights.update_conversation](#contact_center_insights.update_conversation) + * [Contact_center_insights.update_feedback_label](#contact_center_insights.update_feedback_label) * [Contact_center_insights.update_issue](#contact_center_insights.update_issue) * [Contact_center_insights.update_issue_model](#contact_center_insights.update_issue_model) * [Contact_center_insights.update_phrase_matcher](#contact_center_insights.update_phrase_matcher) + * [Contact_center_insights.update_qa_question](#contact_center_insights.update_qa_question) + * [Contact_center_insights.update_qa_scorecard](#contact_center_insights.update_qa_scorecard) * [Contact_center_insights.update_settings](#contact_center_insights.update_settings) * [Contact_center_insights.update_view](#contact_center_insights.update_view) * [Contact_center_insights.upload_conversation](#contact_center_insights.upload_conversation) @@ -106,6 +137,40 @@ __Usage:__ +### Contact_center_insights.bulk_download_feedback_labels + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.bulk_download_feedback_labels.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-contactcenterinsights/samples/generated/v1/contact_center_insights.bulk_download_feedback_labels.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.bulk_download_feedback_labels.js` + + +----- + + + + +### Contact_center_insights.bulk_upload_feedback_labels + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.bulk_upload_feedback_labels.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-contactcenterinsights/samples/generated/v1/contact_center_insights.bulk_upload_feedback_labels.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.bulk_upload_feedback_labels.js` + + +----- + + + + ### Contact_center_insights.calculate_issue_model_stats View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.calculate_issue_model_stats.js). @@ -157,6 +222,23 @@ __Usage:__ +### Contact_center_insights.create_analysis_rule + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_analysis_rule.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-contactcenterinsights/samples/generated/v1/contact_center_insights.create_analysis_rule.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_analysis_rule.js` + + +----- + + + + ### Contact_center_insights.create_conversation View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_conversation.js). @@ -174,6 +256,23 @@ __Usage:__ +### Contact_center_insights.create_feedback_label + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_feedback_label.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-contactcenterinsights/samples/generated/v1/contact_center_insights.create_feedback_label.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_feedback_label.js` + + +----- + + + + ### Contact_center_insights.create_issue_model View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_issue_model.js). @@ -208,6 +307,57 @@ __Usage:__ +### Contact_center_insights.create_qa_question + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_qa_question.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-contactcenterinsights/samples/generated/v1/contact_center_insights.create_qa_question.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_qa_question.js` + + +----- + + + + +### Contact_center_insights.create_qa_scorecard + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_qa_scorecard.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-contactcenterinsights/samples/generated/v1/contact_center_insights.create_qa_scorecard.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_qa_scorecard.js` + + +----- + + + + +### Contact_center_insights.create_qa_scorecard_revision + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_qa_scorecard_revision.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-contactcenterinsights/samples/generated/v1/contact_center_insights.create_qa_scorecard_revision.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_qa_scorecard_revision.js` + + +----- + + + + ### Contact_center_insights.create_view View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_view.js). @@ -242,6 +392,23 @@ __Usage:__ +### Contact_center_insights.delete_analysis_rule + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_analysis_rule.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-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_analysis_rule.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_analysis_rule.js` + + +----- + + + + ### Contact_center_insights.delete_conversation View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_conversation.js). @@ -259,6 +426,23 @@ __Usage:__ +### Contact_center_insights.delete_feedback_label + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_feedback_label.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-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_feedback_label.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_feedback_label.js` + + +----- + + + + ### Contact_center_insights.delete_issue View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_issue.js). @@ -310,6 +494,57 @@ __Usage:__ +### Contact_center_insights.delete_qa_question + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_qa_question.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-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_qa_question.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_qa_question.js` + + +----- + + + + +### Contact_center_insights.delete_qa_scorecard + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_qa_scorecard.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-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_qa_scorecard.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_qa_scorecard.js` + + +----- + + + + +### Contact_center_insights.delete_qa_scorecard_revision + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_qa_scorecard_revision.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-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_qa_scorecard_revision.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_qa_scorecard_revision.js` + + +----- + + + + ### Contact_center_insights.delete_view View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_view.js). @@ -344,6 +579,23 @@ __Usage:__ +### Contact_center_insights.deploy_qa_scorecard_revision + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.deploy_qa_scorecard_revision.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-contactcenterinsights/samples/generated/v1/contact_center_insights.deploy_qa_scorecard_revision.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.deploy_qa_scorecard_revision.js` + + +----- + + + + ### Contact_center_insights.export_insights_data View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.export_insights_data.js). @@ -395,6 +647,23 @@ __Usage:__ +### Contact_center_insights.get_analysis_rule + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_analysis_rule.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-contactcenterinsights/samples/generated/v1/contact_center_insights.get_analysis_rule.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_analysis_rule.js` + + +----- + + + + ### Contact_center_insights.get_conversation View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_conversation.js). @@ -429,6 +698,23 @@ __Usage:__ +### Contact_center_insights.get_feedback_label + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_feedback_label.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-contactcenterinsights/samples/generated/v1/contact_center_insights.get_feedback_label.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_feedback_label.js` + + +----- + + + + ### Contact_center_insights.get_issue View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_issue.js). @@ -480,6 +766,57 @@ __Usage:__ +### Contact_center_insights.get_qa_question + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_qa_question.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-contactcenterinsights/samples/generated/v1/contact_center_insights.get_qa_question.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_qa_question.js` + + +----- + + + + +### Contact_center_insights.get_qa_scorecard + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_qa_scorecard.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-contactcenterinsights/samples/generated/v1/contact_center_insights.get_qa_scorecard.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_qa_scorecard.js` + + +----- + + + + +### Contact_center_insights.get_qa_scorecard_revision + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_qa_scorecard_revision.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-contactcenterinsights/samples/generated/v1/contact_center_insights.get_qa_scorecard_revision.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_qa_scorecard_revision.js` + + +----- + + + + ### Contact_center_insights.get_settings View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_settings.js). @@ -565,6 +902,23 @@ __Usage:__ +### Contact_center_insights.list_all_feedback_labels + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_all_feedback_labels.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-contactcenterinsights/samples/generated/v1/contact_center_insights.list_all_feedback_labels.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_all_feedback_labels.js` + + +----- + + + + ### Contact_center_insights.list_analyses View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_analyses.js). @@ -582,6 +936,23 @@ __Usage:__ +### Contact_center_insights.list_analysis_rules + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_analysis_rules.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-contactcenterinsights/samples/generated/v1/contact_center_insights.list_analysis_rules.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_analysis_rules.js` + + +----- + + + + ### Contact_center_insights.list_conversations View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_conversations.js). @@ -599,6 +970,23 @@ __Usage:__ +### Contact_center_insights.list_feedback_labels + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_feedback_labels.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-contactcenterinsights/samples/generated/v1/contact_center_insights.list_feedback_labels.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_feedback_labels.js` + + +----- + + + + ### Contact_center_insights.list_issue_models View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_issue_models.js). @@ -650,6 +1038,57 @@ __Usage:__ +### Contact_center_insights.list_qa_questions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_qa_questions.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-contactcenterinsights/samples/generated/v1/contact_center_insights.list_qa_questions.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_qa_questions.js` + + +----- + + + + +### Contact_center_insights.list_qa_scorecard_revisions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_qa_scorecard_revisions.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-contactcenterinsights/samples/generated/v1/contact_center_insights.list_qa_scorecard_revisions.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_qa_scorecard_revisions.js` + + +----- + + + + +### Contact_center_insights.list_qa_scorecards + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_qa_scorecards.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-contactcenterinsights/samples/generated/v1/contact_center_insights.list_qa_scorecards.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_qa_scorecards.js` + + +----- + + + + ### Contact_center_insights.list_views View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_views.js). @@ -667,6 +1106,40 @@ __Usage:__ +### Contact_center_insights.query_metrics + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.query_metrics.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-contactcenterinsights/samples/generated/v1/contact_center_insights.query_metrics.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.query_metrics.js` + + +----- + + + + +### Contact_center_insights.tune_qa_scorecard_revision + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.tune_qa_scorecard_revision.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-contactcenterinsights/samples/generated/v1/contact_center_insights.tune_qa_scorecard_revision.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.tune_qa_scorecard_revision.js` + + +----- + + + + ### Contact_center_insights.undeploy_issue_model View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.undeploy_issue_model.js). @@ -684,6 +1157,40 @@ __Usage:__ +### Contact_center_insights.undeploy_qa_scorecard_revision + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.undeploy_qa_scorecard_revision.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-contactcenterinsights/samples/generated/v1/contact_center_insights.undeploy_qa_scorecard_revision.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.undeploy_qa_scorecard_revision.js` + + +----- + + + + +### Contact_center_insights.update_analysis_rule + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_analysis_rule.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-contactcenterinsights/samples/generated/v1/contact_center_insights.update_analysis_rule.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_analysis_rule.js` + + +----- + + + + ### Contact_center_insights.update_conversation View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_conversation.js). @@ -701,6 +1208,23 @@ __Usage:__ +### Contact_center_insights.update_feedback_label + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_feedback_label.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-contactcenterinsights/samples/generated/v1/contact_center_insights.update_feedback_label.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_feedback_label.js` + + +----- + + + + ### Contact_center_insights.update_issue View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_issue.js). @@ -752,6 +1276,40 @@ __Usage:__ +### Contact_center_insights.update_qa_question + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_qa_question.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-contactcenterinsights/samples/generated/v1/contact_center_insights.update_qa_question.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_qa_question.js` + + +----- + + + + +### Contact_center_insights.update_qa_scorecard + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_qa_scorecard.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-contactcenterinsights/samples/generated/v1/contact_center_insights.update_qa_scorecard.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_qa_scorecard.js` + + +----- + + + + ### Contact_center_insights.update_settings View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_settings.js). diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.bulk_download_feedback_labels.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.bulk_download_feedback_labels.js new file mode 100644 index 00000000000..6cdd79f8d75 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.bulk_download_feedback_labels.js @@ -0,0 +1,103 @@ +// Copyright 2024 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 contactcenterinsights_v1_generated_ContactCenterInsights_BulkDownloadFeedbackLabels_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. + */ + /** + * A cloud storage bucket destination. + */ + // const gcsDestination = {} + /** + * Required. The parent resource for new feedback labels. + */ + // const parent = 'abc123' + /** + * Optional. A filter to reduce results to a specific subset. Supports + * disjunctions (OR) and conjunctions (AND). + * Supported fields: + * * `issue_model_id` + * * `qa_question_id` + * * `qa_scorecard_id` + * * `min_create_time` + * * `max_create_time` + * * `min_update_time` + * * `max_update_time` + * * `feedback_label_type`: QUALITY_AI, TOPIC_MODELING + */ + // const filter = 'abc123' + /** + * Optional. Limits the maximum number of feedback labels that will be + * downloaded. The first `N` feedback labels will be downloaded. + */ + // const maxDownloadCount = 1234 + /** + * Optional. The type of feedback labels that will be downloaded. + */ + // const feedbackLabelType = {} + /** + * Optional. Filter parent conversations to download feedback labels for. + * When specified, the feedback labels will be downloaded for the + * conversations that match the filter. + * If `template_qa_scorecard_id` is set, all the conversations that match the + * filter will be paired with the questions under the scorecard for labeling. + */ + // const conversationFilter = 'abc123' + /** + * Optional. If set, a template for labeling conversations and scorecard + * questions will be created from the conversation_filter and the questions + * under the scorecard(s). The feedback label `filter` will be ignored. + */ + // const templateQaScorecardId = ['abc','def'] + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callBulkDownloadFeedbackLabels() { + // Construct request + const request = { + parent, + }; + + // Run request + const [operation] = await contactcenterinsightsClient.bulkDownloadFeedbackLabels(request); + const [response] = await operation.promise(); + console.log(response); + } + + callBulkDownloadFeedbackLabels(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_BulkDownloadFeedbackLabels_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.bulk_upload_feedback_labels.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.bulk_upload_feedback_labels.js new file mode 100644 index 00000000000..1bb64fc53b2 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.bulk_upload_feedback_labels.js @@ -0,0 +1,72 @@ +// Copyright 2024 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 contactcenterinsights_v1_generated_ContactCenterInsights_BulkUploadFeedbackLabels_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. + */ + /** + * A cloud storage bucket source. + */ + // const gcsSource = {} + /** + * Required. The parent resource for new feedback labels. + */ + // const parent = 'abc123' + /** + * Optional. If set, upload will not happen and the labels will be validated. + * If not set, then default behavior will be to upload the labels after + * validation is complete. + */ + // const validateOnly = true + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callBulkUploadFeedbackLabels() { + // Construct request + const request = { + parent, + }; + + // Run request + const [operation] = await contactcenterinsightsClient.bulkUploadFeedbackLabels(request); + const [response] = await operation.promise(); + console.log(response); + } + + callBulkUploadFeedbackLabels(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_BulkUploadFeedbackLabels_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_analysis_rule.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_analysis_rule.js new file mode 100644 index 00000000000..953e5db9992 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_analysis_rule.js @@ -0,0 +1,69 @@ +// Copyright 2024 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, analysisRule) { + // [START contactcenterinsights_v1_generated_ContactCenterInsights_CreateAnalysisRule_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource of the analysis rule. Required. The location + * to create a analysis rule for. Format: `projects//locations/` or `projects//locations/` + */ + // const parent = 'abc123' + /** + * Required. The analysis rule resource to create. + */ + // const analysisRule = {} + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callCreateAnalysisRule() { + // Construct request + const request = { + parent, + analysisRule, + }; + + // Run request + const response = await contactcenterinsightsClient.createAnalysisRule(request); + console.log(response); + } + + callCreateAnalysisRule(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_CreateAnalysisRule_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_feedback_label.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_feedback_label.js new file mode 100644 index 00000000000..cd7f9233342 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_feedback_label.js @@ -0,0 +1,71 @@ +// Copyright 2024 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, feedbackLabel) { + // [START contactcenterinsights_v1_generated_ContactCenterInsights_CreateFeedbackLabel_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource of the feedback label. + */ + // const parent = 'abc123' + /** + * Optional. The ID of the feedback label to create. + * If one is not specified it will be generated by the server. + */ + // const feedbackLabelId = 'abc123' + /** + * Required. The feedback label to create. + */ + // const feedbackLabel = {} + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callCreateFeedbackLabel() { + // Construct request + const request = { + parent, + feedbackLabel, + }; + + // Run request + const response = await contactcenterinsightsClient.createFeedbackLabel(request); + console.log(response); + } + + callCreateFeedbackLabel(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_CreateFeedbackLabel_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_qa_question.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_qa_question.js new file mode 100644 index 00000000000..4608ee201bc --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_qa_question.js @@ -0,0 +1,74 @@ +// Copyright 2024 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, qaQuestion) { + // [START contactcenterinsights_v1_generated_ContactCenterInsights_CreateQaQuestion_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource of the QaQuestion. + */ + // const parent = 'abc123' + /** + * Required. The QaQuestion to create. + */ + // const qaQuestion = {} + /** + * Optional. A unique ID for the new question. This ID will become the final + * component of the question's resource name. If no ID is specified, a + * server-generated ID will be used. + * This value should be 4-64 characters and must match the regular + * expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-`. + */ + // const qaQuestionId = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callCreateQaQuestion() { + // Construct request + const request = { + parent, + qaQuestion, + }; + + // Run request + const response = await contactcenterinsightsClient.createQaQuestion(request); + console.log(response); + } + + callCreateQaQuestion(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_CreateQaQuestion_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_qa_scorecard.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_qa_scorecard.js new file mode 100644 index 00000000000..719c231f994 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_qa_scorecard.js @@ -0,0 +1,74 @@ +// Copyright 2024 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, qaScorecard) { + // [START contactcenterinsights_v1_generated_ContactCenterInsights_CreateQaScorecard_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource of the QaScorecard. + */ + // const parent = 'abc123' + /** + * Required. The QaScorecard to create. + */ + // const qaScorecard = {} + /** + * Optional. A unique ID for the new QaScorecard. This ID will become the + * final component of the QaScorecard's resource name. If no ID is specified, + * a server-generated ID will be used. + * This value should be 4-64 characters and must match the regular + * expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-`. + */ + // const qaScorecardId = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callCreateQaScorecard() { + // Construct request + const request = { + parent, + qaScorecard, + }; + + // Run request + const response = await contactcenterinsightsClient.createQaScorecard(request); + console.log(response); + } + + callCreateQaScorecard(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_CreateQaScorecard_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_qa_scorecard_revision.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_qa_scorecard_revision.js new file mode 100644 index 00000000000..fd2b486590f --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_qa_scorecard_revision.js @@ -0,0 +1,74 @@ +// Copyright 2024 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, qaScorecardRevision) { + // [START contactcenterinsights_v1_generated_ContactCenterInsights_CreateQaScorecardRevision_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource of the QaScorecardRevision. + */ + // const parent = 'abc123' + /** + * Required. The QaScorecardRevision to create. + */ + // const qaScorecardRevision = {} + /** + * Optional. A unique ID for the new QaScorecardRevision. This ID will become + * the final component of the QaScorecardRevision's resource name. If no ID is + * specified, a server-generated ID will be used. + * This value should be 4-64 characters and must match the regular + * expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-`. + */ + // const qaScorecardRevisionId = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callCreateQaScorecardRevision() { + // Construct request + const request = { + parent, + qaScorecardRevision, + }; + + // Run request + const response = await contactcenterinsightsClient.createQaScorecardRevision(request); + console.log(response); + } + + callCreateQaScorecardRevision(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_CreateQaScorecardRevision_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_analysis_rule.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_analysis_rule.js new file mode 100644 index 00000000000..9eac2ca9397 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_analysis_rule.js @@ -0,0 +1,61 @@ +// Copyright 2024 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 contactcenterinsights_v1_generated_ContactCenterInsights_DeleteAnalysisRule_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 analysis rule to delete. + */ + // const name = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callDeleteAnalysisRule() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await contactcenterinsightsClient.deleteAnalysisRule(request); + console.log(response); + } + + callDeleteAnalysisRule(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_DeleteAnalysisRule_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_feedback_label.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_feedback_label.js new file mode 100644 index 00000000000..257991e10d5 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_feedback_label.js @@ -0,0 +1,61 @@ +// Copyright 2024 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 contactcenterinsights_v1_generated_ContactCenterInsights_DeleteFeedbackLabel_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 feedback label to delete. + */ + // const name = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callDeleteFeedbackLabel() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await contactcenterinsightsClient.deleteFeedbackLabel(request); + console.log(response); + } + + callDeleteFeedbackLabel(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_DeleteFeedbackLabel_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_qa_question.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_qa_question.js new file mode 100644 index 00000000000..0c21b4e16f3 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_qa_question.js @@ -0,0 +1,61 @@ +// Copyright 2024 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 contactcenterinsights_v1_generated_ContactCenterInsights_DeleteQaQuestion_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 QaQuestion to delete. + */ + // const name = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callDeleteQaQuestion() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await contactcenterinsightsClient.deleteQaQuestion(request); + console.log(response); + } + + callDeleteQaQuestion(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_DeleteQaQuestion_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_qa_scorecard.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_qa_scorecard.js new file mode 100644 index 00000000000..0bd7e36a6a3 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_qa_scorecard.js @@ -0,0 +1,66 @@ +// Copyright 2024 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 contactcenterinsights_v1_generated_ContactCenterInsights_DeleteQaScorecard_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 QaScorecard to delete. + */ + // const name = 'abc123' + /** + * Optional. If set to true, all of this QaScorecard's child resources will + * also be deleted. Otherwise, the request will only succeed if it has none. + */ + // const force = true + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callDeleteQaScorecard() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await contactcenterinsightsClient.deleteQaScorecard(request); + console.log(response); + } + + callDeleteQaScorecard(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_DeleteQaScorecard_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_qa_scorecard_revision.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_qa_scorecard_revision.js new file mode 100644 index 00000000000..f98ee4c2822 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_qa_scorecard_revision.js @@ -0,0 +1,67 @@ +// Copyright 2024 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 contactcenterinsights_v1_generated_ContactCenterInsights_DeleteQaScorecardRevision_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 QaScorecardRevision to delete. + */ + // const name = 'abc123' + /** + * Optional. If set to true, all of this QaScorecardRevision's child resources + * will also be deleted. Otherwise, the request will only succeed if it has + * none. + */ + // const force = true + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callDeleteQaScorecardRevision() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await contactcenterinsightsClient.deleteQaScorecardRevision(request); + console.log(response); + } + + callDeleteQaScorecardRevision(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_DeleteQaScorecardRevision_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.deploy_qa_scorecard_revision.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.deploy_qa_scorecard_revision.js new file mode 100644 index 00000000000..7c880d3d69d --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.deploy_qa_scorecard_revision.js @@ -0,0 +1,61 @@ +// Copyright 2024 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 contactcenterinsights_v1_generated_ContactCenterInsights_DeployQaScorecardRevision_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 QaScorecardRevision to deploy. + */ + // const name = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callDeployQaScorecardRevision() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await contactcenterinsightsClient.deployQaScorecardRevision(request); + console.log(response); + } + + callDeployQaScorecardRevision(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_DeployQaScorecardRevision_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_analysis_rule.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_analysis_rule.js new file mode 100644 index 00000000000..efce8b7e09a --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_analysis_rule.js @@ -0,0 +1,61 @@ +// Copyright 2024 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 contactcenterinsights_v1_generated_ContactCenterInsights_GetAnalysisRule_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 AnalysisRule to get. + */ + // const name = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callGetAnalysisRule() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await contactcenterinsightsClient.getAnalysisRule(request); + console.log(response); + } + + callGetAnalysisRule(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_GetAnalysisRule_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_feedback_label.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_feedback_label.js new file mode 100644 index 00000000000..c8ee11e809a --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_feedback_label.js @@ -0,0 +1,61 @@ +// Copyright 2024 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 contactcenterinsights_v1_generated_ContactCenterInsights_GetFeedbackLabel_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 feedback label to get. + */ + // const name = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callGetFeedbackLabel() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await contactcenterinsightsClient.getFeedbackLabel(request); + console.log(response); + } + + callGetFeedbackLabel(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_GetFeedbackLabel_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_qa_question.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_qa_question.js new file mode 100644 index 00000000000..512ee530efd --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_qa_question.js @@ -0,0 +1,61 @@ +// Copyright 2024 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 contactcenterinsights_v1_generated_ContactCenterInsights_GetQaQuestion_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 QaQuestion to get. + */ + // const name = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callGetQaQuestion() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await contactcenterinsightsClient.getQaQuestion(request); + console.log(response); + } + + callGetQaQuestion(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_GetQaQuestion_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_qa_scorecard.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_qa_scorecard.js new file mode 100644 index 00000000000..194624ef4a8 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_qa_scorecard.js @@ -0,0 +1,61 @@ +// Copyright 2024 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 contactcenterinsights_v1_generated_ContactCenterInsights_GetQaScorecard_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 QaScorecard to get. + */ + // const name = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callGetQaScorecard() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await contactcenterinsightsClient.getQaScorecard(request); + console.log(response); + } + + callGetQaScorecard(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_GetQaScorecard_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_qa_scorecard_revision.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_qa_scorecard_revision.js new file mode 100644 index 00000000000..48a94ae5a03 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_qa_scorecard_revision.js @@ -0,0 +1,61 @@ +// Copyright 2024 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 contactcenterinsights_v1_generated_ContactCenterInsights_GetQaScorecardRevision_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 QaScorecardRevision to get. + */ + // const name = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callGetQaScorecardRevision() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await contactcenterinsightsClient.getQaScorecardRevision(request); + console.log(response); + } + + callGetQaScorecardRevision(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_GetQaScorecardRevision_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.initialize_encryption_spec.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.initialize_encryption_spec.js index eec636de9ae..30f9d3632bb 100644 --- a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.initialize_encryption_spec.js +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.initialize_encryption_spec.js @@ -32,7 +32,7 @@ function main(encryptionSpec) { * Required. The encryption spec used for CMEK encryption. It is required that * the kms key is in the same region as the endpoint. The same key will be * used for all provisioned resources, if encryption is available. If the - * kms_key_name is left empty, no encryption will be enforced. + * `kms_key_name` field is left empty, no encryption will be enforced. */ // const encryptionSpec = {} diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_all_feedback_labels.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_all_feedback_labels.js new file mode 100644 index 00000000000..b4c8db45704 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_all_feedback_labels.js @@ -0,0 +1,90 @@ +// Copyright 2024 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 contactcenterinsights_v1_generated_ContactCenterInsights_ListAllFeedbackLabels_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource of all feedback labels per project. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of feedback labels to return in the response. + * A valid page size ranges from 0 to 100,000 inclusive. If the page size is + * zero or unspecified, a default page size of 100 will be chosen. Note that a + * call might return fewer results than the requested page size. + */ + // const pageSize = 1234 + /** + * Optional. The value returned by the last `ListAllFeedbackLabelsResponse`. + * This value indicates that this is a continuation of a prior + * `ListAllFeedbackLabels` call and that the system should return the next + * page of data. + */ + // const pageToken = 'abc123' + /** + * Optional. A filter to reduce results to a specific subset in the entire + * project. Supports disjunctions (OR) and conjunctions (AND). + * Supported fields: + * * `issue_model_id` + * * `qa_question_id` + * * `min_create_time` + * * `max_create_time` + * * `min_update_time` + * * `max_update_time` + * * `feedback_label_type`: QUALITY_AI, TOPIC_MODELING + */ + // const filter = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callListAllFeedbackLabels() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = contactcenterinsightsClient.listAllFeedbackLabelsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAllFeedbackLabels(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_ListAllFeedbackLabels_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_analysis_rules.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_analysis_rules.js new file mode 100644 index 00000000000..a2b3dc988b5 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_analysis_rules.js @@ -0,0 +1,76 @@ +// Copyright 2024 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 contactcenterinsights_v1_generated_ContactCenterInsights_ListAnalysisRules_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource of the analysis rules. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of analysis rule to return in the response. If + * this value is zero, the service will select a default size. A call may + * return fewer objects than requested. A non-empty `next_page_token` in the + * response indicates that more data is available. + */ + // const pageSize = 1234 + /** + * Optional. The value returned by the last `ListAnalysisRulesResponse`; + * indicates that this is a continuation of a prior `ListAnalysisRules` call + * and the system should return the next page of data. + */ + // const pageToken = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callListAnalysisRules() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = contactcenterinsightsClient.listAnalysisRulesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAnalysisRules(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_ListAnalysisRules_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_feedback_labels.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_feedback_labels.js new file mode 100644 index 00000000000..73faaf50dbe --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_feedback_labels.js @@ -0,0 +1,92 @@ +// Copyright 2024 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 contactcenterinsights_v1_generated_ContactCenterInsights_ListFeedbackLabels_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource of the feedback labels. + */ + // const parent = 'abc123' + /** + * Optional. A filter to reduce results to a specific subset. Supports + * disjunctions (OR) and conjunctions (AND). Automatically sorts by + * conversation ID. To sort by all feedback labels in a project see + * ListAllFeedbackLabels. + * Supported fields: + * * `issue_model_id` + * * `qa_question_id` + * * `qa_scorecard_id` + * * `min_create_time` + * * `max_create_time` + * * `min_update_time` + * * `max_update_time` + * * `feedback_label_type`: QUALITY_AI, TOPIC_MODELING + */ + // const filter = 'abc123' + /** + * Optional. The maximum number of feedback labels to return in the response. + * A valid page size ranges from 0 to 100,000 inclusive. If the page size is + * zero or unspecified, a default page size of 100 will be chosen. Note that a + * call might return fewer results than the requested page size. + */ + // const pageSize = 1234 + /** + * Optional. The value returned by the last `ListFeedbackLabelsResponse`. This + * value indicates that this is a continuation of a prior `ListFeedbackLabels` + * call and that the system should return the next page of data. + */ + // const pageToken = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callListFeedbackLabels() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = contactcenterinsightsClient.listFeedbackLabelsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListFeedbackLabels(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_ListFeedbackLabels_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_qa_questions.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_qa_questions.js new file mode 100644 index 00000000000..a50c313895b --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_qa_questions.js @@ -0,0 +1,76 @@ +// Copyright 2024 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 contactcenterinsights_v1_generated_ContactCenterInsights_ListQaQuestions_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource of the questions. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of questions to return in the response. If the + * value is zero, the service will select a default size. A call might return + * fewer objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + */ + // const pageSize = 1234 + /** + * Optional. The value returned by the last `ListQaQuestionsResponse`. This + * value indicates that this is a continuation of a prior `ListQaQuestions` + * call and that the system should return the next page of data. + */ + // const pageToken = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callListQaQuestions() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = contactcenterinsightsClient.listQaQuestionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListQaQuestions(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_ListQaQuestions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_qa_scorecard_revisions.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_qa_scorecard_revisions.js new file mode 100644 index 00000000000..da0c2c12a7e --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_qa_scorecard_revisions.js @@ -0,0 +1,84 @@ +// Copyright 2024 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 contactcenterinsights_v1_generated_ContactCenterInsights_ListQaScorecardRevisions_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource of the scorecard revisions. To list all + * revisions of all scorecards, substitute the QaScorecard ID with a '-' + * character. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of scorecard revisions to return in the + * response. If the value is zero, the service will select a default size. A + * call might return fewer objects than requested. A non-empty + * `next_page_token` in the response indicates that more data is available. + */ + // const pageSize = 1234 + /** + * Optional. The value returned by the last + * `ListQaScorecardRevisionsResponse`. This value indicates that this is a + * continuation of a prior `ListQaScorecardRevisions` call and that the system + * should return the next page of data. + */ + // const pageToken = 'abc123' + /** + * Optional. A filter to reduce results to a specific subset. Useful for + * querying scorecard revisions with specific properties. + */ + // const filter = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callListQaScorecardRevisions() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = contactcenterinsightsClient.listQaScorecardRevisionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListQaScorecardRevisions(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_ListQaScorecardRevisions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_qa_scorecards.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_qa_scorecards.js new file mode 100644 index 00000000000..2ea574f4b67 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_qa_scorecards.js @@ -0,0 +1,76 @@ +// Copyright 2024 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 contactcenterinsights_v1_generated_ContactCenterInsights_ListQaScorecards_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource of the scorecards. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of scorecards to return in the response. If + * the value is zero, the service will select a default size. A call might + * return fewer objects than requested. A non-empty `next_page_token` in the + * response indicates that more data is available. + */ + // const pageSize = 1234 + /** + * Optional. The value returned by the last `ListQaScorecardsResponse`. This + * value indicates that this is a continuation of a prior `ListQaScorecards` + * call and that the system should return the next page of data. + */ + // const pageToken = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callListQaScorecards() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = contactcenterinsightsClient.listQaScorecardsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListQaScorecards(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_ListQaScorecards_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.query_metrics.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.query_metrics.js new file mode 100644 index 00000000000..5c367ecce4d --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.query_metrics.js @@ -0,0 +1,92 @@ +// Copyright 2024 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(location, filter) { + // [START contactcenterinsights_v1_generated_ContactCenterInsights_QueryMetrics_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 location of the data. + * "projects/{project}/locations/{location}" + */ + // const location = 'abc123' + /** + * Required. Filter to select a subset of conversations to compute the + * metrics. Must specify a window of the conversation create time to compute + * the metrics. The returned metrics will be from the range DATE(starting + * create time), DATE(ending create time)). + */ + // const filter = 'abc123' + /** + * The time granularity of each data point in the time series. + * Defaults to NONE if this field is unspecified. + */ + // const timeGranularity = {} + /** + * The dimensions that determine the grouping key for the query. Defaults to + * no dimension if this field is unspecified. If a dimension is specified, + * its key must also be specified. Each dimension's key must be unique. + * If a time granularity is also specified, metric values in the dimension + * will be bucketed by this granularity. + * Up to one dimension is supported for now. + */ + // const dimensions = [1,2,3,4] + /** + * Measures to return. Defaults to all measures if this field is unspecified. + * A valid mask should traverse from the `measure` field from the response. + * For example, a path from a measure mask to get the conversation count is + * "conversation_measure.count". + */ + // const measureMask = {} + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callQueryMetrics() { + // Construct request + const request = { + location, + filter, + }; + + // Run request + const [operation] = await contactcenterinsightsClient.queryMetrics(request); + const [response] = await operation.promise(); + console.log(response); + } + + callQueryMetrics(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_QueryMetrics_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.tune_qa_scorecard_revision.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.tune_qa_scorecard_revision.js new file mode 100644 index 00000000000..63c38bef36d --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.tune_qa_scorecard_revision.js @@ -0,0 +1,78 @@ +// Copyright 2024 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, filter) { + // [START contactcenterinsights_v1_generated_ContactCenterInsights_TuneQaScorecardRevision_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource for new fine tuning job instance. + */ + // const parent = 'abc123' + /** + * Required. Filter for selecting the feedback labels that needs to be + * used for training. + * This filter can be used to limit the feedback labels used for tuning to a + * feedback labels created or updated for a specific time-window etc. + */ + // const filter = 'abc123' + /** + * Optional. Run in validate only mode, no fine tuning will actually run. + * Data quality validations like training data distributions will run. + * Even when set to false, the data quality validations will still run but + * once the validations complete we will proceed with the fine tune, if + * applicable. + */ + // const validateOnly = true + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callTuneQaScorecardRevision() { + // Construct request + const request = { + parent, + filter, + }; + + // Run request + const [operation] = await contactcenterinsightsClient.tuneQaScorecardRevision(request); + const [response] = await operation.promise(); + console.log(response); + } + + callTuneQaScorecardRevision(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_TuneQaScorecardRevision_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.undeploy_qa_scorecard_revision.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.undeploy_qa_scorecard_revision.js new file mode 100644 index 00000000000..15ba2a03da9 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.undeploy_qa_scorecard_revision.js @@ -0,0 +1,61 @@ +// Copyright 2024 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 contactcenterinsights_v1_generated_ContactCenterInsights_UndeployQaScorecardRevision_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 QaScorecardRevision to undeploy. + */ + // const name = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callUndeployQaScorecardRevision() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await contactcenterinsightsClient.undeployQaScorecardRevision(request); + console.log(response); + } + + callUndeployQaScorecardRevision(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_UndeployQaScorecardRevision_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_analysis_rule.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_analysis_rule.js new file mode 100644 index 00000000000..927f89be3f5 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_analysis_rule.js @@ -0,0 +1,67 @@ +// Copyright 2024 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(analysisRule) { + // [START contactcenterinsights_v1_generated_ContactCenterInsights_UpdateAnalysisRule_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 new analysis rule. + */ + // const analysisRule = {} + /** + * Optional. The list of fields to be updated. + * If the update_mask is not provided, the update will be applied to all + * fields. + */ + // const updateMask = {} + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callUpdateAnalysisRule() { + // Construct request + const request = { + analysisRule, + }; + + // Run request + const response = await contactcenterinsightsClient.updateAnalysisRule(request); + console.log(response); + } + + callUpdateAnalysisRule(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_UpdateAnalysisRule_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_feedback_label.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_feedback_label.js new file mode 100644 index 00000000000..ed2bdd26d61 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_feedback_label.js @@ -0,0 +1,66 @@ +// Copyright 2024 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(feedbackLabel, updateMask) { + // [START contactcenterinsights_v1_generated_ContactCenterInsights_UpdateFeedbackLabel_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 feedback label to update. + */ + // const feedbackLabel = {} + /** + * Required. The list of fields to be updated. + */ + // const updateMask = {} + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callUpdateFeedbackLabel() { + // Construct request + const request = { + feedbackLabel, + updateMask, + }; + + // Run request + const response = await contactcenterinsightsClient.updateFeedbackLabel(request); + console.log(response); + } + + callUpdateFeedbackLabel(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_UpdateFeedbackLabel_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_qa_question.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_qa_question.js new file mode 100644 index 00000000000..b43cd088284 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_qa_question.js @@ -0,0 +1,74 @@ +// Copyright 2024 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(qaQuestion, updateMask) { + // [START contactcenterinsights_v1_generated_ContactCenterInsights_UpdateQaQuestion_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 QaQuestion to update. + */ + // const qaQuestion = {} + /** + * Required. The list of fields to be updated. All possible fields can be + * updated by passing `*`, or a subset of the following updateable fields can + * be provided: + * * `abbreviation` + * * `answer_choices` + * * `answer_instructions` + * * `order` + * * `question_body` + * * `tags` + */ + // const updateMask = {} + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callUpdateQaQuestion() { + // Construct request + const request = { + qaQuestion, + updateMask, + }; + + // Run request + const response = await contactcenterinsightsClient.updateQaQuestion(request); + console.log(response); + } + + callUpdateQaQuestion(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_UpdateQaQuestion_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_qa_scorecard.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_qa_scorecard.js new file mode 100644 index 00000000000..5566a0b6cdb --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_qa_scorecard.js @@ -0,0 +1,70 @@ +// Copyright 2024 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(qaScorecard, updateMask) { + // [START contactcenterinsights_v1_generated_ContactCenterInsights_UpdateQaScorecard_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 QaScorecard to update. + */ + // const qaScorecard = {} + /** + * Required. The list of fields to be updated. All possible fields can be + * updated by passing `*`, or a subset of the following updateable fields can + * be provided: + * * `description` + * * `display_name` + */ + // const updateMask = {} + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callUpdateQaScorecard() { + // Construct request + const request = { + qaScorecard, + updateMask, + }; + + // Run request + const response = await contactcenterinsightsClient.updateQaScorecard(request); + console.log(response); + } + + callUpdateQaScorecard(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_UpdateQaScorecard_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata_google.cloud.contactcenterinsights.v1.json b/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata_google.cloud.contactcenterinsights.v1.json index 03c229302cd..ee3ce0dfd53 100644 --- a/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata_google.cloud.contactcenterinsights.v1.json +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata_google.cloud.contactcenterinsights.v1.json @@ -1639,6 +1639,222 @@ } } }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_CreateAnalysisRule_async", + "title": "ContactCenterInsights createAnalysisRule Sample", + "origin": "API_DEFINITION", + "description": " Creates a analysis rule.", + "canonical": true, + "file": "contact_center_insights.create_analysis_rule.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateAnalysisRule", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateAnalysisRule", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "analysis_rule", + "type": ".google.cloud.contactcenterinsights.v1.AnalysisRule" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.AnalysisRule", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "CreateAnalysisRule", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateAnalysisRule", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_GetAnalysisRule_async", + "title": "ContactCenterInsights getAnalysisRule Sample", + "origin": "API_DEFINITION", + "description": " Get a analysis rule.", + "canonical": true, + "file": "contact_center_insights.get_analysis_rule.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAnalysisRule", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetAnalysisRule", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.AnalysisRule", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "GetAnalysisRule", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetAnalysisRule", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_ListAnalysisRules_async", + "title": "ContactCenterInsights listAnalysisRules Sample", + "origin": "API_DEFINITION", + "description": " Lists analysis rules.", + "canonical": true, + "file": "contact_center_insights.list_analysis_rules.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAnalysisRules", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListAnalysisRules", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.ListAnalysisRulesResponse", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "ListAnalysisRules", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListAnalysisRules", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_UpdateAnalysisRule_async", + "title": "ContactCenterInsights updateAnalysisRule Sample", + "origin": "API_DEFINITION", + "description": " Updates a analysis rule.", + "canonical": true, + "file": "contact_center_insights.update_analysis_rule.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateAnalysisRule", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateAnalysisRule", + "async": true, + "parameters": [ + { + "name": "analysis_rule", + "type": ".google.cloud.contactcenterinsights.v1.AnalysisRule" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.AnalysisRule", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "UpdateAnalysisRule", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateAnalysisRule", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_DeleteAnalysisRule_async", + "title": "ContactCenterInsights deleteAnalysisRule Sample", + "origin": "API_DEFINITION", + "description": " Deletes a analysis rule.", + "canonical": true, + "file": "contact_center_insights.delete_analysis_rule.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteAnalysisRule", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteAnalysisRule", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "DeleteAnalysisRule", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteAnalysisRule", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, { "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_GetEncryptionSpec_async", "title": "ContactCenterInsights getEncryptionSpec Sample", @@ -1683,7 +1899,7 @@ "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_InitializeEncryptionSpec_async", "title": "ContactCenterInsights initializeEncryptionSpec Sample", "origin": "API_DEFINITION", - "description": " Initializes a location-level encryption key specification. An error will be thrown if the location has resources already created before the initialization. Once the encryption specification is initialized at a location, it is immutable and all newly created resources under the location will be encrypted with the existing specification.", + "description": " Initializes a location-level encryption key specification. An error will result if the location has resources already created before the initialization. After the encryption specification is initialized at a location, it is immutable and all newly created resources under the location will be encrypted with the existing specification.", "canonical": true, "file": "contact_center_insights.initialize_encryption_spec.js", "language": "JAVASCRIPT", @@ -1934,6 +2150,1206 @@ } } } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_QueryMetrics_async", + "title": "ContactCenterInsights queryMetrics Sample", + "origin": "API_DEFINITION", + "description": " Query metrics.", + "canonical": true, + "file": "contact_center_insights.query_metrics.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 84, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "QueryMetrics", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.QueryMetrics", + "async": true, + "parameters": [ + { + "name": "location", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "time_granularity", + "type": ".google.cloud.contactcenterinsights.v1.QueryMetricsRequest.TimeGranularity" + }, + { + "name": "dimensions", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "measure_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "QueryMetrics", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.QueryMetrics", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_CreateQaQuestion_async", + "title": "ContactCenterInsights createQaQuestion Sample", + "origin": "API_DEFINITION", + "description": " Create a QaQuestion.", + "canonical": true, + "file": "contact_center_insights.create_qa_question.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateQaQuestion", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateQaQuestion", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "qa_question", + "type": ".google.cloud.contactcenterinsights.v1.QaQuestion" + }, + { + "name": "qa_question_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.QaQuestion", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "CreateQaQuestion", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateQaQuestion", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_GetQaQuestion_async", + "title": "ContactCenterInsights getQaQuestion Sample", + "origin": "API_DEFINITION", + "description": " Gets a QaQuestion.", + "canonical": true, + "file": "contact_center_insights.get_qa_question.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetQaQuestion", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetQaQuestion", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.QaQuestion", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "GetQaQuestion", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetQaQuestion", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_UpdateQaQuestion_async", + "title": "ContactCenterInsights updateQaQuestion Sample", + "origin": "API_DEFINITION", + "description": " Updates a QaQuestion.", + "canonical": true, + "file": "contact_center_insights.update_qa_question.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateQaQuestion", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateQaQuestion", + "async": true, + "parameters": [ + { + "name": "qa_question", + "type": ".google.cloud.contactcenterinsights.v1.QaQuestion" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.QaQuestion", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "UpdateQaQuestion", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateQaQuestion", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_DeleteQaQuestion_async", + "title": "ContactCenterInsights deleteQaQuestion Sample", + "origin": "API_DEFINITION", + "description": " Deletes a QaQuestion.", + "canonical": true, + "file": "contact_center_insights.delete_qa_question.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteQaQuestion", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteQaQuestion", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "DeleteQaQuestion", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteQaQuestion", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_ListQaQuestions_async", + "title": "ContactCenterInsights listQaQuestions Sample", + "origin": "API_DEFINITION", + "description": " Lists QaQuestions.", + "canonical": true, + "file": "contact_center_insights.list_qa_questions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListQaQuestions", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListQaQuestions", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.ListQaQuestionsResponse", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "ListQaQuestions", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListQaQuestions", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_CreateQaScorecard_async", + "title": "ContactCenterInsights createQaScorecard Sample", + "origin": "API_DEFINITION", + "description": " Create a QaScorecard.", + "canonical": true, + "file": "contact_center_insights.create_qa_scorecard.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateQaScorecard", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateQaScorecard", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "qa_scorecard", + "type": ".google.cloud.contactcenterinsights.v1.QaScorecard" + }, + { + "name": "qa_scorecard_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.QaScorecard", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "CreateQaScorecard", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateQaScorecard", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_GetQaScorecard_async", + "title": "ContactCenterInsights getQaScorecard Sample", + "origin": "API_DEFINITION", + "description": " Gets a QaScorecard.", + "canonical": true, + "file": "contact_center_insights.get_qa_scorecard.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetQaScorecard", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetQaScorecard", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.QaScorecard", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "GetQaScorecard", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetQaScorecard", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_UpdateQaScorecard_async", + "title": "ContactCenterInsights updateQaScorecard Sample", + "origin": "API_DEFINITION", + "description": " Updates a QaScorecard.", + "canonical": true, + "file": "contact_center_insights.update_qa_scorecard.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateQaScorecard", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateQaScorecard", + "async": true, + "parameters": [ + { + "name": "qa_scorecard", + "type": ".google.cloud.contactcenterinsights.v1.QaScorecard" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.QaScorecard", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "UpdateQaScorecard", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateQaScorecard", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_DeleteQaScorecard_async", + "title": "ContactCenterInsights deleteQaScorecard Sample", + "origin": "API_DEFINITION", + "description": " Deletes a QaScorecard.", + "canonical": true, + "file": "contact_center_insights.delete_qa_scorecard.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteQaScorecard", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteQaScorecard", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "DeleteQaScorecard", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteQaScorecard", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_ListQaScorecards_async", + "title": "ContactCenterInsights listQaScorecards Sample", + "origin": "API_DEFINITION", + "description": " Lists QaScorecards.", + "canonical": true, + "file": "contact_center_insights.list_qa_scorecards.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListQaScorecards", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListQaScorecards", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.ListQaScorecardsResponse", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "ListQaScorecards", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListQaScorecards", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_CreateQaScorecardRevision_async", + "title": "ContactCenterInsights createQaScorecardRevision Sample", + "origin": "API_DEFINITION", + "description": " Creates a QaScorecardRevision.", + "canonical": true, + "file": "contact_center_insights.create_qa_scorecard_revision.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateQaScorecardRevision", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateQaScorecardRevision", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "qa_scorecard_revision", + "type": ".google.cloud.contactcenterinsights.v1.QaScorecardRevision" + }, + { + "name": "qa_scorecard_revision_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.QaScorecardRevision", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "CreateQaScorecardRevision", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateQaScorecardRevision", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_GetQaScorecardRevision_async", + "title": "ContactCenterInsights getQaScorecardRevision Sample", + "origin": "API_DEFINITION", + "description": " Gets a QaScorecardRevision.", + "canonical": true, + "file": "contact_center_insights.get_qa_scorecard_revision.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetQaScorecardRevision", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetQaScorecardRevision", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.QaScorecardRevision", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "GetQaScorecardRevision", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetQaScorecardRevision", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_TuneQaScorecardRevision_async", + "title": "ContactCenterInsights tuneQaScorecardRevision Sample", + "origin": "API_DEFINITION", + "description": " Fine tune one or more QaModels.", + "canonical": true, + "file": "contact_center_insights.tune_qa_scorecard_revision.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "TuneQaScorecardRevision", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.TuneQaScorecardRevision", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "TuneQaScorecardRevision", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.TuneQaScorecardRevision", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_DeployQaScorecardRevision_async", + "title": "ContactCenterInsights deployQaScorecardRevision Sample", + "origin": "API_DEFINITION", + "description": " Deploy a QaScorecardRevision.", + "canonical": true, + "file": "contact_center_insights.deploy_qa_scorecard_revision.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeployQaScorecardRevision", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeployQaScorecardRevision", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.QaScorecardRevision", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "DeployQaScorecardRevision", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeployQaScorecardRevision", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_UndeployQaScorecardRevision_async", + "title": "ContactCenterInsights undeployQaScorecardRevision Sample", + "origin": "API_DEFINITION", + "description": " Undeploy a QaScorecardRevision.", + "canonical": true, + "file": "contact_center_insights.undeploy_qa_scorecard_revision.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UndeployQaScorecardRevision", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.UndeployQaScorecardRevision", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.QaScorecardRevision", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "UndeployQaScorecardRevision", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.UndeployQaScorecardRevision", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_DeleteQaScorecardRevision_async", + "title": "ContactCenterInsights deleteQaScorecardRevision Sample", + "origin": "API_DEFINITION", + "description": " Deletes a QaScorecardRevision.", + "canonical": true, + "file": "contact_center_insights.delete_qa_scorecard_revision.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteQaScorecardRevision", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteQaScorecardRevision", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "DeleteQaScorecardRevision", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteQaScorecardRevision", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_ListQaScorecardRevisions_async", + "title": "ContactCenterInsights listQaScorecardRevisions Sample", + "origin": "API_DEFINITION", + "description": " Lists all revisions under the parent QaScorecard.", + "canonical": true, + "file": "contact_center_insights.list_qa_scorecard_revisions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListQaScorecardRevisions", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListQaScorecardRevisions", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsResponse", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "ListQaScorecardRevisions", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListQaScorecardRevisions", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_CreateFeedbackLabel_async", + "title": "ContactCenterInsights createFeedbackLabel Sample", + "origin": "API_DEFINITION", + "description": " Create feedback label.", + "canonical": true, + "file": "contact_center_insights.create_feedback_label.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateFeedbackLabel", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateFeedbackLabel", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "feedback_label_id", + "type": "TYPE_STRING" + }, + { + "name": "feedback_label", + "type": ".google.cloud.contactcenterinsights.v1.FeedbackLabel" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.FeedbackLabel", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "CreateFeedbackLabel", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateFeedbackLabel", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_ListFeedbackLabels_async", + "title": "ContactCenterInsights listFeedbackLabels Sample", + "origin": "API_DEFINITION", + "description": " List feedback labels.", + "canonical": true, + "file": "contact_center_insights.list_feedback_labels.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 84, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListFeedbackLabels", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListFeedbackLabels", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.ListFeedbackLabelsResponse", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "ListFeedbackLabels", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListFeedbackLabels", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_GetFeedbackLabel_async", + "title": "ContactCenterInsights getFeedbackLabel Sample", + "origin": "API_DEFINITION", + "description": " Get feedback label.", + "canonical": true, + "file": "contact_center_insights.get_feedback_label.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetFeedbackLabel", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetFeedbackLabel", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.FeedbackLabel", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "GetFeedbackLabel", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetFeedbackLabel", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_UpdateFeedbackLabel_async", + "title": "ContactCenterInsights updateFeedbackLabel Sample", + "origin": "API_DEFINITION", + "description": " Update feedback label.", + "canonical": true, + "file": "contact_center_insights.update_feedback_label.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateFeedbackLabel", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateFeedbackLabel", + "async": true, + "parameters": [ + { + "name": "feedback_label", + "type": ".google.cloud.contactcenterinsights.v1.FeedbackLabel" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.FeedbackLabel", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "UpdateFeedbackLabel", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateFeedbackLabel", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_DeleteFeedbackLabel_async", + "title": "ContactCenterInsights deleteFeedbackLabel Sample", + "origin": "API_DEFINITION", + "description": " Delete feedback label.", + "canonical": true, + "file": "contact_center_insights.delete_feedback_label.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteFeedbackLabel", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteFeedbackLabel", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "DeleteFeedbackLabel", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteFeedbackLabel", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_ListAllFeedbackLabels_async", + "title": "ContactCenterInsights listAllFeedbackLabels Sample", + "origin": "API_DEFINITION", + "description": " List all feedback labels by project number.", + "canonical": true, + "file": "contact_center_insights.list_all_feedback_labels.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 82, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAllFeedbackLabels", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListAllFeedbackLabels", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsResponse", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "ListAllFeedbackLabels", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListAllFeedbackLabels", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_BulkUploadFeedbackLabels_async", + "title": "ContactCenterInsights bulkUploadFeedbackLabels Sample", + "origin": "API_DEFINITION", + "description": " Upload feedback labels in bulk.", + "canonical": true, + "file": "contact_center_insights.bulk_upload_feedback_labels.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BulkUploadFeedbackLabels", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.BulkUploadFeedbackLabels", + "async": true, + "parameters": [ + { + "name": "gcs_source", + "type": ".google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource" + }, + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "BulkUploadFeedbackLabels", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.BulkUploadFeedbackLabels", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_BulkDownloadFeedbackLabels_async", + "title": "ContactCenterInsights bulkDownloadFeedbackLabels Sample", + "origin": "API_DEFINITION", + "description": " Download feedback labels in bulk.", + "canonical": true, + "file": "contact_center_insights.bulk_download_feedback_labels.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 95, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BulkDownloadFeedbackLabels", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.BulkDownloadFeedbackLabels", + "async": true, + "parameters": [ + { + "name": "gcs_destination", + "type": ".google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination" + }, + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "max_download_count", + "type": "TYPE_INT32" + }, + { + "name": "feedback_label_type", + "type": ".google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.FeedbackLabelType" + }, + { + "name": "conversation_filter", + "type": "TYPE_STRING" + }, + { + "name": "template_qa_scorecard_id", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "BulkDownloadFeedbackLabels", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.BulkDownloadFeedbackLabels", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } } ] } \ No newline at end of file diff --git a/packages/google-cloud-contactcenterinsights/src/v1/contact_center_insights_client.ts b/packages/google-cloud-contactcenterinsights/src/v1/contact_center_insights_client.ts index 1ccbfbd1d80..33568873fc0 100644 --- a/packages/google-cloud-contactcenterinsights/src/v1/contact_center_insights_client.ts +++ b/packages/google-cloud-contactcenterinsights/src/v1/contact_center_insights_client.ts @@ -27,6 +27,8 @@ import type { LROperation, PaginationCallback, GaxCall, + IamClient, + IamProtos, } from 'google-gax'; import {Transform} from 'stream'; import * as protos from '../../protos/protos'; @@ -64,6 +66,7 @@ export class ContactCenterInsightsClient { }; warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; + iamClient: IamClient; pathTemplates: {[name: string]: gax.PathTemplate}; operationsClient: gax.OperationsClient; contactCenterInsightsStub?: Promise<{[name: string]: Function}>; @@ -180,6 +183,7 @@ export class ContactCenterInsightsClient { if (servicePath === this._servicePath) { this.auth.defaultScopes = staticMembers.scopes; } + this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts); // Determine the client header string. const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; @@ -206,12 +210,18 @@ export class ContactCenterInsightsClient { analysisPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/conversations/{conversation}/analyses/{analysis}' ), + analysisRulePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/analysisRules/{analysis_rule}' + ), conversationPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/conversations/{conversation}' ), encryptionSpecPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/encryptionSpec' ), + feedbackLabelPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/conversations/{conversation}/feedbackLabels/{feedback_label}' + ), issuePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue}' ), @@ -224,6 +234,18 @@ export class ContactCenterInsightsClient { phraseMatcherPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher}' ), + qaQuestionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/qaScorecards/{qa_scorecard}/revisions/{revision}/qaQuestions/{qa_question}' + ), + qaScorecardPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/qaScorecards/{qa_scorecard}' + ), + qaScorecardResultPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/qaScorecardResults/{qa_scorecard_result}' + ), + qaScorecardRevisionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/qaScorecards/{qa_scorecard}/revisions/{revision}' + ), settingsPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/settings' ), @@ -251,11 +273,41 @@ export class ContactCenterInsightsClient { 'nextPageToken', 'phraseMatchers' ), + listAnalysisRules: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'analysisRules' + ), listViews: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', 'views' ), + listQaQuestions: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'qaQuestions' + ), + listQaScorecards: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'qaScorecards' + ), + listQaScorecardRevisions: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'qaScorecardRevisions' + ), + listFeedbackLabels: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'feedbackLabels' + ), + listAllFeedbackLabels: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'feedbackLabels' + ), }; const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); @@ -364,6 +416,30 @@ export class ContactCenterInsightsClient { const initializeEncryptionSpecMetadata = protoFilesRoot.lookup( '.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata' ) as gax.protobuf.Type; + const queryMetricsResponse = protoFilesRoot.lookup( + '.google.cloud.contactcenterinsights.v1.QueryMetricsResponse' + ) as gax.protobuf.Type; + const queryMetricsMetadata = protoFilesRoot.lookup( + '.google.cloud.contactcenterinsights.v1.QueryMetricsMetadata' + ) as gax.protobuf.Type; + const tuneQaScorecardRevisionResponse = protoFilesRoot.lookup( + '.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionResponse' + ) as gax.protobuf.Type; + const tuneQaScorecardRevisionMetadata = protoFilesRoot.lookup( + '.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata' + ) as gax.protobuf.Type; + const bulkUploadFeedbackLabelsResponse = protoFilesRoot.lookup( + '.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsResponse' + ) as gax.protobuf.Type; + const bulkUploadFeedbackLabelsMetadata = protoFilesRoot.lookup( + '.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata' + ) as gax.protobuf.Type; + const bulkDownloadFeedbackLabelsResponse = protoFilesRoot.lookup( + '.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsResponse' + ) as gax.protobuf.Type; + const bulkDownloadFeedbackLabelsMetadata = protoFilesRoot.lookup( + '.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata' + ) as gax.protobuf.Type; this.descriptors.longrunning = { uploadConversation: new this._gaxModule.LongrunningDescriptor( @@ -443,6 +519,38 @@ export class ContactCenterInsightsClient { initializeEncryptionSpecMetadata ) ), + queryMetrics: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + queryMetricsResponse.decode.bind(queryMetricsResponse), + queryMetricsMetadata.decode.bind(queryMetricsMetadata) + ), + tuneQaScorecardRevision: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + tuneQaScorecardRevisionResponse.decode.bind( + tuneQaScorecardRevisionResponse + ), + tuneQaScorecardRevisionMetadata.decode.bind( + tuneQaScorecardRevisionMetadata + ) + ), + bulkUploadFeedbackLabels: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + bulkUploadFeedbackLabelsResponse.decode.bind( + bulkUploadFeedbackLabelsResponse + ), + bulkUploadFeedbackLabelsMetadata.decode.bind( + bulkUploadFeedbackLabelsMetadata + ) + ), + bulkDownloadFeedbackLabels: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + bulkDownloadFeedbackLabelsResponse.decode.bind( + bulkDownloadFeedbackLabelsResponse + ), + bulkDownloadFeedbackLabelsMetadata.decode.bind( + bulkDownloadFeedbackLabelsMetadata + ) + ), }; // Put together the default options sent with requests. @@ -532,6 +640,11 @@ export class ContactCenterInsightsClient { 'calculateStats', 'getSettings', 'updateSettings', + 'createAnalysisRule', + 'getAnalysisRule', + 'listAnalysisRules', + 'updateAnalysisRule', + 'deleteAnalysisRule', 'getEncryptionSpec', 'initializeEncryptionSpec', 'createView', @@ -539,6 +652,32 @@ export class ContactCenterInsightsClient { 'listViews', 'updateView', 'deleteView', + 'queryMetrics', + 'createQaQuestion', + 'getQaQuestion', + 'updateQaQuestion', + 'deleteQaQuestion', + 'listQaQuestions', + 'createQaScorecard', + 'getQaScorecard', + 'updateQaScorecard', + 'deleteQaScorecard', + 'listQaScorecards', + 'createQaScorecardRevision', + 'getQaScorecardRevision', + 'tuneQaScorecardRevision', + 'deployQaScorecardRevision', + 'undeployQaScorecardRevision', + 'deleteQaScorecardRevision', + 'listQaScorecardRevisions', + 'createFeedbackLabel', + 'listFeedbackLabels', + 'getFeedbackLabel', + 'updateFeedbackLabel', + 'deleteFeedbackLabel', + 'listAllFeedbackLabels', + 'bulkUploadFeedbackLabels', + 'bulkDownloadFeedbackLabels', ]; for (const methodName of contactCenterInsightsStubMethods) { const callPromise = this.contactCenterInsightsStub.then( @@ -2719,78 +2858,83 @@ export class ContactCenterInsightsClient { return this.innerApiCalls.updateSettings(request, options, callback); } /** - * Gets location-level encryption key specification. + * Creates a analysis rule. * * @param {Object} request * The request object that will be sent. - * @param {string} request.name - * Required. The name of the encryption spec resource to get. + * @param {string} request.parent + * Required. The parent resource of the analysis rule. Required. The location + * to create a analysis rule for. Format: `projects//locations/` or `projects//locations/` + * @param {google.cloud.contactcenterinsights.v1.AnalysisRule} request.analysisRule + * Required. The analysis rule resource to create. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.contactcenterinsights.v1.EncryptionSpec|EncryptionSpec}. + * The first element of the array is an object representing {@link protos.google.cloud.contactcenterinsights.v1.AnalysisRule|AnalysisRule}. * 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/v1/contact_center_insights.get_encryption_spec.js - * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_GetEncryptionSpec_async + * @example include:samples/generated/v1/contact_center_insights.create_analysis_rule.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_CreateAnalysisRule_async */ - getEncryptionSpec( - request?: protos.google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest, + createAnalysisRule( + request?: protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisRuleRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.contactcenterinsights.v1.IEncryptionSpec, + protos.google.cloud.contactcenterinsights.v1.IAnalysisRule, ( - | protos.google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest + | protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisRuleRequest | undefined ), {} | undefined, ] >; - getEncryptionSpec( - request: protos.google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest, + createAnalysisRule( + request: protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisRuleRequest, options: CallOptions, callback: Callback< - protos.google.cloud.contactcenterinsights.v1.IEncryptionSpec, - | protos.google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest + protos.google.cloud.contactcenterinsights.v1.IAnalysisRule, + | protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisRuleRequest | null | undefined, {} | null | undefined > ): void; - getEncryptionSpec( - request: protos.google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest, + createAnalysisRule( + request: protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisRuleRequest, callback: Callback< - protos.google.cloud.contactcenterinsights.v1.IEncryptionSpec, - | protos.google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest + protos.google.cloud.contactcenterinsights.v1.IAnalysisRule, + | protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisRuleRequest | null | undefined, {} | null | undefined > ): void; - getEncryptionSpec( - request?: protos.google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest, + createAnalysisRule( + request?: protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisRuleRequest, optionsOrCallback?: | CallOptions | Callback< - protos.google.cloud.contactcenterinsights.v1.IEncryptionSpec, - | protos.google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest + protos.google.cloud.contactcenterinsights.v1.IAnalysisRule, + | protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisRuleRequest | null | undefined, {} | null | undefined >, callback?: Callback< - protos.google.cloud.contactcenterinsights.v1.IEncryptionSpec, - | protos.google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest + protos.google.cloud.contactcenterinsights.v1.IAnalysisRule, + | protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisRuleRequest | null | undefined, {} | null | undefined > ): Promise< [ - protos.google.cloud.contactcenterinsights.v1.IEncryptionSpec, + protos.google.cloud.contactcenterinsights.v1.IAnalysisRule, ( - | protos.google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest + | protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisRuleRequest | undefined ), {} | undefined, @@ -2809,89 +2953,84 @@ export class ContactCenterInsightsClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', + parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.getEncryptionSpec(request, options, callback); + return this.innerApiCalls.createAnalysisRule(request, options, callback); } /** - * Creates a view. + * Get a analysis rule. * * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource of the view. Required. The location to create - * a view for. - * Format: `projects//locations/` or - * `projects//locations/` - * @param {google.cloud.contactcenterinsights.v1.View} request.view - * Required. The view resource to create. + * @param {string} request.name + * Required. The name of the AnalysisRule to get. * @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.contactcenterinsights.v1.View|View}. + * The first element of the array is an object representing {@link protos.google.cloud.contactcenterinsights.v1.AnalysisRule|AnalysisRule}. * 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/v1/contact_center_insights.create_view.js - * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_CreateView_async + * @example include:samples/generated/v1/contact_center_insights.get_analysis_rule.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_GetAnalysisRule_async */ - createView( - request?: protos.google.cloud.contactcenterinsights.v1.ICreateViewRequest, + getAnalysisRule( + request?: protos.google.cloud.contactcenterinsights.v1.IGetAnalysisRuleRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.contactcenterinsights.v1.IView, + protos.google.cloud.contactcenterinsights.v1.IAnalysisRule, ( - | protos.google.cloud.contactcenterinsights.v1.ICreateViewRequest + | protos.google.cloud.contactcenterinsights.v1.IGetAnalysisRuleRequest | undefined ), {} | undefined, ] >; - createView( - request: protos.google.cloud.contactcenterinsights.v1.ICreateViewRequest, + getAnalysisRule( + request: protos.google.cloud.contactcenterinsights.v1.IGetAnalysisRuleRequest, options: CallOptions, callback: Callback< - protos.google.cloud.contactcenterinsights.v1.IView, - | protos.google.cloud.contactcenterinsights.v1.ICreateViewRequest + protos.google.cloud.contactcenterinsights.v1.IAnalysisRule, + | protos.google.cloud.contactcenterinsights.v1.IGetAnalysisRuleRequest | null | undefined, {} | null | undefined > ): void; - createView( - request: protos.google.cloud.contactcenterinsights.v1.ICreateViewRequest, + getAnalysisRule( + request: protos.google.cloud.contactcenterinsights.v1.IGetAnalysisRuleRequest, callback: Callback< - protos.google.cloud.contactcenterinsights.v1.IView, - | protos.google.cloud.contactcenterinsights.v1.ICreateViewRequest + protos.google.cloud.contactcenterinsights.v1.IAnalysisRule, + | protos.google.cloud.contactcenterinsights.v1.IGetAnalysisRuleRequest | null | undefined, {} | null | undefined > ): void; - createView( - request?: protos.google.cloud.contactcenterinsights.v1.ICreateViewRequest, + getAnalysisRule( + request?: protos.google.cloud.contactcenterinsights.v1.IGetAnalysisRuleRequest, optionsOrCallback?: | CallOptions | Callback< - protos.google.cloud.contactcenterinsights.v1.IView, - | protos.google.cloud.contactcenterinsights.v1.ICreateViewRequest + protos.google.cloud.contactcenterinsights.v1.IAnalysisRule, + | protos.google.cloud.contactcenterinsights.v1.IGetAnalysisRuleRequest | null | undefined, {} | null | undefined >, callback?: Callback< - protos.google.cloud.contactcenterinsights.v1.IView, - | protos.google.cloud.contactcenterinsights.v1.ICreateViewRequest + protos.google.cloud.contactcenterinsights.v1.IAnalysisRule, + | protos.google.cloud.contactcenterinsights.v1.IGetAnalysisRuleRequest | null | undefined, {} | null | undefined > ): Promise< [ - protos.google.cloud.contactcenterinsights.v1.IView, + protos.google.cloud.contactcenterinsights.v1.IAnalysisRule, ( - | protos.google.cloud.contactcenterinsights.v1.ICreateViewRequest + | protos.google.cloud.contactcenterinsights.v1.IGetAnalysisRuleRequest | undefined ), {} | undefined, @@ -2910,80 +3049,90 @@ export class ContactCenterInsightsClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', + name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.createView(request, options, callback); + return this.innerApiCalls.getAnalysisRule(request, options, callback); } /** - * Gets a view. + * Updates a analysis rule. * * @param {Object} request * The request object that will be sent. - * @param {string} request.name - * Required. The name of the view to get. + * @param {google.cloud.contactcenterinsights.v1.AnalysisRule} request.analysisRule + * Required. The new analysis rule. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. The list of fields to be updated. + * If the update_mask is not provided, the update will be applied to all + * fields. * @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.contactcenterinsights.v1.View|View}. + * The first element of the array is an object representing {@link protos.google.cloud.contactcenterinsights.v1.AnalysisRule|AnalysisRule}. * 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/v1/contact_center_insights.get_view.js - * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_GetView_async + * @example include:samples/generated/v1/contact_center_insights.update_analysis_rule.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_UpdateAnalysisRule_async */ - getView( - request?: protos.google.cloud.contactcenterinsights.v1.IGetViewRequest, + updateAnalysisRule( + request?: protos.google.cloud.contactcenterinsights.v1.IUpdateAnalysisRuleRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.contactcenterinsights.v1.IView, - protos.google.cloud.contactcenterinsights.v1.IGetViewRequest | undefined, + protos.google.cloud.contactcenterinsights.v1.IAnalysisRule, + ( + | protos.google.cloud.contactcenterinsights.v1.IUpdateAnalysisRuleRequest + | undefined + ), {} | undefined, ] >; - getView( - request: protos.google.cloud.contactcenterinsights.v1.IGetViewRequest, + updateAnalysisRule( + request: protos.google.cloud.contactcenterinsights.v1.IUpdateAnalysisRuleRequest, options: CallOptions, callback: Callback< - protos.google.cloud.contactcenterinsights.v1.IView, - | protos.google.cloud.contactcenterinsights.v1.IGetViewRequest + protos.google.cloud.contactcenterinsights.v1.IAnalysisRule, + | protos.google.cloud.contactcenterinsights.v1.IUpdateAnalysisRuleRequest | null | undefined, {} | null | undefined > ): void; - getView( - request: protos.google.cloud.contactcenterinsights.v1.IGetViewRequest, + updateAnalysisRule( + request: protos.google.cloud.contactcenterinsights.v1.IUpdateAnalysisRuleRequest, callback: Callback< - protos.google.cloud.contactcenterinsights.v1.IView, - | protos.google.cloud.contactcenterinsights.v1.IGetViewRequest + protos.google.cloud.contactcenterinsights.v1.IAnalysisRule, + | protos.google.cloud.contactcenterinsights.v1.IUpdateAnalysisRuleRequest | null | undefined, {} | null | undefined > ): void; - getView( - request?: protos.google.cloud.contactcenterinsights.v1.IGetViewRequest, + updateAnalysisRule( + request?: protos.google.cloud.contactcenterinsights.v1.IUpdateAnalysisRuleRequest, optionsOrCallback?: | CallOptions | Callback< - protos.google.cloud.contactcenterinsights.v1.IView, - | protos.google.cloud.contactcenterinsights.v1.IGetViewRequest + protos.google.cloud.contactcenterinsights.v1.IAnalysisRule, + | protos.google.cloud.contactcenterinsights.v1.IUpdateAnalysisRuleRequest | null | undefined, {} | null | undefined >, callback?: Callback< - protos.google.cloud.contactcenterinsights.v1.IView, - | protos.google.cloud.contactcenterinsights.v1.IGetViewRequest + protos.google.cloud.contactcenterinsights.v1.IAnalysisRule, + | protos.google.cloud.contactcenterinsights.v1.IUpdateAnalysisRuleRequest | null | undefined, {} | null | undefined > ): Promise< [ - protos.google.cloud.contactcenterinsights.v1.IView, - protos.google.cloud.contactcenterinsights.v1.IGetViewRequest | undefined, + protos.google.cloud.contactcenterinsights.v1.IAnalysisRule, + ( + | protos.google.cloud.contactcenterinsights.v1.IUpdateAnalysisRuleRequest + | undefined + ), {} | undefined, ] > | void { @@ -3000,86 +3149,84 @@ export class ContactCenterInsightsClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', + 'analysis_rule.name': request.analysisRule!.name ?? '', }); this.initialize(); - return this.innerApiCalls.getView(request, options, callback); + return this.innerApiCalls.updateAnalysisRule(request, options, callback); } /** - * Updates a view. + * Deletes a analysis rule. * * @param {Object} request * The request object that will be sent. - * @param {google.cloud.contactcenterinsights.v1.View} request.view - * Required. The new view. - * @param {google.protobuf.FieldMask} request.updateMask - * The list of fields to be updated. + * @param {string} request.name + * Required. The name of the analysis rule to delete. * @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.contactcenterinsights.v1.View|View}. + * 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/v1/contact_center_insights.update_view.js - * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_UpdateView_async + * @example include:samples/generated/v1/contact_center_insights.delete_analysis_rule.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_DeleteAnalysisRule_async */ - updateView( - request?: protos.google.cloud.contactcenterinsights.v1.IUpdateViewRequest, + deleteAnalysisRule( + request?: protos.google.cloud.contactcenterinsights.v1.IDeleteAnalysisRuleRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.contactcenterinsights.v1.IView, + protos.google.protobuf.IEmpty, ( - | protos.google.cloud.contactcenterinsights.v1.IUpdateViewRequest + | protos.google.cloud.contactcenterinsights.v1.IDeleteAnalysisRuleRequest | undefined ), {} | undefined, ] >; - updateView( - request: protos.google.cloud.contactcenterinsights.v1.IUpdateViewRequest, + deleteAnalysisRule( + request: protos.google.cloud.contactcenterinsights.v1.IDeleteAnalysisRuleRequest, options: CallOptions, callback: Callback< - protos.google.cloud.contactcenterinsights.v1.IView, - | protos.google.cloud.contactcenterinsights.v1.IUpdateViewRequest + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteAnalysisRuleRequest | null | undefined, {} | null | undefined > ): void; - updateView( - request: protos.google.cloud.contactcenterinsights.v1.IUpdateViewRequest, + deleteAnalysisRule( + request: protos.google.cloud.contactcenterinsights.v1.IDeleteAnalysisRuleRequest, callback: Callback< - protos.google.cloud.contactcenterinsights.v1.IView, - | protos.google.cloud.contactcenterinsights.v1.IUpdateViewRequest + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteAnalysisRuleRequest | null | undefined, {} | null | undefined > ): void; - updateView( - request?: protos.google.cloud.contactcenterinsights.v1.IUpdateViewRequest, + deleteAnalysisRule( + request?: protos.google.cloud.contactcenterinsights.v1.IDeleteAnalysisRuleRequest, optionsOrCallback?: | CallOptions | Callback< - protos.google.cloud.contactcenterinsights.v1.IView, - | protos.google.cloud.contactcenterinsights.v1.IUpdateViewRequest + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteAnalysisRuleRequest | null | undefined, {} | null | undefined >, callback?: Callback< - protos.google.cloud.contactcenterinsights.v1.IView, - | protos.google.cloud.contactcenterinsights.v1.IUpdateViewRequest + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteAnalysisRuleRequest | null | undefined, {} | null | undefined > ): Promise< [ - protos.google.cloud.contactcenterinsights.v1.IView, + protos.google.protobuf.IEmpty, ( - | protos.google.cloud.contactcenterinsights.v1.IUpdateViewRequest + | protos.google.cloud.contactcenterinsights.v1.IDeleteAnalysisRuleRequest | undefined ), {} | undefined, @@ -3098,84 +3245,84 @@ export class ContactCenterInsightsClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - 'view.name': request.view!.name ?? '', + name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.updateView(request, options, callback); + return this.innerApiCalls.deleteAnalysisRule(request, options, callback); } /** - * Deletes a view. + * Gets location-level encryption key specification. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The name of the view to delete. + * Required. The name of the encryption spec resource to get. * @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}. + * The first element of the array is an object representing {@link protos.google.cloud.contactcenterinsights.v1.EncryptionSpec|EncryptionSpec}. * 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/v1/contact_center_insights.delete_view.js - * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_DeleteView_async + * @example include:samples/generated/v1/contact_center_insights.get_encryption_spec.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_GetEncryptionSpec_async */ - deleteView( - request?: protos.google.cloud.contactcenterinsights.v1.IDeleteViewRequest, + getEncryptionSpec( + request?: protos.google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest, options?: CallOptions ): Promise< [ - protos.google.protobuf.IEmpty, + protos.google.cloud.contactcenterinsights.v1.IEncryptionSpec, ( - | protos.google.cloud.contactcenterinsights.v1.IDeleteViewRequest + | protos.google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest | undefined ), {} | undefined, ] >; - deleteView( - request: protos.google.cloud.contactcenterinsights.v1.IDeleteViewRequest, + getEncryptionSpec( + request: protos.google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest, options: CallOptions, callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.contactcenterinsights.v1.IDeleteViewRequest + protos.google.cloud.contactcenterinsights.v1.IEncryptionSpec, + | protos.google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest | null | undefined, {} | null | undefined > ): void; - deleteView( - request: protos.google.cloud.contactcenterinsights.v1.IDeleteViewRequest, + getEncryptionSpec( + request: protos.google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest, callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.contactcenterinsights.v1.IDeleteViewRequest + protos.google.cloud.contactcenterinsights.v1.IEncryptionSpec, + | protos.google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest | null | undefined, {} | null | undefined > ): void; - deleteView( - request?: protos.google.cloud.contactcenterinsights.v1.IDeleteViewRequest, + getEncryptionSpec( + request?: protos.google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest, optionsOrCallback?: | CallOptions | Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.contactcenterinsights.v1.IDeleteViewRequest + protos.google.cloud.contactcenterinsights.v1.IEncryptionSpec, + | protos.google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest | null | undefined, {} | null | undefined >, callback?: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.contactcenterinsights.v1.IDeleteViewRequest + protos.google.cloud.contactcenterinsights.v1.IEncryptionSpec, + | protos.google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest | null | undefined, {} | null | undefined > ): Promise< [ - protos.google.protobuf.IEmpty, + protos.google.cloud.contactcenterinsights.v1.IEncryptionSpec, ( - | protos.google.cloud.contactcenterinsights.v1.IDeleteViewRequest + | protos.google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest | undefined ), {} | undefined, @@ -3197,107 +3344,88 @@ export class ContactCenterInsightsClient { name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.deleteView(request, options, callback); + return this.innerApiCalls.getEncryptionSpec(request, options, callback); } - /** - * Create a long-running conversation upload operation. This method differs - * from `CreateConversation` by allowing audio transcription and optional DLP - * redaction. + * Creates a view. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource of the conversation. - * @param {google.cloud.contactcenterinsights.v1.Conversation} request.conversation - * Required. The conversation resource to create. - * @param {string} [request.conversationId] - * Optional. A unique ID for the new conversation. This ID will become the - * final component of the conversation's resource name. If no ID is specified, - * a server-generated ID will be used. - * - * This value should be 4-64 characters and must match the regular - * expression `^{@link protos.0-9|a-z0-9-]{4,64}$`. Valid characters are `[a-z}-` - * @param {google.cloud.contactcenterinsights.v1.RedactionConfig} [request.redactionConfig] - * Optional. DLP settings for transcript redaction. Will default to the config - * specified in Settings. - * @param {google.cloud.contactcenterinsights.v1.SpeechConfig} [request.speechConfig] - * Optional. Speech-to-Text configuration. Will default to the config - * specified in Settings. + * Required. The parent resource of the view. Required. The location to create + * a view for. + * Format: `projects//locations/` or + * `projects//locations/` + * @param {google.cloud.contactcenterinsights.v1.View} request.view + * Required. The view resource to create. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * The first element of the array is an object representing {@link protos.google.cloud.contactcenterinsights.v1.View|View}. + * 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/v1/contact_center_insights.upload_conversation.js - * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_UploadConversation_async + * @example include:samples/generated/v1/contact_center_insights.create_view.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_CreateView_async */ - uploadConversation( - request?: protos.google.cloud.contactcenterinsights.v1.IUploadConversationRequest, + createView( + request?: protos.google.cloud.contactcenterinsights.v1.ICreateViewRequest, options?: CallOptions ): Promise< [ - LROperation< - protos.google.cloud.contactcenterinsights.v1.IConversation, - protos.google.cloud.contactcenterinsights.v1.IUploadConversationMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.contactcenterinsights.v1.IView, + ( + | protos.google.cloud.contactcenterinsights.v1.ICreateViewRequest + | undefined + ), {} | undefined, ] >; - uploadConversation( - request: protos.google.cloud.contactcenterinsights.v1.IUploadConversationRequest, + createView( + request: protos.google.cloud.contactcenterinsights.v1.ICreateViewRequest, options: CallOptions, callback: Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IConversation, - protos.google.cloud.contactcenterinsights.v1.IUploadConversationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IView, + | protos.google.cloud.contactcenterinsights.v1.ICreateViewRequest + | null + | undefined, {} | null | undefined > ): void; - uploadConversation( - request: protos.google.cloud.contactcenterinsights.v1.IUploadConversationRequest, + createView( + request: protos.google.cloud.contactcenterinsights.v1.ICreateViewRequest, callback: Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IConversation, - protos.google.cloud.contactcenterinsights.v1.IUploadConversationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IView, + | protos.google.cloud.contactcenterinsights.v1.ICreateViewRequest + | null + | undefined, {} | null | undefined > ): void; - uploadConversation( - request?: protos.google.cloud.contactcenterinsights.v1.IUploadConversationRequest, + createView( + request?: protos.google.cloud.contactcenterinsights.v1.ICreateViewRequest, optionsOrCallback?: | CallOptions | Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IConversation, - protos.google.cloud.contactcenterinsights.v1.IUploadConversationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IView, + | protos.google.cloud.contactcenterinsights.v1.ICreateViewRequest + | null + | undefined, {} | null | undefined >, callback?: Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IConversation, - protos.google.cloud.contactcenterinsights.v1.IUploadConversationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IView, + | protos.google.cloud.contactcenterinsights.v1.ICreateViewRequest + | null + | undefined, {} | null | undefined > ): Promise< [ - LROperation< - protos.google.cloud.contactcenterinsights.v1.IConversation, - protos.google.cloud.contactcenterinsights.v1.IUploadConversationMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.contactcenterinsights.v1.IView, + ( + | protos.google.cloud.contactcenterinsights.v1.ICreateViewRequest + | undefined + ), {} | undefined, ] > | void { @@ -3317,126 +3445,77 @@ export class ContactCenterInsightsClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.uploadConversation(request, options, callback); - } - /** - * Check the status of the long running operation returned by `uploadConversation()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/contact_center_insights.upload_conversation.js - * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_UploadConversation_async - */ - async checkUploadConversationProgress( - name: string - ): Promise< - LROperation< - protos.google.cloud.contactcenterinsights.v1.Conversation, - protos.google.cloud.contactcenterinsights.v1.UploadConversationMetadata - > - > { - const request = - new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation( - operation, - this.descriptors.longrunning.uploadConversation, - this._gaxModule.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.cloud.contactcenterinsights.v1.Conversation, - protos.google.cloud.contactcenterinsights.v1.UploadConversationMetadata - >; + return this.innerApiCalls.createView(request, options, callback); } /** - * Creates an analysis. The long running operation is done when the analysis - * has completed. + * Gets a view. * * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource of the analysis. - * @param {google.cloud.contactcenterinsights.v1.Analysis} request.analysis - * Required. The analysis to create. + * @param {string} request.name + * Required. The name of the view to get. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * The first element of the array is an object representing {@link protos.google.cloud.contactcenterinsights.v1.View|View}. + * 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/v1/contact_center_insights.create_analysis.js - * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_CreateAnalysis_async + * @example include:samples/generated/v1/contact_center_insights.get_view.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_GetView_async */ - createAnalysis( - request?: protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest, + getView( + request?: protos.google.cloud.contactcenterinsights.v1.IGetViewRequest, options?: CallOptions ): Promise< [ - LROperation< - protos.google.cloud.contactcenterinsights.v1.IAnalysis, - protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.contactcenterinsights.v1.IView, + protos.google.cloud.contactcenterinsights.v1.IGetViewRequest | undefined, {} | undefined, ] >; - createAnalysis( - request: protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest, + getView( + request: protos.google.cloud.contactcenterinsights.v1.IGetViewRequest, options: CallOptions, callback: Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IAnalysis, - protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IView, + | protos.google.cloud.contactcenterinsights.v1.IGetViewRequest + | null + | undefined, {} | null | undefined > ): void; - createAnalysis( - request: protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest, + getView( + request: protos.google.cloud.contactcenterinsights.v1.IGetViewRequest, callback: Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IAnalysis, - protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IView, + | protos.google.cloud.contactcenterinsights.v1.IGetViewRequest + | null + | undefined, {} | null | undefined > ): void; - createAnalysis( - request?: protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest, + getView( + request?: protos.google.cloud.contactcenterinsights.v1.IGetViewRequest, optionsOrCallback?: | CallOptions | Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IAnalysis, - protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IView, + | protos.google.cloud.contactcenterinsights.v1.IGetViewRequest + | null + | undefined, {} | null | undefined >, callback?: Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IAnalysis, - protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IView, + | protos.google.cloud.contactcenterinsights.v1.IGetViewRequest + | null + | undefined, {} | null | undefined > ): Promise< [ - LROperation< - protos.google.cloud.contactcenterinsights.v1.IAnalysis, - protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.contactcenterinsights.v1.IView, + protos.google.cloud.contactcenterinsights.v1.IGetViewRequest | undefined, {} | undefined, ] > | void { @@ -3453,134 +3532,88 @@ export class ContactCenterInsightsClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', + name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.createAnalysis(request, options, callback); - } - /** - * Check the status of the long running operation returned by `createAnalysis()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/contact_center_insights.create_analysis.js - * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_CreateAnalysis_async - */ - async checkCreateAnalysisProgress( - name: string - ): Promise< - LROperation< - protos.google.cloud.contactcenterinsights.v1.Analysis, - protos.google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata - > - > { - const request = - new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation( - operation, - this.descriptors.longrunning.createAnalysis, - this._gaxModule.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.cloud.contactcenterinsights.v1.Analysis, - protos.google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata - >; + return this.innerApiCalls.getView(request, options, callback); } /** - * Analyzes multiple conversations in a single request. + * Updates a view. * * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource to create analyses in. - * @param {string} request.filter - * Required. Filter used to select the subset of conversations to analyze. - * @param {number} request.analysisPercentage - * Required. Percentage of selected conversation to analyze, between - * [0, 100]. - * @param {google.cloud.contactcenterinsights.v1.AnnotatorSelector} request.annotatorSelector - * To select the annotators to run and the phrase matchers to use - * (if any). If not specified, all annotators will be run. + * @param {google.cloud.contactcenterinsights.v1.View} request.view + * Required. The new view. + * @param {google.protobuf.FieldMask} request.updateMask + * The list of fields to 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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * The first element of the array is an object representing {@link protos.google.cloud.contactcenterinsights.v1.View|View}. + * 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/v1/contact_center_insights.bulk_analyze_conversations.js - * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_BulkAnalyzeConversations_async + * @example include:samples/generated/v1/contact_center_insights.update_view.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_UpdateView_async */ - bulkAnalyzeConversations( - request?: protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsRequest, + updateView( + request?: protos.google.cloud.contactcenterinsights.v1.IUpdateViewRequest, options?: CallOptions ): Promise< [ - LROperation< - protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsResponse, - protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.contactcenterinsights.v1.IView, + ( + | protos.google.cloud.contactcenterinsights.v1.IUpdateViewRequest + | undefined + ), {} | undefined, ] >; - bulkAnalyzeConversations( - request: protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsRequest, + updateView( + request: protos.google.cloud.contactcenterinsights.v1.IUpdateViewRequest, options: CallOptions, callback: Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsResponse, - protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IView, + | protos.google.cloud.contactcenterinsights.v1.IUpdateViewRequest + | null + | undefined, {} | null | undefined > ): void; - bulkAnalyzeConversations( - request: protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsRequest, + updateView( + request: protos.google.cloud.contactcenterinsights.v1.IUpdateViewRequest, callback: Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsResponse, - protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IView, + | protos.google.cloud.contactcenterinsights.v1.IUpdateViewRequest + | null + | undefined, {} | null | undefined > ): void; - bulkAnalyzeConversations( - request?: protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsRequest, + updateView( + request?: protos.google.cloud.contactcenterinsights.v1.IUpdateViewRequest, optionsOrCallback?: | CallOptions | Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsResponse, - protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IView, + | protos.google.cloud.contactcenterinsights.v1.IUpdateViewRequest + | null + | undefined, {} | null | undefined >, callback?: Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsResponse, - protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IView, + | protos.google.cloud.contactcenterinsights.v1.IUpdateViewRequest + | null + | undefined, {} | null | undefined > ): Promise< [ - LROperation< - protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsResponse, - protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.contactcenterinsights.v1.IView, + ( + | protos.google.cloud.contactcenterinsights.v1.IUpdateViewRequest + | undefined + ), {} | undefined, ] > | void { @@ -3597,140 +3630,86 @@ export class ContactCenterInsightsClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', + 'view.name': request.view!.name ?? '', }); this.initialize(); - return this.innerApiCalls.bulkAnalyzeConversations( - request, - options, - callback - ); - } - /** - * Check the status of the long running operation returned by `bulkAnalyzeConversations()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/contact_center_insights.bulk_analyze_conversations.js - * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_BulkAnalyzeConversations_async - */ - async checkBulkAnalyzeConversationsProgress( - name: string - ): Promise< - LROperation< - protos.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse, - protos.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata - > - > { - const request = - new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation( - operation, - this.descriptors.longrunning.bulkAnalyzeConversations, - this._gaxModule.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse, - protos.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata - >; + return this.innerApiCalls.updateView(request, options, callback); } /** - * Deletes multiple conversations in a single request. + * Deletes a view. * * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource to delete conversations from. - * Format: - * projects/{project}/locations/{location} - * @param {string} request.filter - * Filter used to select the subset of conversations to delete. - * @param {number} request.maxDeleteCount - * Maximum number of conversations to delete. - * @param {boolean} request.force - * If set to true, all of this conversation's analyses will also be deleted. - * Otherwise, the request will only succeed if the conversation has no - * analyses. + * @param {string} request.name + * Required. The name of the view to delete. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * 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/v1/contact_center_insights.bulk_delete_conversations.js - * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_BulkDeleteConversations_async + * @example include:samples/generated/v1/contact_center_insights.delete_view.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_DeleteView_async */ - bulkDeleteConversations( - request?: protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsRequest, + deleteView( + request?: protos.google.cloud.contactcenterinsights.v1.IDeleteViewRequest, options?: CallOptions ): Promise< [ - LROperation< - protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsResponse, - protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.contactcenterinsights.v1.IDeleteViewRequest + | undefined + ), {} | undefined, ] >; - bulkDeleteConversations( - request: protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsRequest, + deleteView( + request: protos.google.cloud.contactcenterinsights.v1.IDeleteViewRequest, options: CallOptions, callback: Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsResponse, - protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteViewRequest + | null + | undefined, {} | null | undefined > ): void; - bulkDeleteConversations( - request: protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsRequest, + deleteView( + request: protos.google.cloud.contactcenterinsights.v1.IDeleteViewRequest, callback: Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsResponse, - protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteViewRequest + | null + | undefined, {} | null | undefined > ): void; - bulkDeleteConversations( - request?: protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsRequest, + deleteView( + request?: protos.google.cloud.contactcenterinsights.v1.IDeleteViewRequest, optionsOrCallback?: | CallOptions | Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsResponse, - protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteViewRequest + | null + | undefined, {} | null | undefined >, callback?: Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsResponse, - protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteViewRequest + | null + | undefined, {} | null | undefined > ): Promise< [ - LROperation< - protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsResponse, - protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.contactcenterinsights.v1.IDeleteViewRequest + | undefined + ), {} | undefined, ] > | void { @@ -3747,149 +3726,95 @@ export class ContactCenterInsightsClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', + name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.bulkDeleteConversations( - request, - options, - callback - ); + return this.innerApiCalls.deleteView(request, options, callback); } /** - * Check the status of the long running operation returned by `bulkDeleteConversations()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/contact_center_insights.bulk_delete_conversations.js - * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_BulkDeleteConversations_async - */ - async checkBulkDeleteConversationsProgress( - name: string - ): Promise< - LROperation< - protos.google.cloud.contactcenterinsights.v1.BulkDeleteConversationsResponse, - protos.google.cloud.contactcenterinsights.v1.BulkDeleteConversationsMetadata - > - > { - const request = - new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation( - operation, - this.descriptors.longrunning.bulkDeleteConversations, - this._gaxModule.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.cloud.contactcenterinsights.v1.BulkDeleteConversationsResponse, - protos.google.cloud.contactcenterinsights.v1.BulkDeleteConversationsMetadata - >; - } - /** - * Imports conversations and processes them according to the user's - * configuration. + * Create a QaQuestion. * * @param {Object} request * The request object that will be sent. - * @param {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource} request.gcsSource - * A cloud storage bucket source. Note that any previously ingested objects - * from the source will be skipped to avoid duplication. - * @param {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig} request.transcriptObjectConfig - * Configuration for when `source` contains conversation transcripts. * @param {string} request.parent - * Required. The parent resource for new conversations. - * @param {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig} request.conversationConfig - * Configuration that applies to all conversations. - * @param {google.cloud.contactcenterinsights.v1.RedactionConfig} [request.redactionConfig] - * Optional. DLP settings for transcript redaction. Optional, will default to - * the config specified in Settings. - * @param {google.cloud.contactcenterinsights.v1.SpeechConfig} [request.speechConfig] - * Optional. Default Speech-to-Text configuration. Optional, will default to - * the config specified in Settings. - * @param {number} [request.sampleSize] - * Optional. If set, this fields indicates the number of objects to ingest - * from the Cloud Storage bucket. If empty, the entire bucket will be - * ingested. Unless they are first deleted, conversations produced through - * sampling won't be ingested by subsequent ingest requests. + * Required. The parent resource of the QaQuestion. + * @param {google.cloud.contactcenterinsights.v1.QaQuestion} request.qaQuestion + * Required. The QaQuestion to create. + * @param {string} [request.qaQuestionId] + * Optional. A unique ID for the new question. This ID will become the final + * component of the question's resource name. If no ID is specified, a + * server-generated ID will be used. + * + * This value should be 4-64 characters and must match the regular + * expression `^{@link protos.0-9|a-z0-9-]{4,64}$`. Valid characters are `[a-z}-`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * The first element of the array is an object representing {@link protos.google.cloud.contactcenterinsights.v1.QaQuestion|QaQuestion}. + * 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/v1/contact_center_insights.ingest_conversations.js - * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_IngestConversations_async + * @example include:samples/generated/v1/contact_center_insights.create_qa_question.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_CreateQaQuestion_async */ - ingestConversations( - request?: protos.google.cloud.contactcenterinsights.v1.IIngestConversationsRequest, + createQaQuestion( + request?: protos.google.cloud.contactcenterinsights.v1.ICreateQaQuestionRequest, options?: CallOptions ): Promise< [ - LROperation< - protos.google.cloud.contactcenterinsights.v1.IIngestConversationsResponse, - protos.google.cloud.contactcenterinsights.v1.IIngestConversationsMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaQuestion, + ( + | protos.google.cloud.contactcenterinsights.v1.ICreateQaQuestionRequest + | undefined + ), {} | undefined, ] >; - ingestConversations( - request: protos.google.cloud.contactcenterinsights.v1.IIngestConversationsRequest, + createQaQuestion( + request: protos.google.cloud.contactcenterinsights.v1.ICreateQaQuestionRequest, options: CallOptions, callback: Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IIngestConversationsResponse, - protos.google.cloud.contactcenterinsights.v1.IIngestConversationsMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaQuestion, + | protos.google.cloud.contactcenterinsights.v1.ICreateQaQuestionRequest + | null + | undefined, {} | null | undefined > ): void; - ingestConversations( - request: protos.google.cloud.contactcenterinsights.v1.IIngestConversationsRequest, + createQaQuestion( + request: protos.google.cloud.contactcenterinsights.v1.ICreateQaQuestionRequest, callback: Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IIngestConversationsResponse, - protos.google.cloud.contactcenterinsights.v1.IIngestConversationsMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaQuestion, + | protos.google.cloud.contactcenterinsights.v1.ICreateQaQuestionRequest + | null + | undefined, {} | null | undefined > ): void; - ingestConversations( - request?: protos.google.cloud.contactcenterinsights.v1.IIngestConversationsRequest, + createQaQuestion( + request?: protos.google.cloud.contactcenterinsights.v1.ICreateQaQuestionRequest, optionsOrCallback?: | CallOptions | Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IIngestConversationsResponse, - protos.google.cloud.contactcenterinsights.v1.IIngestConversationsMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaQuestion, + | protos.google.cloud.contactcenterinsights.v1.ICreateQaQuestionRequest + | null + | undefined, {} | null | undefined >, callback?: Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IIngestConversationsResponse, - protos.google.cloud.contactcenterinsights.v1.IIngestConversationsMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaQuestion, + | protos.google.cloud.contactcenterinsights.v1.ICreateQaQuestionRequest + | null + | undefined, {} | null | undefined > ): Promise< [ - LROperation< - protos.google.cloud.contactcenterinsights.v1.IIngestConversationsResponse, - protos.google.cloud.contactcenterinsights.v1.IIngestConversationsMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaQuestion, + ( + | protos.google.cloud.contactcenterinsights.v1.ICreateQaQuestionRequest + | undefined + ), {} | undefined, ] > | void { @@ -3909,134 +3834,83 @@ export class ContactCenterInsightsClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.ingestConversations(request, options, callback); - } - /** - * Check the status of the long running operation returned by `ingestConversations()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/contact_center_insights.ingest_conversations.js - * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_IngestConversations_async - */ - async checkIngestConversationsProgress( - name: string - ): Promise< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IngestConversationsResponse, - protos.google.cloud.contactcenterinsights.v1.IngestConversationsMetadata - > - > { - const request = - new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation( - operation, - this.descriptors.longrunning.ingestConversations, - this._gaxModule.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.cloud.contactcenterinsights.v1.IngestConversationsResponse, - protos.google.cloud.contactcenterinsights.v1.IngestConversationsMetadata - >; + return this.innerApiCalls.createQaQuestion(request, options, callback); } /** - * Export insights data to a destination defined in the request body. + * Gets a QaQuestion. * * @param {Object} request * The request object that will be sent. - * @param {google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination} request.bigQueryDestination - * Specified if sink is a BigQuery table. - * @param {string} request.parent - * Required. The parent resource to export data from. - * @param {string} request.filter - * A filter to reduce results to a specific subset. Useful for exporting - * conversations with specific properties. - * @param {string} request.kmsKey - * A fully qualified KMS key name for BigQuery tables protected by CMEK. - * Format: - * projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}/cryptoKeyVersions/{version} - * @param {google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.WriteDisposition} request.writeDisposition - * Options for what to do if the destination table already exists. + * @param {string} request.name + * Required. The name of the QaQuestion to get. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * The first element of the array is an object representing {@link protos.google.cloud.contactcenterinsights.v1.QaQuestion|QaQuestion}. + * 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/v1/contact_center_insights.export_insights_data.js - * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ExportInsightsData_async + * @example include:samples/generated/v1/contact_center_insights.get_qa_question.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_GetQaQuestion_async */ - exportInsightsData( - request?: protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataRequest, + getQaQuestion( + request?: protos.google.cloud.contactcenterinsights.v1.IGetQaQuestionRequest, options?: CallOptions ): Promise< [ - LROperation< - protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataResponse, - protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaQuestion, + ( + | protos.google.cloud.contactcenterinsights.v1.IGetQaQuestionRequest + | undefined + ), {} | undefined, ] >; - exportInsightsData( - request: protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataRequest, + getQaQuestion( + request: protos.google.cloud.contactcenterinsights.v1.IGetQaQuestionRequest, options: CallOptions, callback: Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataResponse, - protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaQuestion, + | protos.google.cloud.contactcenterinsights.v1.IGetQaQuestionRequest + | null + | undefined, {} | null | undefined > ): void; - exportInsightsData( - request: protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataRequest, + getQaQuestion( + request: protos.google.cloud.contactcenterinsights.v1.IGetQaQuestionRequest, callback: Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataResponse, - protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaQuestion, + | protos.google.cloud.contactcenterinsights.v1.IGetQaQuestionRequest + | null + | undefined, {} | null | undefined > ): void; - exportInsightsData( - request?: protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataRequest, + getQaQuestion( + request?: protos.google.cloud.contactcenterinsights.v1.IGetQaQuestionRequest, optionsOrCallback?: | CallOptions | Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataResponse, - protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaQuestion, + | protos.google.cloud.contactcenterinsights.v1.IGetQaQuestionRequest + | null + | undefined, {} | null | undefined >, callback?: Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataResponse, - protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaQuestion, + | protos.google.cloud.contactcenterinsights.v1.IGetQaQuestionRequest + | null + | undefined, {} | null | undefined > ): Promise< [ - LROperation< - protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataResponse, - protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaQuestion, + ( + | protos.google.cloud.contactcenterinsights.v1.IGetQaQuestionRequest + | undefined + ), {} | undefined, ] > | void { @@ -4053,128 +3927,97 @@ export class ContactCenterInsightsClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', + name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.exportInsightsData(request, options, callback); - } - /** - * Check the status of the long running operation returned by `exportInsightsData()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/contact_center_insights.export_insights_data.js - * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ExportInsightsData_async - */ - async checkExportInsightsDataProgress( - name: string - ): Promise< - LROperation< - protos.google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse, - protos.google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata - > - > { - const request = - new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation( - operation, - this.descriptors.longrunning.exportInsightsData, - this._gaxModule.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse, - protos.google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata - >; + return this.innerApiCalls.getQaQuestion(request, options, callback); } /** - * Creates an issue model. + * Updates a QaQuestion. * * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource of the issue model. - * @param {google.cloud.contactcenterinsights.v1.IssueModel} request.issueModel - * Required. The issue model to create. + * @param {google.cloud.contactcenterinsights.v1.QaQuestion} request.qaQuestion + * Required. The QaQuestion to update. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The list of fields to be updated. All possible fields can be + * updated by passing `*`, or a subset of the following updateable fields can + * be provided: + * + * * `abbreviation` + * * `answer_choices` + * * `answer_instructions` + * * `order` + * * `question_body` + * * `tags` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * The first element of the array is an object representing {@link protos.google.cloud.contactcenterinsights.v1.QaQuestion|QaQuestion}. + * 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/v1/contact_center_insights.create_issue_model.js - * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_CreateIssueModel_async + * @example include:samples/generated/v1/contact_center_insights.update_qa_question.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_UpdateQaQuestion_async */ - createIssueModel( - request?: protos.google.cloud.contactcenterinsights.v1.ICreateIssueModelRequest, + updateQaQuestion( + request?: protos.google.cloud.contactcenterinsights.v1.IUpdateQaQuestionRequest, options?: CallOptions ): Promise< [ - LROperation< - protos.google.cloud.contactcenterinsights.v1.IIssueModel, - protos.google.cloud.contactcenterinsights.v1.ICreateIssueModelMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaQuestion, + ( + | protos.google.cloud.contactcenterinsights.v1.IUpdateQaQuestionRequest + | undefined + ), {} | undefined, ] >; - createIssueModel( - request: protos.google.cloud.contactcenterinsights.v1.ICreateIssueModelRequest, + updateQaQuestion( + request: protos.google.cloud.contactcenterinsights.v1.IUpdateQaQuestionRequest, options: CallOptions, callback: Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IIssueModel, - protos.google.cloud.contactcenterinsights.v1.ICreateIssueModelMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaQuestion, + | protos.google.cloud.contactcenterinsights.v1.IUpdateQaQuestionRequest + | null + | undefined, {} | null | undefined > ): void; - createIssueModel( - request: protos.google.cloud.contactcenterinsights.v1.ICreateIssueModelRequest, + updateQaQuestion( + request: protos.google.cloud.contactcenterinsights.v1.IUpdateQaQuestionRequest, callback: Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IIssueModel, - protos.google.cloud.contactcenterinsights.v1.ICreateIssueModelMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaQuestion, + | protos.google.cloud.contactcenterinsights.v1.IUpdateQaQuestionRequest + | null + | undefined, {} | null | undefined > ): void; - createIssueModel( - request?: protos.google.cloud.contactcenterinsights.v1.ICreateIssueModelRequest, + updateQaQuestion( + request?: protos.google.cloud.contactcenterinsights.v1.IUpdateQaQuestionRequest, optionsOrCallback?: | CallOptions | Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IIssueModel, - protos.google.cloud.contactcenterinsights.v1.ICreateIssueModelMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaQuestion, + | protos.google.cloud.contactcenterinsights.v1.IUpdateQaQuestionRequest + | null + | undefined, {} | null | undefined >, callback?: Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IIssueModel, - protos.google.cloud.contactcenterinsights.v1.ICreateIssueModelMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaQuestion, + | protos.google.cloud.contactcenterinsights.v1.IUpdateQaQuestionRequest + | null + | undefined, {} | null | undefined > ): Promise< [ - LROperation< - protos.google.cloud.contactcenterinsights.v1.IIssueModel, - protos.google.cloud.contactcenterinsights.v1.ICreateIssueModelMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaQuestion, + ( + | protos.google.cloud.contactcenterinsights.v1.IUpdateQaQuestionRequest + | undefined + ), {} | undefined, ] > | void { @@ -4191,126 +4034,86 @@ export class ContactCenterInsightsClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', + 'qa_question.name': request.qaQuestion!.name ?? '', }); this.initialize(); - return this.innerApiCalls.createIssueModel(request, options, callback); - } - /** - * Check the status of the long running operation returned by `createIssueModel()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/contact_center_insights.create_issue_model.js - * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_CreateIssueModel_async - */ - async checkCreateIssueModelProgress( - name: string - ): Promise< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IssueModel, - protos.google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata - > - > { - const request = - new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation( - operation, - this.descriptors.longrunning.createIssueModel, - this._gaxModule.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.cloud.contactcenterinsights.v1.IssueModel, - protos.google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata - >; + return this.innerApiCalls.updateQaQuestion(request, options, callback); } /** - * Deletes an issue model. + * Deletes a QaQuestion. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The name of the issue model to delete. + * Required. The name of the QaQuestion to delete. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * 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/v1/contact_center_insights.delete_issue_model.js - * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_DeleteIssueModel_async + * @example include:samples/generated/v1/contact_center_insights.delete_qa_question.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_DeleteQaQuestion_async */ - deleteIssueModel( - request?: protos.google.cloud.contactcenterinsights.v1.IDeleteIssueModelRequest, + deleteQaQuestion( + request?: protos.google.cloud.contactcenterinsights.v1.IDeleteQaQuestionRequest, options?: CallOptions ): Promise< [ - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.contactcenterinsights.v1.IDeleteIssueModelMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.contactcenterinsights.v1.IDeleteQaQuestionRequest + | undefined + ), {} | undefined, ] >; - deleteIssueModel( - request: protos.google.cloud.contactcenterinsights.v1.IDeleteIssueModelRequest, + deleteQaQuestion( + request: protos.google.cloud.contactcenterinsights.v1.IDeleteQaQuestionRequest, options: CallOptions, callback: Callback< - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.contactcenterinsights.v1.IDeleteIssueModelMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteQaQuestionRequest + | null + | undefined, {} | null | undefined > ): void; - deleteIssueModel( - request: protos.google.cloud.contactcenterinsights.v1.IDeleteIssueModelRequest, + deleteQaQuestion( + request: protos.google.cloud.contactcenterinsights.v1.IDeleteQaQuestionRequest, callback: Callback< - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.contactcenterinsights.v1.IDeleteIssueModelMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteQaQuestionRequest + | null + | undefined, {} | null | undefined > ): void; - deleteIssueModel( - request?: protos.google.cloud.contactcenterinsights.v1.IDeleteIssueModelRequest, + deleteQaQuestion( + request?: protos.google.cloud.contactcenterinsights.v1.IDeleteQaQuestionRequest, optionsOrCallback?: | CallOptions | Callback< - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.contactcenterinsights.v1.IDeleteIssueModelMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteQaQuestionRequest + | null + | undefined, {} | null | undefined >, callback?: Callback< - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.contactcenterinsights.v1.IDeleteIssueModelMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteQaQuestionRequest + | null + | undefined, {} | null | undefined > ): Promise< [ - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.contactcenterinsights.v1.IDeleteIssueModelMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.contactcenterinsights.v1.IDeleteQaQuestionRequest + | undefined + ), {} | undefined, ] > | void { @@ -4330,124 +4133,92 @@ export class ContactCenterInsightsClient { name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.deleteIssueModel(request, options, callback); - } - /** - * Check the status of the long running operation returned by `deleteIssueModel()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/contact_center_insights.delete_issue_model.js - * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_DeleteIssueModel_async - */ - async checkDeleteIssueModelProgress( - name: string - ): Promise< - LROperation< - protos.google.protobuf.Empty, - protos.google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata - > - > { - const request = - new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation( - operation, - this.descriptors.longrunning.deleteIssueModel, - this._gaxModule.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.protobuf.Empty, - protos.google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata - >; + return this.innerApiCalls.deleteQaQuestion(request, options, callback); } /** - * Deploys an issue model. Returns an error if a model is already deployed. - * An issue model can only be used in analysis after it has been deployed. + * Create a QaScorecard. * * @param {Object} request * The request object that will be sent. - * @param {string} request.name - * Required. The issue model to deploy. + * @param {string} request.parent + * Required. The parent resource of the QaScorecard. + * @param {google.cloud.contactcenterinsights.v1.QaScorecard} request.qaScorecard + * Required. The QaScorecard to create. + * @param {string} [request.qaScorecardId] + * Optional. A unique ID for the new QaScorecard. This ID will become the + * final component of the QaScorecard's resource name. If no ID is specified, + * a server-generated ID will be used. + * + * This value should be 4-64 characters and must match the regular + * expression `^{@link protos.0-9|a-z0-9-]{4,64}$`. Valid characters are `[a-z}-`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * The first element of the array is an object representing {@link protos.google.cloud.contactcenterinsights.v1.QaScorecard|QaScorecard}. + * 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/v1/contact_center_insights.deploy_issue_model.js - * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_DeployIssueModel_async + * @example include:samples/generated/v1/contact_center_insights.create_qa_scorecard.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_CreateQaScorecard_async */ - deployIssueModel( - request?: protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelRequest, + createQaScorecard( + request?: protos.google.cloud.contactcenterinsights.v1.ICreateQaScorecardRequest, options?: CallOptions ): Promise< [ - LROperation< - protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaScorecard, + ( + | protos.google.cloud.contactcenterinsights.v1.ICreateQaScorecardRequest + | undefined + ), {} | undefined, ] >; - deployIssueModel( - request: protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelRequest, + createQaScorecard( + request: protos.google.cloud.contactcenterinsights.v1.ICreateQaScorecardRequest, options: CallOptions, callback: Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaScorecard, + | protos.google.cloud.contactcenterinsights.v1.ICreateQaScorecardRequest + | null + | undefined, {} | null | undefined > ): void; - deployIssueModel( - request: protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelRequest, + createQaScorecard( + request: protos.google.cloud.contactcenterinsights.v1.ICreateQaScorecardRequest, callback: Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaScorecard, + | protos.google.cloud.contactcenterinsights.v1.ICreateQaScorecardRequest + | null + | undefined, {} | null | undefined > ): void; - deployIssueModel( - request?: protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelRequest, + createQaScorecard( + request?: protos.google.cloud.contactcenterinsights.v1.ICreateQaScorecardRequest, optionsOrCallback?: | CallOptions | Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaScorecard, + | protos.google.cloud.contactcenterinsights.v1.ICreateQaScorecardRequest + | null + | undefined, {} | null | undefined >, callback?: Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaScorecard, + | protos.google.cloud.contactcenterinsights.v1.ICreateQaScorecardRequest + | null + | undefined, {} | null | undefined > ): Promise< [ - LROperation< - protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaScorecard, + ( + | protos.google.cloud.contactcenterinsights.v1.ICreateQaScorecardRequest + | undefined + ), {} | undefined, ] > | void { @@ -4464,127 +4235,86 @@ export class ContactCenterInsightsClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', + parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.deployIssueModel(request, options, callback); - } - /** - * Check the status of the long running operation returned by `deployIssueModel()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/contact_center_insights.deploy_issue_model.js - * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_DeployIssueModel_async - */ - async checkDeployIssueModelProgress( - name: string - ): Promise< - LROperation< - protos.google.cloud.contactcenterinsights.v1.DeployIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata - > - > { - const request = - new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation( - operation, - this.descriptors.longrunning.deployIssueModel, - this._gaxModule.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.cloud.contactcenterinsights.v1.DeployIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata - >; + return this.innerApiCalls.createQaScorecard(request, options, callback); } /** - * Undeploys an issue model. - * An issue model can not be used in analysis after it has been undeployed. + * Gets a QaScorecard. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The issue model to undeploy. + * Required. The name of the QaScorecard to get. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * The first element of the array is an object representing {@link protos.google.cloud.contactcenterinsights.v1.QaScorecard|QaScorecard}. + * 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/v1/contact_center_insights.undeploy_issue_model.js - * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_UndeployIssueModel_async + * @example include:samples/generated/v1/contact_center_insights.get_qa_scorecard.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_GetQaScorecard_async */ - undeployIssueModel( - request?: protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelRequest, + getQaScorecard( + request?: protos.google.cloud.contactcenterinsights.v1.IGetQaScorecardRequest, options?: CallOptions ): Promise< [ - LROperation< - protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaScorecard, + ( + | protos.google.cloud.contactcenterinsights.v1.IGetQaScorecardRequest + | undefined + ), {} | undefined, ] >; - undeployIssueModel( - request: protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelRequest, + getQaScorecard( + request: protos.google.cloud.contactcenterinsights.v1.IGetQaScorecardRequest, options: CallOptions, callback: Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaScorecard, + | protos.google.cloud.contactcenterinsights.v1.IGetQaScorecardRequest + | null + | undefined, {} | null | undefined > ): void; - undeployIssueModel( - request: protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelRequest, + getQaScorecard( + request: protos.google.cloud.contactcenterinsights.v1.IGetQaScorecardRequest, callback: Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaScorecard, + | protos.google.cloud.contactcenterinsights.v1.IGetQaScorecardRequest + | null + | undefined, {} | null | undefined > ): void; - undeployIssueModel( - request?: protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelRequest, + getQaScorecard( + request?: protos.google.cloud.contactcenterinsights.v1.IGetQaScorecardRequest, optionsOrCallback?: | CallOptions | Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaScorecard, + | protos.google.cloud.contactcenterinsights.v1.IGetQaScorecardRequest + | null + | undefined, {} | null | undefined >, callback?: Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaScorecard, + | protos.google.cloud.contactcenterinsights.v1.IGetQaScorecardRequest + | null + | undefined, {} | null | undefined > ): Promise< [ - LROperation< - protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaScorecard, + ( + | protos.google.cloud.contactcenterinsights.v1.IGetQaScorecardRequest + | undefined + ), {} | undefined, ] > | void { @@ -4604,125 +4334,90 @@ export class ContactCenterInsightsClient { name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.undeployIssueModel(request, options, callback); - } - /** - * Check the status of the long running operation returned by `undeployIssueModel()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/contact_center_insights.undeploy_issue_model.js - * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_UndeployIssueModel_async - */ - async checkUndeployIssueModelProgress( - name: string - ): Promise< - LROperation< - protos.google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata - > - > { - const request = - new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation( - operation, - this.descriptors.longrunning.undeployIssueModel, - this._gaxModule.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata - >; + return this.innerApiCalls.getQaScorecard(request, options, callback); } /** - * Exports an issue model to the provided destination. + * Updates a QaScorecard. * * @param {Object} request * The request object that will be sent. - * @param {google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination} request.gcsDestination - * Google Cloud Storage URI to export the issue model to. - * @param {string} request.name - * Required. The issue model to export. + * @param {google.cloud.contactcenterinsights.v1.QaScorecard} request.qaScorecard + * Required. The QaScorecard to update. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The list of fields to be updated. All possible fields can be + * updated by passing `*`, or a subset of the following updateable fields can + * be provided: + * + * * `description` + * * `display_name` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * The first element of the array is an object representing {@link protos.google.cloud.contactcenterinsights.v1.QaScorecard|QaScorecard}. + * 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/v1/contact_center_insights.export_issue_model.js - * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ExportIssueModel_async + * @example include:samples/generated/v1/contact_center_insights.update_qa_scorecard.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_UpdateQaScorecard_async */ - exportIssueModel( - request?: protos.google.cloud.contactcenterinsights.v1.IExportIssueModelRequest, + updateQaScorecard( + request?: protos.google.cloud.contactcenterinsights.v1.IUpdateQaScorecardRequest, options?: CallOptions ): Promise< [ - LROperation< - protos.google.cloud.contactcenterinsights.v1.IExportIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.IExportIssueModelMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaScorecard, + ( + | protos.google.cloud.contactcenterinsights.v1.IUpdateQaScorecardRequest + | undefined + ), {} | undefined, ] >; - exportIssueModel( - request: protos.google.cloud.contactcenterinsights.v1.IExportIssueModelRequest, + updateQaScorecard( + request: protos.google.cloud.contactcenterinsights.v1.IUpdateQaScorecardRequest, options: CallOptions, callback: Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IExportIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.IExportIssueModelMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaScorecard, + | protos.google.cloud.contactcenterinsights.v1.IUpdateQaScorecardRequest + | null + | undefined, {} | null | undefined > ): void; - exportIssueModel( - request: protos.google.cloud.contactcenterinsights.v1.IExportIssueModelRequest, + updateQaScorecard( + request: protos.google.cloud.contactcenterinsights.v1.IUpdateQaScorecardRequest, callback: Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IExportIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.IExportIssueModelMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaScorecard, + | protos.google.cloud.contactcenterinsights.v1.IUpdateQaScorecardRequest + | null + | undefined, {} | null | undefined > ): void; - exportIssueModel( - request?: protos.google.cloud.contactcenterinsights.v1.IExportIssueModelRequest, + updateQaScorecard( + request?: protos.google.cloud.contactcenterinsights.v1.IUpdateQaScorecardRequest, optionsOrCallback?: | CallOptions | Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IExportIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.IExportIssueModelMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaScorecard, + | protos.google.cloud.contactcenterinsights.v1.IUpdateQaScorecardRequest + | null + | undefined, {} | null | undefined >, callback?: Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IExportIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.IExportIssueModelMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaScorecard, + | protos.google.cloud.contactcenterinsights.v1.IUpdateQaScorecardRequest + | null + | undefined, {} | null | undefined > ): Promise< [ - LROperation< - protos.google.cloud.contactcenterinsights.v1.IExportIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.IExportIssueModelMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaScorecard, + ( + | protos.google.cloud.contactcenterinsights.v1.IUpdateQaScorecardRequest + | undefined + ), {} | undefined, ] > | void { @@ -4739,132 +4434,89 @@ export class ContactCenterInsightsClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', + 'qa_scorecard.name': request.qaScorecard!.name ?? '', }); this.initialize(); - return this.innerApiCalls.exportIssueModel(request, options, callback); - } - /** - * Check the status of the long running operation returned by `exportIssueModel()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/contact_center_insights.export_issue_model.js - * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ExportIssueModel_async - */ - async checkExportIssueModelProgress( - name: string - ): Promise< - LROperation< - protos.google.cloud.contactcenterinsights.v1.ExportIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata - > - > { - const request = - new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation( - operation, - this.descriptors.longrunning.exportIssueModel, - this._gaxModule.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.cloud.contactcenterinsights.v1.ExportIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata - >; + return this.innerApiCalls.updateQaScorecard(request, options, callback); } /** - * Imports an issue model from a Cloud Storage bucket. + * Deletes a QaScorecard. * * @param {Object} request * The request object that will be sent. - * @param {google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource} request.gcsSource - * Google Cloud Storage source message. - * @param {string} request.parent - * Required. The parent resource of the issue model. - * @param {boolean} [request.createNewModel] - * Optional. If set to true, will create an issue model from the imported file - * with randomly generated IDs for the issue model and corresponding issues. - * Otherwise, replaces an existing model with the same ID as the file. + * @param {string} request.name + * Required. The name of the QaScorecard to delete. + * @param {boolean} [request.force] + * Optional. If set to true, all of this QaScorecard's child resources will + * also be deleted. Otherwise, the request will only succeed if it has none. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * 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/v1/contact_center_insights.import_issue_model.js - * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ImportIssueModel_async + * @example include:samples/generated/v1/contact_center_insights.delete_qa_scorecard.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_DeleteQaScorecard_async */ - importIssueModel( - request?: protos.google.cloud.contactcenterinsights.v1.IImportIssueModelRequest, + deleteQaScorecard( + request?: protos.google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRequest, options?: CallOptions ): Promise< [ - LROperation< - protos.google.cloud.contactcenterinsights.v1.IImportIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.IImportIssueModelMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRequest + | undefined + ), {} | undefined, ] >; - importIssueModel( - request: protos.google.cloud.contactcenterinsights.v1.IImportIssueModelRequest, + deleteQaScorecard( + request: protos.google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRequest, options: CallOptions, callback: Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IImportIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.IImportIssueModelMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRequest + | null + | undefined, {} | null | undefined > ): void; - importIssueModel( - request: protos.google.cloud.contactcenterinsights.v1.IImportIssueModelRequest, + deleteQaScorecard( + request: protos.google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRequest, callback: Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IImportIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.IImportIssueModelMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRequest + | null + | undefined, {} | null | undefined > ): void; - importIssueModel( - request?: protos.google.cloud.contactcenterinsights.v1.IImportIssueModelRequest, + deleteQaScorecard( + request?: protos.google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRequest, optionsOrCallback?: | CallOptions | Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IImportIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.IImportIssueModelMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRequest + | null + | undefined, {} | null | undefined >, callback?: Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IImportIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.IImportIssueModelMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRequest + | null + | undefined, {} | null | undefined > ): Promise< [ - LROperation< - protos.google.cloud.contactcenterinsights.v1.IImportIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.IImportIssueModelMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRequest + | undefined + ), {} | undefined, ] > | void { @@ -4881,295 +4533,4780 @@ export class ContactCenterInsightsClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', + name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.importIssueModel(request, options, callback); + return this.innerApiCalls.deleteQaScorecard(request, options, callback); } /** - * Check the status of the long running operation returned by `importIssueModel()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * Creates a QaScorecardRevision. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the QaScorecardRevision. + * @param {google.cloud.contactcenterinsights.v1.QaScorecardRevision} request.qaScorecardRevision + * Required. The QaScorecardRevision to create. + * @param {string} [request.qaScorecardRevisionId] + * Optional. A unique ID for the new QaScorecardRevision. This ID will become + * the final component of the QaScorecardRevision's resource name. If no ID is + * specified, a server-generated ID will be used. + * + * This value should be 4-64 characters and must match the regular + * expression `^{@link protos.0-9|a-z0-9-]{4,64}$`. Valid characters are `[a-z}-`. + * @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.contactcenterinsights.v1.QaScorecardRevision|QaScorecardRevision}. + * 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/v1/contact_center_insights.import_issue_model.js - * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ImportIssueModel_async + * @example include:samples/generated/v1/contact_center_insights.create_qa_scorecard_revision.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_CreateQaScorecardRevision_async */ - async checkImportIssueModelProgress( - name: string + createQaScorecardRevision( + request?: protos.google.cloud.contactcenterinsights.v1.ICreateQaScorecardRevisionRequest, + options?: CallOptions ): Promise< - LROperation< - protos.google.cloud.contactcenterinsights.v1.ImportIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata + [ + protos.google.cloud.contactcenterinsights.v1.IQaScorecardRevision, + ( + | protos.google.cloud.contactcenterinsights.v1.ICreateQaScorecardRevisionRequest + | undefined + ), + {} | undefined, + ] + >; + createQaScorecardRevision( + request: protos.google.cloud.contactcenterinsights.v1.ICreateQaScorecardRevisionRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IQaScorecardRevision, + | protos.google.cloud.contactcenterinsights.v1.ICreateQaScorecardRevisionRequest + | null + | undefined, + {} | null | undefined > - > { - const request = - new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation( - operation, - this.descriptors.longrunning.importIssueModel, - this._gaxModule.createDefaultBackoffSettings() + ): void; + createQaScorecardRevision( + request: protos.google.cloud.contactcenterinsights.v1.ICreateQaScorecardRevisionRequest, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IQaScorecardRevision, + | protos.google.cloud.contactcenterinsights.v1.ICreateQaScorecardRevisionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createQaScorecardRevision( + request?: protos.google.cloud.contactcenterinsights.v1.ICreateQaScorecardRevisionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.contactcenterinsights.v1.IQaScorecardRevision, + | protos.google.cloud.contactcenterinsights.v1.ICreateQaScorecardRevisionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.contactcenterinsights.v1.IQaScorecardRevision, + | protos.google.cloud.contactcenterinsights.v1.ICreateQaScorecardRevisionRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IQaScorecardRevision, + ( + | protos.google.cloud.contactcenterinsights.v1.ICreateQaScorecardRevisionRequest + | 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.createQaScorecardRevision( + request, + options, + callback ); - return decodeOperation as LROperation< - protos.google.cloud.contactcenterinsights.v1.ImportIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata - >; } /** - * Initializes a location-level encryption key specification. An error will - * be thrown if the location has resources already created before the - * initialization. Once the encryption specification is initialized at a - * location, it is immutable and all newly created resources under the - * location will be encrypted with the existing specification. + * Gets a QaScorecardRevision. * * @param {Object} request * The request object that will be sent. - * @param {google.cloud.contactcenterinsights.v1.EncryptionSpec} request.encryptionSpec - * Required. The encryption spec used for CMEK encryption. It is required that - * the kms key is in the same region as the endpoint. The same key will be - * used for all provisioned resources, if encryption is available. If the - * kms_key_name is left empty, no encryption will be enforced. + * @param {string} request.name + * Required. The name of the QaScorecardRevision to get. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * The first element of the array is an object representing {@link protos.google.cloud.contactcenterinsights.v1.QaScorecardRevision|QaScorecardRevision}. + * 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/v1/contact_center_insights.initialize_encryption_spec.js - * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_InitializeEncryptionSpec_async + * @example include:samples/generated/v1/contact_center_insights.get_qa_scorecard_revision.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_GetQaScorecardRevision_async */ - initializeEncryptionSpec( - request?: protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest, + getQaScorecardRevision( + request?: protos.google.cloud.contactcenterinsights.v1.IGetQaScorecardRevisionRequest, options?: CallOptions ): Promise< [ - LROperation< - protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse, - protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaScorecardRevision, + ( + | protos.google.cloud.contactcenterinsights.v1.IGetQaScorecardRevisionRequest + | undefined + ), {} | undefined, ] >; - initializeEncryptionSpec( - request: protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest, + getQaScorecardRevision( + request: protos.google.cloud.contactcenterinsights.v1.IGetQaScorecardRevisionRequest, options: CallOptions, callback: Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse, - protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaScorecardRevision, + | protos.google.cloud.contactcenterinsights.v1.IGetQaScorecardRevisionRequest + | null + | undefined, {} | null | undefined > ): void; - initializeEncryptionSpec( - request: protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest, + getQaScorecardRevision( + request: protos.google.cloud.contactcenterinsights.v1.IGetQaScorecardRevisionRequest, callback: Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse, - protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaScorecardRevision, + | protos.google.cloud.contactcenterinsights.v1.IGetQaScorecardRevisionRequest + | null + | undefined, {} | null | undefined > ): void; - initializeEncryptionSpec( - request?: protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest, + getQaScorecardRevision( + request?: protos.google.cloud.contactcenterinsights.v1.IGetQaScorecardRevisionRequest, optionsOrCallback?: | CallOptions | Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse, - protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaScorecardRevision, + | protos.google.cloud.contactcenterinsights.v1.IGetQaScorecardRevisionRequest + | null + | undefined, {} | null | undefined >, callback?: Callback< - LROperation< - protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse, - protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaScorecardRevision, + | protos.google.cloud.contactcenterinsights.v1.IGetQaScorecardRevisionRequest + | null + | undefined, {} | null | undefined > ): Promise< [ - LROperation< - protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse, - protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaScorecardRevision, + ( + | protos.google.cloud.contactcenterinsights.v1.IGetQaScorecardRevisionRequest + | undefined + ), {} | undefined, ] > | void { request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as CallOptions; - } + 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.getQaScorecardRevision( + request, + options, + callback + ); + } + /** + * Deploy a QaScorecardRevision. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the QaScorecardRevision to deploy. + * @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.contactcenterinsights.v1.QaScorecardRevision|QaScorecardRevision}. + * 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/v1/contact_center_insights.deploy_qa_scorecard_revision.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_DeployQaScorecardRevision_async + */ + deployQaScorecardRevision( + request?: protos.google.cloud.contactcenterinsights.v1.IDeployQaScorecardRevisionRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IQaScorecardRevision, + ( + | protos.google.cloud.contactcenterinsights.v1.IDeployQaScorecardRevisionRequest + | undefined + ), + {} | undefined, + ] + >; + deployQaScorecardRevision( + request: protos.google.cloud.contactcenterinsights.v1.IDeployQaScorecardRevisionRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IQaScorecardRevision, + | protos.google.cloud.contactcenterinsights.v1.IDeployQaScorecardRevisionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deployQaScorecardRevision( + request: protos.google.cloud.contactcenterinsights.v1.IDeployQaScorecardRevisionRequest, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IQaScorecardRevision, + | protos.google.cloud.contactcenterinsights.v1.IDeployQaScorecardRevisionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deployQaScorecardRevision( + request?: protos.google.cloud.contactcenterinsights.v1.IDeployQaScorecardRevisionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.contactcenterinsights.v1.IQaScorecardRevision, + | protos.google.cloud.contactcenterinsights.v1.IDeployQaScorecardRevisionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.contactcenterinsights.v1.IQaScorecardRevision, + | protos.google.cloud.contactcenterinsights.v1.IDeployQaScorecardRevisionRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IQaScorecardRevision, + ( + | protos.google.cloud.contactcenterinsights.v1.IDeployQaScorecardRevisionRequest + | 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.deployQaScorecardRevision( + request, + options, + callback + ); + } + /** + * Undeploy a QaScorecardRevision. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the QaScorecardRevision to undeploy. + * @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.contactcenterinsights.v1.QaScorecardRevision|QaScorecardRevision}. + * 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/v1/contact_center_insights.undeploy_qa_scorecard_revision.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_UndeployQaScorecardRevision_async + */ + undeployQaScorecardRevision( + request?: protos.google.cloud.contactcenterinsights.v1.IUndeployQaScorecardRevisionRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IQaScorecardRevision, + ( + | protos.google.cloud.contactcenterinsights.v1.IUndeployQaScorecardRevisionRequest + | undefined + ), + {} | undefined, + ] + >; + undeployQaScorecardRevision( + request: protos.google.cloud.contactcenterinsights.v1.IUndeployQaScorecardRevisionRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IQaScorecardRevision, + | protos.google.cloud.contactcenterinsights.v1.IUndeployQaScorecardRevisionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + undeployQaScorecardRevision( + request: protos.google.cloud.contactcenterinsights.v1.IUndeployQaScorecardRevisionRequest, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IQaScorecardRevision, + | protos.google.cloud.contactcenterinsights.v1.IUndeployQaScorecardRevisionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + undeployQaScorecardRevision( + request?: protos.google.cloud.contactcenterinsights.v1.IUndeployQaScorecardRevisionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.contactcenterinsights.v1.IQaScorecardRevision, + | protos.google.cloud.contactcenterinsights.v1.IUndeployQaScorecardRevisionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.contactcenterinsights.v1.IQaScorecardRevision, + | protos.google.cloud.contactcenterinsights.v1.IUndeployQaScorecardRevisionRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IQaScorecardRevision, + ( + | protos.google.cloud.contactcenterinsights.v1.IUndeployQaScorecardRevisionRequest + | 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.undeployQaScorecardRevision( + request, + options, + callback + ); + } + /** + * Deletes a QaScorecardRevision. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the QaScorecardRevision to delete. + * @param {boolean} [request.force] + * Optional. If set to true, all of this QaScorecardRevision's child resources + * will also be deleted. Otherwise, the request will only succeed if it has + * none. + * @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/v1/contact_center_insights.delete_qa_scorecard_revision.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_DeleteQaScorecardRevision_async + */ + deleteQaScorecardRevision( + request?: protos.google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRevisionRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRevisionRequest + | undefined + ), + {} | undefined, + ] + >; + deleteQaScorecardRevision( + request: protos.google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRevisionRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRevisionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteQaScorecardRevision( + request: protos.google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRevisionRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRevisionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteQaScorecardRevision( + request?: protos.google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRevisionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRevisionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRevisionRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.contactcenterinsights.v1.IDeleteQaScorecardRevisionRequest + | 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.deleteQaScorecardRevision( + request, + options, + callback + ); + } + /** + * Create feedback label. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the feedback label. + * @param {string} [request.feedbackLabelId] + * Optional. The ID of the feedback label to create. + * If one is not specified it will be generated by the server. + * @param {google.cloud.contactcenterinsights.v1.FeedbackLabel} request.feedbackLabel + * Required. The feedback label to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.contactcenterinsights.v1.FeedbackLabel|FeedbackLabel}. + * 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/v1/contact_center_insights.create_feedback_label.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_CreateFeedbackLabel_async + */ + createFeedbackLabel( + request?: protos.google.cloud.contactcenterinsights.v1.ICreateFeedbackLabelRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel, + ( + | protos.google.cloud.contactcenterinsights.v1.ICreateFeedbackLabelRequest + | undefined + ), + {} | undefined, + ] + >; + createFeedbackLabel( + request: protos.google.cloud.contactcenterinsights.v1.ICreateFeedbackLabelRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel, + | protos.google.cloud.contactcenterinsights.v1.ICreateFeedbackLabelRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createFeedbackLabel( + request: protos.google.cloud.contactcenterinsights.v1.ICreateFeedbackLabelRequest, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel, + | protos.google.cloud.contactcenterinsights.v1.ICreateFeedbackLabelRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createFeedbackLabel( + request?: protos.google.cloud.contactcenterinsights.v1.ICreateFeedbackLabelRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel, + | protos.google.cloud.contactcenterinsights.v1.ICreateFeedbackLabelRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel, + | protos.google.cloud.contactcenterinsights.v1.ICreateFeedbackLabelRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel, + ( + | protos.google.cloud.contactcenterinsights.v1.ICreateFeedbackLabelRequest + | 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.createFeedbackLabel(request, options, callback); + } + /** + * Get feedback label. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the feedback label to get. + * @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.contactcenterinsights.v1.FeedbackLabel|FeedbackLabel}. + * 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/v1/contact_center_insights.get_feedback_label.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_GetFeedbackLabel_async + */ + getFeedbackLabel( + request?: protos.google.cloud.contactcenterinsights.v1.IGetFeedbackLabelRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel, + ( + | protos.google.cloud.contactcenterinsights.v1.IGetFeedbackLabelRequest + | undefined + ), + {} | undefined, + ] + >; + getFeedbackLabel( + request: protos.google.cloud.contactcenterinsights.v1.IGetFeedbackLabelRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel, + | protos.google.cloud.contactcenterinsights.v1.IGetFeedbackLabelRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getFeedbackLabel( + request: protos.google.cloud.contactcenterinsights.v1.IGetFeedbackLabelRequest, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel, + | protos.google.cloud.contactcenterinsights.v1.IGetFeedbackLabelRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getFeedbackLabel( + request?: protos.google.cloud.contactcenterinsights.v1.IGetFeedbackLabelRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel, + | protos.google.cloud.contactcenterinsights.v1.IGetFeedbackLabelRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel, + | protos.google.cloud.contactcenterinsights.v1.IGetFeedbackLabelRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel, + ( + | protos.google.cloud.contactcenterinsights.v1.IGetFeedbackLabelRequest + | 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.getFeedbackLabel(request, options, callback); + } + /** + * Update feedback label. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.contactcenterinsights.v1.FeedbackLabel} request.feedbackLabel + * Required. The feedback label to update. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The list of fields to 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.contactcenterinsights.v1.FeedbackLabel|FeedbackLabel}. + * 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/v1/contact_center_insights.update_feedback_label.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_UpdateFeedbackLabel_async + */ + updateFeedbackLabel( + request?: protos.google.cloud.contactcenterinsights.v1.IUpdateFeedbackLabelRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel, + ( + | protos.google.cloud.contactcenterinsights.v1.IUpdateFeedbackLabelRequest + | undefined + ), + {} | undefined, + ] + >; + updateFeedbackLabel( + request: protos.google.cloud.contactcenterinsights.v1.IUpdateFeedbackLabelRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel, + | protos.google.cloud.contactcenterinsights.v1.IUpdateFeedbackLabelRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateFeedbackLabel( + request: protos.google.cloud.contactcenterinsights.v1.IUpdateFeedbackLabelRequest, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel, + | protos.google.cloud.contactcenterinsights.v1.IUpdateFeedbackLabelRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateFeedbackLabel( + request?: protos.google.cloud.contactcenterinsights.v1.IUpdateFeedbackLabelRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel, + | protos.google.cloud.contactcenterinsights.v1.IUpdateFeedbackLabelRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel, + | protos.google.cloud.contactcenterinsights.v1.IUpdateFeedbackLabelRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel, + ( + | protos.google.cloud.contactcenterinsights.v1.IUpdateFeedbackLabelRequest + | 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({ + 'feedback_label.name': request.feedbackLabel!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateFeedbackLabel(request, options, callback); + } + /** + * Delete feedback label. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the feedback label to delete. + * @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/v1/contact_center_insights.delete_feedback_label.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_DeleteFeedbackLabel_async + */ + deleteFeedbackLabel( + request?: protos.google.cloud.contactcenterinsights.v1.IDeleteFeedbackLabelRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.contactcenterinsights.v1.IDeleteFeedbackLabelRequest + | undefined + ), + {} | undefined, + ] + >; + deleteFeedbackLabel( + request: protos.google.cloud.contactcenterinsights.v1.IDeleteFeedbackLabelRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteFeedbackLabelRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteFeedbackLabel( + request: protos.google.cloud.contactcenterinsights.v1.IDeleteFeedbackLabelRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteFeedbackLabelRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteFeedbackLabel( + request?: protos.google.cloud.contactcenterinsights.v1.IDeleteFeedbackLabelRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteFeedbackLabelRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteFeedbackLabelRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.contactcenterinsights.v1.IDeleteFeedbackLabelRequest + | 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.deleteFeedbackLabel(request, options, callback); + } + + /** + * Create a long-running conversation upload operation. This method differs + * from `CreateConversation` by allowing audio transcription and optional DLP + * redaction. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the conversation. + * @param {google.cloud.contactcenterinsights.v1.Conversation} request.conversation + * Required. The conversation resource to create. + * @param {string} [request.conversationId] + * Optional. A unique ID for the new conversation. This ID will become the + * final component of the conversation's resource name. If no ID is specified, + * a server-generated ID will be used. + * + * This value should be 4-64 characters and must match the regular + * expression `^{@link protos.0-9|a-z0-9-]{4,64}$`. Valid characters are `[a-z}-` + * @param {google.cloud.contactcenterinsights.v1.RedactionConfig} [request.redactionConfig] + * Optional. DLP settings for transcript redaction. Will default to the config + * specified in Settings. + * @param {google.cloud.contactcenterinsights.v1.SpeechConfig} [request.speechConfig] + * Optional. Speech-to-Text configuration. Will default to the config + * specified in Settings. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.upload_conversation.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_UploadConversation_async + */ + uploadConversation( + request?: protos.google.cloud.contactcenterinsights.v1.IUploadConversationRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IConversation, + protos.google.cloud.contactcenterinsights.v1.IUploadConversationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + uploadConversation( + request: protos.google.cloud.contactcenterinsights.v1.IUploadConversationRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IConversation, + protos.google.cloud.contactcenterinsights.v1.IUploadConversationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + uploadConversation( + request: protos.google.cloud.contactcenterinsights.v1.IUploadConversationRequest, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IConversation, + protos.google.cloud.contactcenterinsights.v1.IUploadConversationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + uploadConversation( + request?: protos.google.cloud.contactcenterinsights.v1.IUploadConversationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IConversation, + protos.google.cloud.contactcenterinsights.v1.IUploadConversationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IConversation, + protos.google.cloud.contactcenterinsights.v1.IUploadConversationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IConversation, + protos.google.cloud.contactcenterinsights.v1.IUploadConversationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.uploadConversation(request, options, callback); + } + /** + * Check the status of the long running operation returned by `uploadConversation()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.upload_conversation.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_UploadConversation_async + */ + async checkUploadConversationProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.contactcenterinsights.v1.Conversation, + protos.google.cloud.contactcenterinsights.v1.UploadConversationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.uploadConversation, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.contactcenterinsights.v1.Conversation, + protos.google.cloud.contactcenterinsights.v1.UploadConversationMetadata + >; + } + /** + * Creates an analysis. The long running operation is done when the analysis + * has completed. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the analysis. + * @param {google.cloud.contactcenterinsights.v1.Analysis} request.analysis + * Required. The analysis to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.create_analysis.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_CreateAnalysis_async + */ + createAnalysis( + request?: protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IAnalysis, + protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createAnalysis( + request: protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IAnalysis, + protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createAnalysis( + request: protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IAnalysis, + protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createAnalysis( + request?: protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IAnalysis, + protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IAnalysis, + protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IAnalysis, + protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createAnalysis(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createAnalysis()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.create_analysis.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_CreateAnalysis_async + */ + async checkCreateAnalysisProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.contactcenterinsights.v1.Analysis, + protos.google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createAnalysis, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.contactcenterinsights.v1.Analysis, + protos.google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata + >; + } + /** + * Analyzes multiple conversations in a single request. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource to create analyses in. + * @param {string} request.filter + * Required. Filter used to select the subset of conversations to analyze. + * @param {number} request.analysisPercentage + * Required. Percentage of selected conversation to analyze, between + * [0, 100]. + * @param {google.cloud.contactcenterinsights.v1.AnnotatorSelector} request.annotatorSelector + * To select the annotators to run and the phrase matchers to use + * (if any). If not specified, all annotators will be run. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.bulk_analyze_conversations.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_BulkAnalyzeConversations_async + */ + bulkAnalyzeConversations( + request?: protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + bulkAnalyzeConversations( + request: protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + bulkAnalyzeConversations( + request: protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsRequest, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + bulkAnalyzeConversations( + request?: protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.bulkAnalyzeConversations( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `bulkAnalyzeConversations()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.bulk_analyze_conversations.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_BulkAnalyzeConversations_async + */ + async checkBulkAnalyzeConversationsProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.bulkAnalyzeConversations, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata + >; + } + /** + * Deletes multiple conversations in a single request. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource to delete conversations from. + * Format: + * projects/{project}/locations/{location} + * @param {string} request.filter + * Filter used to select the subset of conversations to delete. + * @param {number} request.maxDeleteCount + * Maximum number of conversations to delete. + * @param {boolean} request.force + * If set to true, all of this conversation's analyses will also be deleted. + * Otherwise, the request will only succeed if the conversation has no + * analyses. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.bulk_delete_conversations.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_BulkDeleteConversations_async + */ + bulkDeleteConversations( + request?: protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + bulkDeleteConversations( + request: protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + bulkDeleteConversations( + request: protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsRequest, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + bulkDeleteConversations( + request?: protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.bulkDeleteConversations( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `bulkDeleteConversations()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.bulk_delete_conversations.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_BulkDeleteConversations_async + */ + async checkBulkDeleteConversationsProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.contactcenterinsights.v1.BulkDeleteConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.BulkDeleteConversationsMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.bulkDeleteConversations, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.contactcenterinsights.v1.BulkDeleteConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.BulkDeleteConversationsMetadata + >; + } + /** + * Imports conversations and processes them according to the user's + * configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource} request.gcsSource + * A cloud storage bucket source. Note that any previously ingested objects + * from the source will be skipped to avoid duplication. + * @param {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig} request.transcriptObjectConfig + * Configuration for when `source` contains conversation transcripts. + * @param {string} request.parent + * Required. The parent resource for new conversations. + * @param {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig} request.conversationConfig + * Configuration that applies to all conversations. + * @param {google.cloud.contactcenterinsights.v1.RedactionConfig} [request.redactionConfig] + * Optional. DLP settings for transcript redaction. Optional, will default to + * the config specified in Settings. + * @param {google.cloud.contactcenterinsights.v1.SpeechConfig} [request.speechConfig] + * Optional. Default Speech-to-Text configuration. Optional, will default to + * the config specified in Settings. + * @param {number} [request.sampleSize] + * Optional. If set, this fields indicates the number of objects to ingest + * from the Cloud Storage bucket. If empty, the entire bucket will be + * ingested. Unless they are first deleted, conversations produced through + * sampling won't be ingested by subsequent ingest requests. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.ingest_conversations.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_IngestConversations_async + */ + ingestConversations( + request?: protos.google.cloud.contactcenterinsights.v1.IIngestConversationsRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IIngestConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IIngestConversationsMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + ingestConversations( + request: protos.google.cloud.contactcenterinsights.v1.IIngestConversationsRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IIngestConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IIngestConversationsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + ingestConversations( + request: protos.google.cloud.contactcenterinsights.v1.IIngestConversationsRequest, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IIngestConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IIngestConversationsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + ingestConversations( + request?: protos.google.cloud.contactcenterinsights.v1.IIngestConversationsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IIngestConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IIngestConversationsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IIngestConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IIngestConversationsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IIngestConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IIngestConversationsMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.ingestConversations(request, options, callback); + } + /** + * Check the status of the long running operation returned by `ingestConversations()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.ingest_conversations.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_IngestConversations_async + */ + async checkIngestConversationsProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IngestConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IngestConversationsMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.ingestConversations, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.contactcenterinsights.v1.IngestConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IngestConversationsMetadata + >; + } + /** + * Export insights data to a destination defined in the request body. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination} request.bigQueryDestination + * Specified if sink is a BigQuery table. + * @param {string} request.parent + * Required. The parent resource to export data from. + * @param {string} request.filter + * A filter to reduce results to a specific subset. Useful for exporting + * conversations with specific properties. + * @param {string} request.kmsKey + * A fully qualified KMS key name for BigQuery tables protected by CMEK. + * Format: + * projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}/cryptoKeyVersions/{version} + * @param {google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.WriteDisposition} request.writeDisposition + * Options for what to do if the destination table already exists. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.export_insights_data.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ExportInsightsData_async + */ + exportInsightsData( + request?: protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataResponse, + protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + exportInsightsData( + request: protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataResponse, + protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + exportInsightsData( + request: protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataRequest, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataResponse, + protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + exportInsightsData( + request?: protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataResponse, + protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataResponse, + protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataResponse, + protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.exportInsightsData(request, options, callback); + } + /** + * Check the status of the long running operation returned by `exportInsightsData()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.export_insights_data.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ExportInsightsData_async + */ + async checkExportInsightsDataProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse, + protos.google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.exportInsightsData, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse, + protos.google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata + >; + } + /** + * Creates an issue model. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the issue model. + * @param {google.cloud.contactcenterinsights.v1.IssueModel} request.issueModel + * Required. The issue model to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.create_issue_model.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_CreateIssueModel_async + */ + createIssueModel( + request?: protos.google.cloud.contactcenterinsights.v1.ICreateIssueModelRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IIssueModel, + protos.google.cloud.contactcenterinsights.v1.ICreateIssueModelMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createIssueModel( + request: protos.google.cloud.contactcenterinsights.v1.ICreateIssueModelRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IIssueModel, + protos.google.cloud.contactcenterinsights.v1.ICreateIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createIssueModel( + request: protos.google.cloud.contactcenterinsights.v1.ICreateIssueModelRequest, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IIssueModel, + protos.google.cloud.contactcenterinsights.v1.ICreateIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createIssueModel( + request?: protos.google.cloud.contactcenterinsights.v1.ICreateIssueModelRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IIssueModel, + protos.google.cloud.contactcenterinsights.v1.ICreateIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IIssueModel, + protos.google.cloud.contactcenterinsights.v1.ICreateIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IIssueModel, + protos.google.cloud.contactcenterinsights.v1.ICreateIssueModelMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createIssueModel(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createIssueModel()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.create_issue_model.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_CreateIssueModel_async + */ + async checkCreateIssueModelProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IssueModel, + protos.google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createIssueModel, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.contactcenterinsights.v1.IssueModel, + protos.google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata + >; + } + /** + * Deletes an issue model. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the issue model to delete. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.delete_issue_model.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_DeleteIssueModel_async + */ + deleteIssueModel( + request?: protos.google.cloud.contactcenterinsights.v1.IDeleteIssueModelRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.contactcenterinsights.v1.IDeleteIssueModelMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + deleteIssueModel( + request: protos.google.cloud.contactcenterinsights.v1.IDeleteIssueModelRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.contactcenterinsights.v1.IDeleteIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteIssueModel( + request: protos.google.cloud.contactcenterinsights.v1.IDeleteIssueModelRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.contactcenterinsights.v1.IDeleteIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteIssueModel( + request?: protos.google.cloud.contactcenterinsights.v1.IDeleteIssueModelRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.contactcenterinsights.v1.IDeleteIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.contactcenterinsights.v1.IDeleteIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.contactcenterinsights.v1.IDeleteIssueModelMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteIssueModel(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteIssueModel()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.delete_issue_model.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_DeleteIssueModel_async + */ + async checkDeleteIssueModelProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.deleteIssueModel, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata + >; + } + /** + * Deploys an issue model. Returns an error if a model is already deployed. + * An issue model can only be used in analysis after it has been deployed. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The issue model to deploy. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.deploy_issue_model.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_DeployIssueModel_async + */ + deployIssueModel( + request?: protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + deployIssueModel( + request: protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deployIssueModel( + request: protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelRequest, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deployIssueModel( + request?: protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deployIssueModel(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deployIssueModel()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.deploy_issue_model.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_DeployIssueModel_async + */ + async checkDeployIssueModelProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.contactcenterinsights.v1.DeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.deployIssueModel, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.contactcenterinsights.v1.DeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata + >; + } + /** + * Undeploys an issue model. + * An issue model can not be used in analysis after it has been undeployed. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The issue model to undeploy. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.undeploy_issue_model.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_UndeployIssueModel_async + */ + undeployIssueModel( + request?: protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + undeployIssueModel( + request: protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + undeployIssueModel( + request: protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelRequest, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + undeployIssueModel( + request?: protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.undeployIssueModel(request, options, callback); + } + /** + * Check the status of the long running operation returned by `undeployIssueModel()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.undeploy_issue_model.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_UndeployIssueModel_async + */ + async checkUndeployIssueModelProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.undeployIssueModel, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata + >; + } + /** + * Exports an issue model to the provided destination. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination} request.gcsDestination + * Google Cloud Storage URI to export the issue model to. + * @param {string} request.name + * Required. The issue model to export. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.export_issue_model.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ExportIssueModel_async + */ + exportIssueModel( + request?: protos.google.cloud.contactcenterinsights.v1.IExportIssueModelRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IExportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IExportIssueModelMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + exportIssueModel( + request: protos.google.cloud.contactcenterinsights.v1.IExportIssueModelRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IExportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IExportIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + exportIssueModel( + request: protos.google.cloud.contactcenterinsights.v1.IExportIssueModelRequest, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IExportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IExportIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + exportIssueModel( + request?: protos.google.cloud.contactcenterinsights.v1.IExportIssueModelRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IExportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IExportIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IExportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IExportIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IExportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IExportIssueModelMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.exportIssueModel(request, options, callback); + } + /** + * Check the status of the long running operation returned by `exportIssueModel()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.export_issue_model.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ExportIssueModel_async + */ + async checkExportIssueModelProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.contactcenterinsights.v1.ExportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.exportIssueModel, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.contactcenterinsights.v1.ExportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata + >; + } + /** + * Imports an issue model from a Cloud Storage bucket. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource} request.gcsSource + * Google Cloud Storage source message. + * @param {string} request.parent + * Required. The parent resource of the issue model. + * @param {boolean} [request.createNewModel] + * Optional. If set to true, will create an issue model from the imported file + * with randomly generated IDs for the issue model and corresponding issues. + * Otherwise, replaces an existing model with the same ID as the file. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.import_issue_model.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ImportIssueModel_async + */ + importIssueModel( + request?: protos.google.cloud.contactcenterinsights.v1.IImportIssueModelRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IImportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IImportIssueModelMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + importIssueModel( + request: protos.google.cloud.contactcenterinsights.v1.IImportIssueModelRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IImportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IImportIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + importIssueModel( + request: protos.google.cloud.contactcenterinsights.v1.IImportIssueModelRequest, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IImportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IImportIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + importIssueModel( + request?: protos.google.cloud.contactcenterinsights.v1.IImportIssueModelRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IImportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IImportIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IImportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IImportIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IImportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IImportIssueModelMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.importIssueModel(request, options, callback); + } + /** + * Check the status of the long running operation returned by `importIssueModel()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.import_issue_model.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ImportIssueModel_async + */ + async checkImportIssueModelProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.contactcenterinsights.v1.ImportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.importIssueModel, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.contactcenterinsights.v1.ImportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata + >; + } + /** + * Initializes a location-level encryption key specification. An error will + * result if the location has resources already created before the + * initialization. After the encryption specification is initialized at a + * location, it is immutable and all newly created resources under the + * location will be encrypted with the existing specification. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.contactcenterinsights.v1.EncryptionSpec} request.encryptionSpec + * Required. The encryption spec used for CMEK encryption. It is required that + * the kms key is in the same region as the endpoint. The same key will be + * used for all provisioned resources, if encryption is available. If the + * `kms_key_name` field is left empty, no encryption will be enforced. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.initialize_encryption_spec.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_InitializeEncryptionSpec_async + */ + initializeEncryptionSpec( + request?: protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse, + protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + initializeEncryptionSpec( + request: protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse, + protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + initializeEncryptionSpec( + request: protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse, + protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + initializeEncryptionSpec( + request?: protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse, + protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse, + protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse, + protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'encryption_spec.name': request.encryptionSpec!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.initializeEncryptionSpec( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `initializeEncryptionSpec()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.initialize_encryption_spec.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_InitializeEncryptionSpec_async + */ + async checkInitializeEncryptionSpecProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse, + protos.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.initializeEncryptionSpec, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse, + protos.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata + >; + } + /** + * Query metrics. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.location + * Required. The location of the data. + * "projects/{project}/locations/{location}" + * @param {string} request.filter + * Required. Filter to select a subset of conversations to compute the + * metrics. Must specify a window of the conversation create time to compute + * the metrics. The returned metrics will be from the range [DATE(starting + * create time), DATE(ending create time)). + * + * @param {google.cloud.contactcenterinsights.v1.QueryMetricsRequest.TimeGranularity} request.timeGranularity + * The time granularity of each data point in the time series. + * Defaults to NONE if this field is unspecified. + * @param {number[]} request.dimensions + * The dimensions that determine the grouping key for the query. Defaults to + * no dimension if this field is unspecified. If a dimension is specified, + * its key must also be specified. Each dimension's key must be unique. + * + * If a time granularity is also specified, metric values in the dimension + * will be bucketed by this granularity. + * + * Up to one dimension is supported for now. + * @param {google.protobuf.FieldMask} request.measureMask + * Measures to return. Defaults to all measures if this field is unspecified. + * A valid mask should traverse from the `measure` field from the response. + * For example, a path from a measure mask to get the conversation count is + * "conversation_measure.count". + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.query_metrics.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_QueryMetrics_async + */ + queryMetrics( + request?: protos.google.cloud.contactcenterinsights.v1.IQueryMetricsRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IQueryMetricsResponse, + protos.google.cloud.contactcenterinsights.v1.IQueryMetricsMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + queryMetrics( + request: protos.google.cloud.contactcenterinsights.v1.IQueryMetricsRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IQueryMetricsResponse, + protos.google.cloud.contactcenterinsights.v1.IQueryMetricsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + queryMetrics( + request: protos.google.cloud.contactcenterinsights.v1.IQueryMetricsRequest, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IQueryMetricsResponse, + protos.google.cloud.contactcenterinsights.v1.IQueryMetricsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + queryMetrics( + request?: protos.google.cloud.contactcenterinsights.v1.IQueryMetricsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IQueryMetricsResponse, + protos.google.cloud.contactcenterinsights.v1.IQueryMetricsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IQueryMetricsResponse, + protos.google.cloud.contactcenterinsights.v1.IQueryMetricsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IQueryMetricsResponse, + protos.google.cloud.contactcenterinsights.v1.IQueryMetricsMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + location: request.location ?? '', + }); + this.initialize(); + return this.innerApiCalls.queryMetrics(request, options, callback); + } + /** + * Check the status of the long running operation returned by `queryMetrics()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.query_metrics.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_QueryMetrics_async + */ + async checkQueryMetricsProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.contactcenterinsights.v1.QueryMetricsResponse, + protos.google.cloud.contactcenterinsights.v1.QueryMetricsMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.queryMetrics, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.contactcenterinsights.v1.QueryMetricsResponse, + protos.google.cloud.contactcenterinsights.v1.QueryMetricsMetadata + >; + } + /** + * Fine tune one or more QaModels. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource for new fine tuning job instance. + * @param {string} request.filter + * Required. Filter for selecting the feedback labels that needs to be + * used for training. + * This filter can be used to limit the feedback labels used for tuning to a + * feedback labels created or updated for a specific time-window etc. + * @param {boolean} [request.validateOnly] + * Optional. Run in validate only mode, no fine tuning will actually run. + * Data quality validations like training data distributions will run. + * Even when set to false, the data quality validations will still run but + * once the validations complete we will proceed with the fine tune, if + * applicable. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.tune_qa_scorecard_revision.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_TuneQaScorecardRevision_async + */ + tuneQaScorecardRevision( + request?: protos.google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionResponse, + protos.google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + tuneQaScorecardRevision( + request: protos.google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionResponse, + protos.google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + tuneQaScorecardRevision( + request: protos.google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionRequest, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionResponse, + protos.google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + tuneQaScorecardRevision( + request?: protos.google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionResponse, + protos.google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionResponse, + protos.google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionResponse, + protos.google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.tuneQaScorecardRevision( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `tuneQaScorecardRevision()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.tune_qa_scorecard_revision.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_TuneQaScorecardRevision_async + */ + async checkTuneQaScorecardRevisionProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionResponse, + protos.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.tuneQaScorecardRevision, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionResponse, + protos.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionMetadata + >; + } + /** + * Upload feedback labels in bulk. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest.GcsSource} request.gcsSource + * A cloud storage bucket source. + * @param {string} request.parent + * Required. The parent resource for new feedback labels. + * @param {boolean} [request.validateOnly] + * Optional. If set, upload will not happen and the labels will be validated. + * If not set, then default behavior will be to upload the labels after + * validation is complete. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.bulk_upload_feedback_labels.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_BulkUploadFeedbackLabels_async + */ + bulkUploadFeedbackLabels( + request?: protos.google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + bulkUploadFeedbackLabels( + request: protos.google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + bulkUploadFeedbackLabels( + request: protos.google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsRequest, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + bulkUploadFeedbackLabels( + request?: protos.google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.bulkUploadFeedbackLabels( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `bulkUploadFeedbackLabels()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.bulk_upload_feedback_labels.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_BulkUploadFeedbackLabels_async + */ + async checkBulkUploadFeedbackLabelsProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsResponse, + protos.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.bulkUploadFeedbackLabels, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsResponse, + protos.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsMetadata + >; + } + /** + * Download feedback labels in bulk. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.GcsDestination} request.gcsDestination + * A cloud storage bucket destination. + * @param {string} request.parent + * Required. The parent resource for new feedback labels. + * @param {string} [request.filter] + * Optional. A filter to reduce results to a specific subset. Supports + * disjunctions (OR) and conjunctions (AND). + * + * Supported fields: + * + * * `issue_model_id` + * * `qa_question_id` + * * `qa_scorecard_id` + * * `min_create_time` + * * `max_create_time` + * * `min_update_time` + * * `max_update_time` + * * `feedback_label_type`: QUALITY_AI, TOPIC_MODELING + * @param {number} [request.maxDownloadCount] + * Optional. Limits the maximum number of feedback labels that will be + * downloaded. The first `N` feedback labels will be downloaded. + * @param {google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest.FeedbackLabelType} [request.feedbackLabelType] + * Optional. The type of feedback labels that will be downloaded. + * @param {string} [request.conversationFilter] + * Optional. Filter parent conversations to download feedback labels for. + * When specified, the feedback labels will be downloaded for the + * conversations that match the filter. + * If `template_qa_scorecard_id` is set, all the conversations that match the + * filter will be paired with the questions under the scorecard for labeling. + * @param {string[]} [request.templateQaScorecardId] + * Optional. If set, a template for labeling conversations and scorecard + * questions will be created from the conversation_filter and the questions + * under the scorecard(s). The feedback label `filter` will be ignored. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.bulk_download_feedback_labels.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_BulkDownloadFeedbackLabels_async + */ + bulkDownloadFeedbackLabels( + request?: protos.google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + bulkDownloadFeedbackLabels( + request: protos.google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + bulkDownloadFeedbackLabels( + request: protos.google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsRequest, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + bulkDownloadFeedbackLabels( + request?: protos.google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.bulkDownloadFeedbackLabels( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `bulkDownloadFeedbackLabels()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.bulk_download_feedback_labels.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_BulkDownloadFeedbackLabels_async + */ + async checkBulkDownloadFeedbackLabelsProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsResponse, + protos.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.bulkDownloadFeedbackLabels, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsResponse, + protos.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsMetadata + >; + } + /** + * Lists conversations. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the conversation. + * @param {number} request.pageSize + * The maximum number of conversations to return in the response. A valid page + * size ranges from 0 to 100,000 inclusive. If the page size is zero or + * unspecified, a default page size of 100 will be chosen. Note that a call + * might return fewer results than the requested page size. + * @param {string} request.pageToken + * The value returned by the last `ListConversationsResponse`. This value + * indicates that this is a continuation of a prior `ListConversations` call + * and that the system should return the next page of data. + * @param {string} request.filter + * A filter to reduce results to a specific subset. Useful for querying + * conversations with specific properties. + * @param {string} [request.orderBy] + * Optional. The attribute by which to order conversations in the response. + * If empty, conversations will be ordered by descending creation time. + * Supported values are one of the following: + * + * * create_time + * * customer_satisfaction_rating + * * duration + * * latest_analysis + * * start_time + * * turn_count + * + * The default sort order is ascending. To specify order, append `asc` or + * `desc` (`create_time desc`). + * For more details, see [Google AIPs + * Ordering](https://google.aip.dev/132#ordering). + * @param {google.cloud.contactcenterinsights.v1.ConversationView} request.view + * The level of details of the conversation. Default is `BASIC`. + * @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.contactcenterinsights.v1.Conversation|Conversation}. + * 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 `listConversationsAsync()` + * 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. + */ + listConversations( + request?: protos.google.cloud.contactcenterinsights.v1.IListConversationsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IConversation[], + protos.google.cloud.contactcenterinsights.v1.IListConversationsRequest | null, + protos.google.cloud.contactcenterinsights.v1.IListConversationsResponse, + ] + >; + listConversations( + request: protos.google.cloud.contactcenterinsights.v1.IListConversationsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListConversationsRequest, + | protos.google.cloud.contactcenterinsights.v1.IListConversationsResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IConversation + > + ): void; + listConversations( + request: protos.google.cloud.contactcenterinsights.v1.IListConversationsRequest, + callback: PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListConversationsRequest, + | protos.google.cloud.contactcenterinsights.v1.IListConversationsResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IConversation + > + ): void; + listConversations( + request?: protos.google.cloud.contactcenterinsights.v1.IListConversationsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListConversationsRequest, + | protos.google.cloud.contactcenterinsights.v1.IListConversationsResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IConversation + >, + callback?: PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListConversationsRequest, + | protos.google.cloud.contactcenterinsights.v1.IListConversationsResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IConversation + > + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IConversation[], + protos.google.cloud.contactcenterinsights.v1.IListConversationsRequest | null, + protos.google.cloud.contactcenterinsights.v1.IListConversationsResponse, + ] + > | 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.listConversations(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 parent resource of the conversation. + * @param {number} request.pageSize + * The maximum number of conversations to return in the response. A valid page + * size ranges from 0 to 100,000 inclusive. If the page size is zero or + * unspecified, a default page size of 100 will be chosen. Note that a call + * might return fewer results than the requested page size. + * @param {string} request.pageToken + * The value returned by the last `ListConversationsResponse`. This value + * indicates that this is a continuation of a prior `ListConversations` call + * and that the system should return the next page of data. + * @param {string} request.filter + * A filter to reduce results to a specific subset. Useful for querying + * conversations with specific properties. + * @param {string} [request.orderBy] + * Optional. The attribute by which to order conversations in the response. + * If empty, conversations will be ordered by descending creation time. + * Supported values are one of the following: + * + * * create_time + * * customer_satisfaction_rating + * * duration + * * latest_analysis + * * start_time + * * turn_count + * + * The default sort order is ascending. To specify order, append `asc` or + * `desc` (`create_time desc`). + * For more details, see [Google AIPs + * Ordering](https://google.aip.dev/132#ordering). + * @param {google.cloud.contactcenterinsights.v1.ConversationView} request.view + * The level of details of the conversation. Default is `BASIC`. + * @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.contactcenterinsights.v1.Conversation|Conversation} 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 `listConversationsAsync()` + * 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. + */ + listConversationsStream( + request?: protos.google.cloud.contactcenterinsights.v1.IListConversationsRequest, + 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['listConversations']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listConversations.createStream( + this.innerApiCalls.listConversations as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listConversations`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the conversation. + * @param {number} request.pageSize + * The maximum number of conversations to return in the response. A valid page + * size ranges from 0 to 100,000 inclusive. If the page size is zero or + * unspecified, a default page size of 100 will be chosen. Note that a call + * might return fewer results than the requested page size. + * @param {string} request.pageToken + * The value returned by the last `ListConversationsResponse`. This value + * indicates that this is a continuation of a prior `ListConversations` call + * and that the system should return the next page of data. + * @param {string} request.filter + * A filter to reduce results to a specific subset. Useful for querying + * conversations with specific properties. + * @param {string} [request.orderBy] + * Optional. The attribute by which to order conversations in the response. + * If empty, conversations will be ordered by descending creation time. + * Supported values are one of the following: + * + * * create_time + * * customer_satisfaction_rating + * * duration + * * latest_analysis + * * start_time + * * turn_count + * + * The default sort order is ascending. To specify order, append `asc` or + * `desc` (`create_time desc`). + * For more details, see [Google AIPs + * Ordering](https://google.aip.dev/132#ordering). + * @param {google.cloud.contactcenterinsights.v1.ConversationView} request.view + * The level of details of the conversation. Default is `BASIC`. + * @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.contactcenterinsights.v1.Conversation|Conversation}. 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/v1/contact_center_insights.list_conversations.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ListConversations_async + */ + listConversationsAsync( + request?: protos.google.cloud.contactcenterinsights.v1.IListConversationsRequest, + 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['listConversations']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listConversations.asyncIterate( + this.innerApiCalls['listConversations'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists analyses. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the analyses. + * @param {number} request.pageSize + * The maximum number of analyses to return in the response. If this + * value is zero, the service will select a default size. A call might return + * fewer objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} request.pageToken + * The value returned by the last `ListAnalysesResponse`; indicates + * that this is a continuation of a prior `ListAnalyses` call and + * the system should return the next page of data. + * @param {string} request.filter + * A filter to reduce results to a specific subset. Useful for querying + * conversations with specific properties. + * @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.contactcenterinsights.v1.Analysis|Analysis}. + * 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 `listAnalysesAsync()` + * 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. + */ + listAnalyses( + request?: protos.google.cloud.contactcenterinsights.v1.IListAnalysesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IAnalysis[], + protos.google.cloud.contactcenterinsights.v1.IListAnalysesRequest | null, + protos.google.cloud.contactcenterinsights.v1.IListAnalysesResponse, + ] + >; + listAnalyses( + request: protos.google.cloud.contactcenterinsights.v1.IListAnalysesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListAnalysesRequest, + | protos.google.cloud.contactcenterinsights.v1.IListAnalysesResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IAnalysis + > + ): void; + listAnalyses( + request: protos.google.cloud.contactcenterinsights.v1.IListAnalysesRequest, + callback: PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListAnalysesRequest, + | protos.google.cloud.contactcenterinsights.v1.IListAnalysesResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IAnalysis + > + ): void; + listAnalyses( + request?: protos.google.cloud.contactcenterinsights.v1.IListAnalysesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListAnalysesRequest, + | protos.google.cloud.contactcenterinsights.v1.IListAnalysesResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IAnalysis + >, + callback?: PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListAnalysesRequest, + | protos.google.cloud.contactcenterinsights.v1.IListAnalysesResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IAnalysis + > + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IAnalysis[], + protos.google.cloud.contactcenterinsights.v1.IListAnalysesRequest | null, + protos.google.cloud.contactcenterinsights.v1.IListAnalysesResponse, + ] + > | 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.listAnalyses(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 parent resource of the analyses. + * @param {number} request.pageSize + * The maximum number of analyses to return in the response. If this + * value is zero, the service will select a default size. A call might return + * fewer objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} request.pageToken + * The value returned by the last `ListAnalysesResponse`; indicates + * that this is a continuation of a prior `ListAnalyses` call and + * the system should return the next page of data. + * @param {string} request.filter + * A filter to reduce results to a specific subset. Useful for querying + * conversations with specific properties. + * @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.contactcenterinsights.v1.Analysis|Analysis} 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 `listAnalysesAsync()` + * 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. + */ + listAnalysesStream( + request?: protos.google.cloud.contactcenterinsights.v1.IListAnalysesRequest, + 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['listAnalyses']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAnalyses.createStream( + this.innerApiCalls.listAnalyses as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listAnalyses`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the analyses. + * @param {number} request.pageSize + * The maximum number of analyses to return in the response. If this + * value is zero, the service will select a default size. A call might return + * fewer objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} request.pageToken + * The value returned by the last `ListAnalysesResponse`; indicates + * that this is a continuation of a prior `ListAnalyses` call and + * the system should return the next page of data. + * @param {string} request.filter + * A filter to reduce results to a specific subset. Useful for querying + * conversations with specific properties. + * @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.contactcenterinsights.v1.Analysis|Analysis}. 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/v1/contact_center_insights.list_analyses.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ListAnalyses_async + */ + listAnalysesAsync( + request?: protos.google.cloud.contactcenterinsights.v1.IListAnalysesRequest, + 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['listAnalyses']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAnalyses.asyncIterate( + this.innerApiCalls['listAnalyses'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists phrase matchers. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the phrase matcher. + * @param {number} request.pageSize + * The maximum number of phrase matchers to return in the response. If this + * value is zero, the service will select a default size. A call might return + * fewer objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} request.pageToken + * The value returned by the last `ListPhraseMatchersResponse`. This value + * indicates that this is a continuation of a prior `ListPhraseMatchers` call + * and that the system should return the next page of data. + * @param {string} request.filter + * A filter to reduce results to a specific subset. Useful for querying + * phrase matchers with specific properties. + * @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.contactcenterinsights.v1.PhraseMatcher|PhraseMatcher}. + * 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 `listPhraseMatchersAsync()` + * 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. + */ + listPhraseMatchers( + request?: protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher[], + protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest | null, + protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse, + ] + >; + listPhraseMatchers( + request: protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, + | protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher + > + ): void; + listPhraseMatchers( + request: protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, + callback: PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, + | protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher + > + ): void; + listPhraseMatchers( + request?: protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, + | protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher + >, + callback?: PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, + | protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher + > + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher[], + protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest | null, + protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse, + ] + > | 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.listPhraseMatchers(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 parent resource of the phrase matcher. + * @param {number} request.pageSize + * The maximum number of phrase matchers to return in the response. If this + * value is zero, the service will select a default size. A call might return + * fewer objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} request.pageToken + * The value returned by the last `ListPhraseMatchersResponse`. This value + * indicates that this is a continuation of a prior `ListPhraseMatchers` call + * and that the system should return the next page of data. + * @param {string} request.filter + * A filter to reduce results to a specific subset. Useful for querying + * phrase matchers with specific properties. + * @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.contactcenterinsights.v1.PhraseMatcher|PhraseMatcher} 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 `listPhraseMatchersAsync()` + * 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. + */ + listPhraseMatchersStream( + request?: protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, + 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['listPhraseMatchers']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listPhraseMatchers.createStream( + this.innerApiCalls.listPhraseMatchers as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listPhraseMatchers`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the phrase matcher. + * @param {number} request.pageSize + * The maximum number of phrase matchers to return in the response. If this + * value is zero, the service will select a default size. A call might return + * fewer objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} request.pageToken + * The value returned by the last `ListPhraseMatchersResponse`. This value + * indicates that this is a continuation of a prior `ListPhraseMatchers` call + * and that the system should return the next page of data. + * @param {string} request.filter + * A filter to reduce results to a specific subset. Useful for querying + * phrase matchers with specific properties. + * @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.contactcenterinsights.v1.PhraseMatcher|PhraseMatcher}. 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/v1/contact_center_insights.list_phrase_matchers.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ListPhraseMatchers_async + */ + listPhraseMatchersAsync( + request?: protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, + 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['listPhraseMatchers']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listPhraseMatchers.asyncIterate( + this.innerApiCalls['listPhraseMatchers'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists analysis rules. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the analysis rules. + * @param {number} [request.pageSize] + * Optional. The maximum number of analysis rule to return in the response. If + * this value is zero, the service will select a default size. A call may + * return fewer objects than requested. A non-empty `next_page_token` in the + * response indicates that more data is available. + * @param {string} [request.pageToken] + * Optional. The value returned by the last `ListAnalysisRulesResponse`; + * indicates that this is a continuation of a prior `ListAnalysisRules` call + * and the system should return the next page of data. + * @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.contactcenterinsights.v1.AnalysisRule|AnalysisRule}. + * 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 `listAnalysisRulesAsync()` + * 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. + */ + listAnalysisRules( + request?: protos.google.cloud.contactcenterinsights.v1.IListAnalysisRulesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IAnalysisRule[], + protos.google.cloud.contactcenterinsights.v1.IListAnalysisRulesRequest | null, + protos.google.cloud.contactcenterinsights.v1.IListAnalysisRulesResponse, + ] + >; + listAnalysisRules( + request: protos.google.cloud.contactcenterinsights.v1.IListAnalysisRulesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListAnalysisRulesRequest, + | protos.google.cloud.contactcenterinsights.v1.IListAnalysisRulesResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IAnalysisRule + > + ): void; + listAnalysisRules( + request: protos.google.cloud.contactcenterinsights.v1.IListAnalysisRulesRequest, + callback: PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListAnalysisRulesRequest, + | protos.google.cloud.contactcenterinsights.v1.IListAnalysisRulesResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IAnalysisRule + > + ): void; + listAnalysisRules( + request?: protos.google.cloud.contactcenterinsights.v1.IListAnalysisRulesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListAnalysisRulesRequest, + | protos.google.cloud.contactcenterinsights.v1.IListAnalysisRulesResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IAnalysisRule + >, + callback?: PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListAnalysisRulesRequest, + | protos.google.cloud.contactcenterinsights.v1.IListAnalysisRulesResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IAnalysisRule + > + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IAnalysisRule[], + protos.google.cloud.contactcenterinsights.v1.IListAnalysisRulesRequest | null, + protos.google.cloud.contactcenterinsights.v1.IListAnalysisRulesResponse, + ] + > | 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.listAnalysisRules(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 parent resource of the analysis rules. + * @param {number} [request.pageSize] + * Optional. The maximum number of analysis rule to return in the response. If + * this value is zero, the service will select a default size. A call may + * return fewer objects than requested. A non-empty `next_page_token` in the + * response indicates that more data is available. + * @param {string} [request.pageToken] + * Optional. The value returned by the last `ListAnalysisRulesResponse`; + * indicates that this is a continuation of a prior `ListAnalysisRules` call + * and the system should return the next page of data. + * @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.contactcenterinsights.v1.AnalysisRule|AnalysisRule} 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 `listAnalysisRulesAsync()` + * 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. + */ + listAnalysisRulesStream( + request?: protos.google.cloud.contactcenterinsights.v1.IListAnalysisRulesRequest, + 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['listAnalysisRules']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAnalysisRules.createStream( + this.innerApiCalls.listAnalysisRules as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listAnalysisRules`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the analysis rules. + * @param {number} [request.pageSize] + * Optional. The maximum number of analysis rule to return in the response. If + * this value is zero, the service will select a default size. A call may + * return fewer objects than requested. A non-empty `next_page_token` in the + * response indicates that more data is available. + * @param {string} [request.pageToken] + * Optional. The value returned by the last `ListAnalysisRulesResponse`; + * indicates that this is a continuation of a prior `ListAnalysisRules` call + * and the system should return the next page of data. + * @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.contactcenterinsights.v1.AnalysisRule|AnalysisRule}. 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/v1/contact_center_insights.list_analysis_rules.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ListAnalysisRules_async + */ + listAnalysisRulesAsync( + request?: protos.google.cloud.contactcenterinsights.v1.IListAnalysisRulesRequest, + 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['listAnalysisRules']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAnalysisRules.asyncIterate( + this.innerApiCalls['listAnalysisRules'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists views. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the views. + * @param {number} request.pageSize + * The maximum number of views to return in the response. If this + * value is zero, the service will select a default size. A call may return + * fewer objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} request.pageToken + * The value returned by the last `ListViewsResponse`; indicates + * that this is a continuation of a prior `ListViews` call and + * the system should return the next page of data. + * @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.contactcenterinsights.v1.View|View}. + * 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 `listViewsAsync()` + * 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. + */ + listViews( + request?: protos.google.cloud.contactcenterinsights.v1.IListViewsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IView[], + protos.google.cloud.contactcenterinsights.v1.IListViewsRequest | null, + protos.google.cloud.contactcenterinsights.v1.IListViewsResponse, + ] + >; + listViews( + request: protos.google.cloud.contactcenterinsights.v1.IListViewsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListViewsRequest, + | protos.google.cloud.contactcenterinsights.v1.IListViewsResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IView + > + ): void; + listViews( + request: protos.google.cloud.contactcenterinsights.v1.IListViewsRequest, + callback: PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListViewsRequest, + | protos.google.cloud.contactcenterinsights.v1.IListViewsResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IView + > + ): void; + listViews( + request?: protos.google.cloud.contactcenterinsights.v1.IListViewsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListViewsRequest, + | protos.google.cloud.contactcenterinsights.v1.IListViewsResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IView + >, + callback?: PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListViewsRequest, + | protos.google.cloud.contactcenterinsights.v1.IListViewsResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IView + > + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IView[], + protos.google.cloud.contactcenterinsights.v1.IListViewsRequest | null, + protos.google.cloud.contactcenterinsights.v1.IListViewsResponse, + ] + > | 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.listViews(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 parent resource of the views. + * @param {number} request.pageSize + * The maximum number of views to return in the response. If this + * value is zero, the service will select a default size. A call may return + * fewer objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} request.pageToken + * The value returned by the last `ListViewsResponse`; indicates + * that this is a continuation of a prior `ListViews` call and + * the system should return the next page of data. + * @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.contactcenterinsights.v1.View|View} 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 `listViewsAsync()` + * 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. + */ + listViewsStream( + request?: protos.google.cloud.contactcenterinsights.v1.IListViewsRequest, + 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['listViews']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listViews.createStream( + this.innerApiCalls.listViews as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listViews`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the views. + * @param {number} request.pageSize + * The maximum number of views to return in the response. If this + * value is zero, the service will select a default size. A call may return + * fewer objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} request.pageToken + * The value returned by the last `ListViewsResponse`; indicates + * that this is a continuation of a prior `ListViews` call and + * the system should return the next page of data. + * @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.contactcenterinsights.v1.View|View}. 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/v1/contact_center_insights.list_views.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ListViews_async + */ + listViewsAsync( + request?: protos.google.cloud.contactcenterinsights.v1.IListViewsRequest, + 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['listViews']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listViews.asyncIterate( + this.innerApiCalls['listViews'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists QaQuestions. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the questions. + * @param {number} [request.pageSize] + * Optional. The maximum number of questions to return in the response. If the + * value is zero, the service will select a default size. A call might return + * fewer objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} [request.pageToken] + * Optional. The value returned by the last `ListQaQuestionsResponse`. This + * value indicates that this is a continuation of a prior `ListQaQuestions` + * call and that the system should return the next page of data. + * @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.contactcenterinsights.v1.QaQuestion|QaQuestion}. + * 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 `listQaQuestionsAsync()` + * 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. + */ + listQaQuestions( + request?: protos.google.cloud.contactcenterinsights.v1.IListQaQuestionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IQaQuestion[], + protos.google.cloud.contactcenterinsights.v1.IListQaQuestionsRequest | null, + protos.google.cloud.contactcenterinsights.v1.IListQaQuestionsResponse, + ] + >; + listQaQuestions( + request: protos.google.cloud.contactcenterinsights.v1.IListQaQuestionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListQaQuestionsRequest, + | protos.google.cloud.contactcenterinsights.v1.IListQaQuestionsResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaQuestion + > + ): void; + listQaQuestions( + request: protos.google.cloud.contactcenterinsights.v1.IListQaQuestionsRequest, + callback: PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListQaQuestionsRequest, + | protos.google.cloud.contactcenterinsights.v1.IListQaQuestionsResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaQuestion + > + ): void; + listQaQuestions( + request?: protos.google.cloud.contactcenterinsights.v1.IListQaQuestionsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListQaQuestionsRequest, + | protos.google.cloud.contactcenterinsights.v1.IListQaQuestionsResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaQuestion + >, + callback?: PaginationCallback< + protos.google.cloud.contactcenterinsights.v1.IListQaQuestionsRequest, + | protos.google.cloud.contactcenterinsights.v1.IListQaQuestionsResponse + | null + | undefined, + protos.google.cloud.contactcenterinsights.v1.IQaQuestion + > + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IQaQuestion[], + protos.google.cloud.contactcenterinsights.v1.IListQaQuestionsRequest | null, + protos.google.cloud.contactcenterinsights.v1.IListQaQuestionsResponse, + ] + > | 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.listQaQuestions(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 parent resource of the questions. + * @param {number} [request.pageSize] + * Optional. The maximum number of questions to return in the response. If the + * value is zero, the service will select a default size. A call might return + * fewer objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} [request.pageToken] + * Optional. The value returned by the last `ListQaQuestionsResponse`. This + * value indicates that this is a continuation of a prior `ListQaQuestions` + * call and that the system should return the next page of data. + * @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.contactcenterinsights.v1.QaQuestion|QaQuestion} 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 `listQaQuestionsAsync()` + * 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. + */ + listQaQuestionsStream( + request?: protos.google.cloud.contactcenterinsights.v1.IListQaQuestionsRequest, + 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['listQaQuestions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listQaQuestions.createStream( + this.innerApiCalls.listQaQuestions as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listQaQuestions`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the questions. + * @param {number} [request.pageSize] + * Optional. The maximum number of questions to return in the response. If the + * value is zero, the service will select a default size. A call might return + * fewer objects than requested. A non-empty `next_page_token` in the response + * indicates that more data is available. + * @param {string} [request.pageToken] + * Optional. The value returned by the last `ListQaQuestionsResponse`. This + * value indicates that this is a continuation of a prior `ListQaQuestions` + * call and that the system should return the next page of data. + * @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.contactcenterinsights.v1.QaQuestion|QaQuestion}. 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/v1/contact_center_insights.list_qa_questions.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ListQaQuestions_async + */ + listQaQuestionsAsync( + request?: protos.google.cloud.contactcenterinsights.v1.IListQaQuestionsRequest, + 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({ - 'encryption_spec.name': request.encryptionSpec!.name ?? '', + parent: request.parent ?? '', }); + const defaultCallSettings = this._defaults['listQaQuestions']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.innerApiCalls.initializeEncryptionSpec( - request, - options, - callback - ); - } - /** - * Check the status of the long running operation returned by `initializeEncryptionSpec()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/contact_center_insights.initialize_encryption_spec.js - * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_InitializeEncryptionSpec_async - */ - async checkInitializeEncryptionSpecProgress( - name: string - ): Promise< - LROperation< - protos.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse, - protos.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata - > - > { - const request = - new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation( - operation, - this.descriptors.longrunning.initializeEncryptionSpec, - this._gaxModule.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse, - protos.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata - >; + return this.descriptors.page.listQaQuestions.asyncIterate( + this.innerApiCalls['listQaQuestions'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; } /** - * Lists conversations. + * Lists QaScorecards. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource of the conversation. - * @param {number} request.pageSize - * The maximum number of conversations to return in the response. A valid page - * size ranges from 0 to 100,000 inclusive. If the page size is zero or - * unspecified, a default page size of 100 will be chosen. Note that a call - * might return fewer results than the requested page size. - * @param {string} request.pageToken - * The value returned by the last `ListConversationsResponse`. This value - * indicates that this is a continuation of a prior `ListConversations` call - * and that the system should return the next page of data. - * @param {string} request.filter - * A filter to reduce results to a specific subset. Useful for querying - * conversations with specific properties. - * @param {string} [request.orderBy] - * Optional. The attribute by which to order conversations in the response. - * If empty, conversations will be ordered by descending creation time. - * Supported values are one of the following: - * - * * create_time - * * customer_satisfaction_rating - * * duration - * * latest_analysis - * * start_time - * * turn_count - * - * The default sort order is ascending. To specify order, append `asc` or - * `desc` (`create_time desc`). - * For more details, see [Google AIPs - * Ordering](https://google.aip.dev/132#ordering). - * @param {google.cloud.contactcenterinsights.v1.ConversationView} request.view - * The level of details of the conversation. Default is `BASIC`. + * Required. The parent resource of the scorecards. + * @param {number} [request.pageSize] + * Optional. The maximum number of scorecards to return in the response. If + * the value is zero, the service will select a default size. A call might + * return fewer objects than requested. A non-empty `next_page_token` in the + * response indicates that more data is available. + * @param {string} [request.pageToken] + * Optional. The value returned by the last `ListQaScorecardsResponse`. This + * value indicates that this is a continuation of a prior `ListQaScorecards` + * call and that the system should return the next page of data. * @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.contactcenterinsights.v1.Conversation|Conversation}. + * The first element of the array is Array of {@link protos.google.cloud.contactcenterinsights.v1.QaScorecard|QaScorecard}. * 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 `listConversationsAsync()` + * We recommend using `listQaScorecardsAsync()` * 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. */ - listConversations( - request?: protos.google.cloud.contactcenterinsights.v1.IListConversationsRequest, + listQaScorecards( + request?: protos.google.cloud.contactcenterinsights.v1.IListQaScorecardsRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.contactcenterinsights.v1.IConversation[], - protos.google.cloud.contactcenterinsights.v1.IListConversationsRequest | null, - protos.google.cloud.contactcenterinsights.v1.IListConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IQaScorecard[], + protos.google.cloud.contactcenterinsights.v1.IListQaScorecardsRequest | null, + protos.google.cloud.contactcenterinsights.v1.IListQaScorecardsResponse, ] >; - listConversations( - request: protos.google.cloud.contactcenterinsights.v1.IListConversationsRequest, + listQaScorecards( + request: protos.google.cloud.contactcenterinsights.v1.IListQaScorecardsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.cloud.contactcenterinsights.v1.IListConversationsRequest, - | protos.google.cloud.contactcenterinsights.v1.IListConversationsResponse + protos.google.cloud.contactcenterinsights.v1.IListQaScorecardsRequest, + | protos.google.cloud.contactcenterinsights.v1.IListQaScorecardsResponse | null | undefined, - protos.google.cloud.contactcenterinsights.v1.IConversation + protos.google.cloud.contactcenterinsights.v1.IQaScorecard > ): void; - listConversations( - request: protos.google.cloud.contactcenterinsights.v1.IListConversationsRequest, + listQaScorecards( + request: protos.google.cloud.contactcenterinsights.v1.IListQaScorecardsRequest, callback: PaginationCallback< - protos.google.cloud.contactcenterinsights.v1.IListConversationsRequest, - | protos.google.cloud.contactcenterinsights.v1.IListConversationsResponse + protos.google.cloud.contactcenterinsights.v1.IListQaScorecardsRequest, + | protos.google.cloud.contactcenterinsights.v1.IListQaScorecardsResponse | null | undefined, - protos.google.cloud.contactcenterinsights.v1.IConversation + protos.google.cloud.contactcenterinsights.v1.IQaScorecard > ): void; - listConversations( - request?: protos.google.cloud.contactcenterinsights.v1.IListConversationsRequest, + listQaScorecards( + request?: protos.google.cloud.contactcenterinsights.v1.IListQaScorecardsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.cloud.contactcenterinsights.v1.IListConversationsRequest, - | protos.google.cloud.contactcenterinsights.v1.IListConversationsResponse + protos.google.cloud.contactcenterinsights.v1.IListQaScorecardsRequest, + | protos.google.cloud.contactcenterinsights.v1.IListQaScorecardsResponse | null | undefined, - protos.google.cloud.contactcenterinsights.v1.IConversation + protos.google.cloud.contactcenterinsights.v1.IQaScorecard >, callback?: PaginationCallback< - protos.google.cloud.contactcenterinsights.v1.IListConversationsRequest, - | protos.google.cloud.contactcenterinsights.v1.IListConversationsResponse + protos.google.cloud.contactcenterinsights.v1.IListQaScorecardsRequest, + | protos.google.cloud.contactcenterinsights.v1.IListQaScorecardsResponse | null | undefined, - protos.google.cloud.contactcenterinsights.v1.IConversation + protos.google.cloud.contactcenterinsights.v1.IQaScorecard > ): Promise< [ - protos.google.cloud.contactcenterinsights.v1.IConversation[], - protos.google.cloud.contactcenterinsights.v1.IListConversationsRequest | null, - protos.google.cloud.contactcenterinsights.v1.IListConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IQaScorecard[], + protos.google.cloud.contactcenterinsights.v1.IListQaScorecardsRequest | null, + protos.google.cloud.contactcenterinsights.v1.IListQaScorecardsResponse, ] > | void { request = request || {}; @@ -5188,7 +9325,7 @@ export class ContactCenterInsightsClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listConversations(request, options, callback); + return this.innerApiCalls.listQaScorecards(request, options, callback); } /** @@ -5196,50 +9333,29 @@ export class ContactCenterInsightsClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource of the conversation. - * @param {number} request.pageSize - * The maximum number of conversations to return in the response. A valid page - * size ranges from 0 to 100,000 inclusive. If the page size is zero or - * unspecified, a default page size of 100 will be chosen. Note that a call - * might return fewer results than the requested page size. - * @param {string} request.pageToken - * The value returned by the last `ListConversationsResponse`. This value - * indicates that this is a continuation of a prior `ListConversations` call - * and that the system should return the next page of data. - * @param {string} request.filter - * A filter to reduce results to a specific subset. Useful for querying - * conversations with specific properties. - * @param {string} [request.orderBy] - * Optional. The attribute by which to order conversations in the response. - * If empty, conversations will be ordered by descending creation time. - * Supported values are one of the following: - * - * * create_time - * * customer_satisfaction_rating - * * duration - * * latest_analysis - * * start_time - * * turn_count - * - * The default sort order is ascending. To specify order, append `asc` or - * `desc` (`create_time desc`). - * For more details, see [Google AIPs - * Ordering](https://google.aip.dev/132#ordering). - * @param {google.cloud.contactcenterinsights.v1.ConversationView} request.view - * The level of details of the conversation. Default is `BASIC`. + * Required. The parent resource of the scorecards. + * @param {number} [request.pageSize] + * Optional. The maximum number of scorecards to return in the response. If + * the value is zero, the service will select a default size. A call might + * return fewer objects than requested. A non-empty `next_page_token` in the + * response indicates that more data is available. + * @param {string} [request.pageToken] + * Optional. The value returned by the last `ListQaScorecardsResponse`. This + * value indicates that this is a continuation of a prior `ListQaScorecards` + * call and that the system should return the next page of data. * @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.contactcenterinsights.v1.Conversation|Conversation} on 'data' event. + * An object stream which emits an object representing {@link protos.google.cloud.contactcenterinsights.v1.QaScorecard|QaScorecard} 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 `listConversationsAsync()` + * We recommend using `listQaScorecardsAsync()` * 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. */ - listConversationsStream( - request?: protos.google.cloud.contactcenterinsights.v1.IListConversationsRequest, + listQaScorecardsStream( + request?: protos.google.cloud.contactcenterinsights.v1.IListQaScorecardsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -5250,70 +9366,49 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listConversations']; + const defaultCallSettings = this._defaults['listQaScorecards']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listConversations.createStream( - this.innerApiCalls.listConversations as GaxCall, + return this.descriptors.page.listQaScorecards.createStream( + this.innerApiCalls.listQaScorecards as GaxCall, request, callSettings ); } /** - * Equivalent to `listConversations`, but returns an iterable object. + * Equivalent to `listQaScorecards`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource of the conversation. - * @param {number} request.pageSize - * The maximum number of conversations to return in the response. A valid page - * size ranges from 0 to 100,000 inclusive. If the page size is zero or - * unspecified, a default page size of 100 will be chosen. Note that a call - * might return fewer results than the requested page size. - * @param {string} request.pageToken - * The value returned by the last `ListConversationsResponse`. This value - * indicates that this is a continuation of a prior `ListConversations` call - * and that the system should return the next page of data. - * @param {string} request.filter - * A filter to reduce results to a specific subset. Useful for querying - * conversations with specific properties. - * @param {string} [request.orderBy] - * Optional. The attribute by which to order conversations in the response. - * If empty, conversations will be ordered by descending creation time. - * Supported values are one of the following: - * - * * create_time - * * customer_satisfaction_rating - * * duration - * * latest_analysis - * * start_time - * * turn_count - * - * The default sort order is ascending. To specify order, append `asc` or - * `desc` (`create_time desc`). - * For more details, see [Google AIPs - * Ordering](https://google.aip.dev/132#ordering). - * @param {google.cloud.contactcenterinsights.v1.ConversationView} request.view - * The level of details of the conversation. Default is `BASIC`. + * Required. The parent resource of the scorecards. + * @param {number} [request.pageSize] + * Optional. The maximum number of scorecards to return in the response. If + * the value is zero, the service will select a default size. A call might + * return fewer objects than requested. A non-empty `next_page_token` in the + * response indicates that more data is available. + * @param {string} [request.pageToken] + * Optional. The value returned by the last `ListQaScorecardsResponse`. This + * value indicates that this is a continuation of a prior `ListQaScorecards` + * call and that the system should return the next page of data. * @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.contactcenterinsights.v1.Conversation|Conversation}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.cloud.contactcenterinsights.v1.QaScorecard|QaScorecard}. 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/v1/contact_center_insights.list_conversations.js - * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ListConversations_async + * @example include:samples/generated/v1/contact_center_insights.list_qa_scorecards.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ListQaScorecards_async */ - listConversationsAsync( - request?: protos.google.cloud.contactcenterinsights.v1.IListConversationsRequest, + listQaScorecardsAsync( + request?: protos.google.cloud.contactcenterinsights.v1.IListQaScorecardsRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -5322,100 +9417,103 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listConversations']; + const defaultCallSettings = this._defaults['listQaScorecards']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listConversations.asyncIterate( - this.innerApiCalls['listConversations'] as GaxCall, + return this.descriptors.page.listQaScorecards.asyncIterate( + this.innerApiCalls['listQaScorecards'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists analyses. + * Lists all revisions under the parent QaScorecard. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource of the analyses. - * @param {number} request.pageSize - * The maximum number of analyses to return in the response. If this - * value is zero, the service will select a default size. A call might return - * fewer objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * @param {string} request.pageToken - * The value returned by the last `ListAnalysesResponse`; indicates - * that this is a continuation of a prior `ListAnalyses` call and - * the system should return the next page of data. - * @param {string} request.filter - * A filter to reduce results to a specific subset. Useful for querying - * conversations with specific properties. + * Required. The parent resource of the scorecard revisions. To list all + * revisions of all scorecards, substitute the QaScorecard ID with a '-' + * character. + * @param {number} [request.pageSize] + * Optional. The maximum number of scorecard revisions to return in the + * response. If the value is zero, the service will select a default size. A + * call might return fewer objects than requested. A non-empty + * `next_page_token` in the response indicates that more data is available. + * @param {string} [request.pageToken] + * Optional. The value returned by the last + * `ListQaScorecardRevisionsResponse`. This value indicates that this is a + * continuation of a prior `ListQaScorecardRevisions` call and that the system + * should return the next page of data. + * @param {string} [request.filter] + * Optional. A filter to reduce results to a specific subset. Useful for + * querying scorecard revisions with specific properties. * @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.contactcenterinsights.v1.Analysis|Analysis}. + * The first element of the array is Array of {@link protos.google.cloud.contactcenterinsights.v1.QaScorecardRevision|QaScorecardRevision}. * 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 `listAnalysesAsync()` + * We recommend using `listQaScorecardRevisionsAsync()` * 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. */ - listAnalyses( - request?: protos.google.cloud.contactcenterinsights.v1.IListAnalysesRequest, + listQaScorecardRevisions( + request?: protos.google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.contactcenterinsights.v1.IAnalysis[], - protos.google.cloud.contactcenterinsights.v1.IListAnalysesRequest | null, - protos.google.cloud.contactcenterinsights.v1.IListAnalysesResponse, + protos.google.cloud.contactcenterinsights.v1.IQaScorecardRevision[], + protos.google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsRequest | null, + protos.google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsResponse, ] >; - listAnalyses( - request: protos.google.cloud.contactcenterinsights.v1.IListAnalysesRequest, + listQaScorecardRevisions( + request: protos.google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.cloud.contactcenterinsights.v1.IListAnalysesRequest, - | protos.google.cloud.contactcenterinsights.v1.IListAnalysesResponse + protos.google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsRequest, + | protos.google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsResponse | null | undefined, - protos.google.cloud.contactcenterinsights.v1.IAnalysis + protos.google.cloud.contactcenterinsights.v1.IQaScorecardRevision > ): void; - listAnalyses( - request: protos.google.cloud.contactcenterinsights.v1.IListAnalysesRequest, + listQaScorecardRevisions( + request: protos.google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsRequest, callback: PaginationCallback< - protos.google.cloud.contactcenterinsights.v1.IListAnalysesRequest, - | protos.google.cloud.contactcenterinsights.v1.IListAnalysesResponse + protos.google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsRequest, + | protos.google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsResponse | null | undefined, - protos.google.cloud.contactcenterinsights.v1.IAnalysis + protos.google.cloud.contactcenterinsights.v1.IQaScorecardRevision > ): void; - listAnalyses( - request?: protos.google.cloud.contactcenterinsights.v1.IListAnalysesRequest, + listQaScorecardRevisions( + request?: protos.google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.cloud.contactcenterinsights.v1.IListAnalysesRequest, - | protos.google.cloud.contactcenterinsights.v1.IListAnalysesResponse + protos.google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsRequest, + | protos.google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsResponse | null | undefined, - protos.google.cloud.contactcenterinsights.v1.IAnalysis + protos.google.cloud.contactcenterinsights.v1.IQaScorecardRevision >, callback?: PaginationCallback< - protos.google.cloud.contactcenterinsights.v1.IListAnalysesRequest, - | protos.google.cloud.contactcenterinsights.v1.IListAnalysesResponse + protos.google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsRequest, + | protos.google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsResponse | null | undefined, - protos.google.cloud.contactcenterinsights.v1.IAnalysis + protos.google.cloud.contactcenterinsights.v1.IQaScorecardRevision > ): Promise< [ - protos.google.cloud.contactcenterinsights.v1.IAnalysis[], - protos.google.cloud.contactcenterinsights.v1.IListAnalysesRequest | null, - protos.google.cloud.contactcenterinsights.v1.IListAnalysesResponse, + protos.google.cloud.contactcenterinsights.v1.IQaScorecardRevision[], + protos.google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsRequest | null, + protos.google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsResponse, ] > | void { request = request || {}; @@ -5434,40 +9532,47 @@ export class ContactCenterInsightsClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listAnalyses(request, options, callback); + return this.innerApiCalls.listQaScorecardRevisions( + 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 parent resource of the analyses. - * @param {number} request.pageSize - * The maximum number of analyses to return in the response. If this - * value is zero, the service will select a default size. A call might return - * fewer objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * @param {string} request.pageToken - * The value returned by the last `ListAnalysesResponse`; indicates - * that this is a continuation of a prior `ListAnalyses` call and - * the system should return the next page of data. - * @param {string} request.filter - * A filter to reduce results to a specific subset. Useful for querying - * conversations with specific properties. + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the scorecard revisions. To list all + * revisions of all scorecards, substitute the QaScorecard ID with a '-' + * character. + * @param {number} [request.pageSize] + * Optional. The maximum number of scorecard revisions to return in the + * response. If the value is zero, the service will select a default size. A + * call might return fewer objects than requested. A non-empty + * `next_page_token` in the response indicates that more data is available. + * @param {string} [request.pageToken] + * Optional. The value returned by the last + * `ListQaScorecardRevisionsResponse`. This value indicates that this is a + * continuation of a prior `ListQaScorecardRevisions` call and that the system + * should return the next page of data. + * @param {string} [request.filter] + * Optional. A filter to reduce results to a specific subset. Useful for + * querying scorecard revisions with specific properties. * @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.contactcenterinsights.v1.Analysis|Analysis} on 'data' event. + * An object stream which emits an object representing {@link protos.google.cloud.contactcenterinsights.v1.QaScorecardRevision|QaScorecardRevision} 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 `listAnalysesAsync()` + * We recommend using `listQaScorecardRevisionsAsync()` * 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. */ - listAnalysesStream( - request?: protos.google.cloud.contactcenterinsights.v1.IListAnalysesRequest, + listQaScorecardRevisionsStream( + request?: protos.google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -5478,52 +9583,55 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listAnalyses']; + const defaultCallSettings = this._defaults['listQaScorecardRevisions']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listAnalyses.createStream( - this.innerApiCalls.listAnalyses as GaxCall, + return this.descriptors.page.listQaScorecardRevisions.createStream( + this.innerApiCalls.listQaScorecardRevisions as GaxCall, request, callSettings ); } /** - * Equivalent to `listAnalyses`, but returns an iterable object. + * Equivalent to `listQaScorecardRevisions`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource of the analyses. - * @param {number} request.pageSize - * The maximum number of analyses to return in the response. If this - * value is zero, the service will select a default size. A call might return - * fewer objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * @param {string} request.pageToken - * The value returned by the last `ListAnalysesResponse`; indicates - * that this is a continuation of a prior `ListAnalyses` call and - * the system should return the next page of data. - * @param {string} request.filter - * A filter to reduce results to a specific subset. Useful for querying - * conversations with specific properties. + * Required. The parent resource of the scorecard revisions. To list all + * revisions of all scorecards, substitute the QaScorecard ID with a '-' + * character. + * @param {number} [request.pageSize] + * Optional. The maximum number of scorecard revisions to return in the + * response. If the value is zero, the service will select a default size. A + * call might return fewer objects than requested. A non-empty + * `next_page_token` in the response indicates that more data is available. + * @param {string} [request.pageToken] + * Optional. The value returned by the last + * `ListQaScorecardRevisionsResponse`. This value indicates that this is a + * continuation of a prior `ListQaScorecardRevisions` call and that the system + * should return the next page of data. + * @param {string} [request.filter] + * Optional. A filter to reduce results to a specific subset. Useful for + * querying scorecard revisions with specific properties. * @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.contactcenterinsights.v1.Analysis|Analysis}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.cloud.contactcenterinsights.v1.QaScorecardRevision|QaScorecardRevision}. 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/v1/contact_center_insights.list_analyses.js - * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ListAnalyses_async + * @example include:samples/generated/v1/contact_center_insights.list_qa_scorecard_revisions.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ListQaScorecardRevisions_async */ - listAnalysesAsync( - request?: protos.google.cloud.contactcenterinsights.v1.IListAnalysesRequest, + listQaScorecardRevisionsAsync( + request?: protos.google.cloud.contactcenterinsights.v1.IListQaScorecardRevisionsRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -5532,100 +9640,113 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listAnalyses']; + const defaultCallSettings = this._defaults['listQaScorecardRevisions']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listAnalyses.asyncIterate( - this.innerApiCalls['listAnalyses'] as GaxCall, + return this.descriptors.page.listQaScorecardRevisions.asyncIterate( + this.innerApiCalls['listQaScorecardRevisions'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists phrase matchers. + * List feedback labels. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource of the phrase matcher. - * @param {number} request.pageSize - * The maximum number of phrase matchers to return in the response. If this - * value is zero, the service will select a default size. A call might return - * fewer objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * @param {string} request.pageToken - * The value returned by the last `ListPhraseMatchersResponse`. This value - * indicates that this is a continuation of a prior `ListPhraseMatchers` call - * and that the system should return the next page of data. - * @param {string} request.filter - * A filter to reduce results to a specific subset. Useful for querying - * phrase matchers with specific properties. + * Required. The parent resource of the feedback labels. + * @param {string} [request.filter] + * Optional. A filter to reduce results to a specific subset. Supports + * disjunctions (OR) and conjunctions (AND). Automatically sorts by + * conversation ID. To sort by all feedback labels in a project see + * ListAllFeedbackLabels. + * + * Supported fields: + * + * * `issue_model_id` + * * `qa_question_id` + * * `qa_scorecard_id` + * * `min_create_time` + * * `max_create_time` + * * `min_update_time` + * * `max_update_time` + * * `feedback_label_type`: QUALITY_AI, TOPIC_MODELING + * @param {number} [request.pageSize] + * Optional. The maximum number of feedback labels to return in the response. + * A valid page size ranges from 0 to 100,000 inclusive. If the page size is + * zero or unspecified, a default page size of 100 will be chosen. Note that a + * call might return fewer results than the requested page size. + * @param {string} [request.pageToken] + * Optional. The value returned by the last `ListFeedbackLabelsResponse`. This + * value indicates that this is a continuation of a prior `ListFeedbackLabels` + * call and that the system should return the next page of data. * @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.contactcenterinsights.v1.PhraseMatcher|PhraseMatcher}. + * The first element of the array is Array of {@link protos.google.cloud.contactcenterinsights.v1.FeedbackLabel|FeedbackLabel}. * 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 `listPhraseMatchersAsync()` + * We recommend using `listFeedbackLabelsAsync()` * 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. */ - listPhraseMatchers( - request?: protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, + listFeedbackLabels( + request?: protos.google.cloud.contactcenterinsights.v1.IListFeedbackLabelsRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher[], - protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest | null, - protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse, + protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel[], + protos.google.cloud.contactcenterinsights.v1.IListFeedbackLabelsRequest | null, + protos.google.cloud.contactcenterinsights.v1.IListFeedbackLabelsResponse, ] >; - listPhraseMatchers( - request: protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, + listFeedbackLabels( + request: protos.google.cloud.contactcenterinsights.v1.IListFeedbackLabelsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, - | protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse + protos.google.cloud.contactcenterinsights.v1.IListFeedbackLabelsRequest, + | protos.google.cloud.contactcenterinsights.v1.IListFeedbackLabelsResponse | null | undefined, - protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher + protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel > ): void; - listPhraseMatchers( - request: protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, + listFeedbackLabels( + request: protos.google.cloud.contactcenterinsights.v1.IListFeedbackLabelsRequest, callback: PaginationCallback< - protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, - | protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse + protos.google.cloud.contactcenterinsights.v1.IListFeedbackLabelsRequest, + | protos.google.cloud.contactcenterinsights.v1.IListFeedbackLabelsResponse | null | undefined, - protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher + protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel > ): void; - listPhraseMatchers( - request?: protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, + listFeedbackLabels( + request?: protos.google.cloud.contactcenterinsights.v1.IListFeedbackLabelsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, - | protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse + protos.google.cloud.contactcenterinsights.v1.IListFeedbackLabelsRequest, + | protos.google.cloud.contactcenterinsights.v1.IListFeedbackLabelsResponse | null | undefined, - protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher + protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel >, callback?: PaginationCallback< - protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, - | protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse + protos.google.cloud.contactcenterinsights.v1.IListFeedbackLabelsRequest, + | protos.google.cloud.contactcenterinsights.v1.IListFeedbackLabelsResponse | null | undefined, - protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher + protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel > ): Promise< [ - protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher[], - protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest | null, - protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse, + protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel[], + protos.google.cloud.contactcenterinsights.v1.IListFeedbackLabelsRequest | null, + protos.google.cloud.contactcenterinsights.v1.IListFeedbackLabelsResponse, ] > | void { request = request || {}; @@ -5644,7 +9765,7 @@ export class ContactCenterInsightsClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listPhraseMatchers(request, options, callback); + return this.innerApiCalls.listFeedbackLabels(request, options, callback); } /** @@ -5652,32 +9773,45 @@ export class ContactCenterInsightsClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource of the phrase matcher. - * @param {number} request.pageSize - * The maximum number of phrase matchers to return in the response. If this - * value is zero, the service will select a default size. A call might return - * fewer objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * @param {string} request.pageToken - * The value returned by the last `ListPhraseMatchersResponse`. This value - * indicates that this is a continuation of a prior `ListPhraseMatchers` call - * and that the system should return the next page of data. - * @param {string} request.filter - * A filter to reduce results to a specific subset. Useful for querying - * phrase matchers with specific properties. + * Required. The parent resource of the feedback labels. + * @param {string} [request.filter] + * Optional. A filter to reduce results to a specific subset. Supports + * disjunctions (OR) and conjunctions (AND). Automatically sorts by + * conversation ID. To sort by all feedback labels in a project see + * ListAllFeedbackLabels. + * + * Supported fields: + * + * * `issue_model_id` + * * `qa_question_id` + * * `qa_scorecard_id` + * * `min_create_time` + * * `max_create_time` + * * `min_update_time` + * * `max_update_time` + * * `feedback_label_type`: QUALITY_AI, TOPIC_MODELING + * @param {number} [request.pageSize] + * Optional. The maximum number of feedback labels to return in the response. + * A valid page size ranges from 0 to 100,000 inclusive. If the page size is + * zero or unspecified, a default page size of 100 will be chosen. Note that a + * call might return fewer results than the requested page size. + * @param {string} [request.pageToken] + * Optional. The value returned by the last `ListFeedbackLabelsResponse`. This + * value indicates that this is a continuation of a prior `ListFeedbackLabels` + * call and that the system should return the next page of data. * @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.contactcenterinsights.v1.PhraseMatcher|PhraseMatcher} on 'data' event. + * An object stream which emits an object representing {@link protos.google.cloud.contactcenterinsights.v1.FeedbackLabel|FeedbackLabel} 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 `listPhraseMatchersAsync()` + * We recommend using `listFeedbackLabelsAsync()` * 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. */ - listPhraseMatchersStream( - request?: protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, + listFeedbackLabelsStream( + request?: protos.google.cloud.contactcenterinsights.v1.IListFeedbackLabelsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -5688,52 +9822,65 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listPhraseMatchers']; + const defaultCallSettings = this._defaults['listFeedbackLabels']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listPhraseMatchers.createStream( - this.innerApiCalls.listPhraseMatchers as GaxCall, + return this.descriptors.page.listFeedbackLabels.createStream( + this.innerApiCalls.listFeedbackLabels as GaxCall, request, callSettings ); } /** - * Equivalent to `listPhraseMatchers`, but returns an iterable object. + * Equivalent to `listFeedbackLabels`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource of the phrase matcher. - * @param {number} request.pageSize - * The maximum number of phrase matchers to return in the response. If this - * value is zero, the service will select a default size. A call might return - * fewer objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * @param {string} request.pageToken - * The value returned by the last `ListPhraseMatchersResponse`. This value - * indicates that this is a continuation of a prior `ListPhraseMatchers` call - * and that the system should return the next page of data. - * @param {string} request.filter - * A filter to reduce results to a specific subset. Useful for querying - * phrase matchers with specific properties. + * Required. The parent resource of the feedback labels. + * @param {string} [request.filter] + * Optional. A filter to reduce results to a specific subset. Supports + * disjunctions (OR) and conjunctions (AND). Automatically sorts by + * conversation ID. To sort by all feedback labels in a project see + * ListAllFeedbackLabels. + * + * Supported fields: + * + * * `issue_model_id` + * * `qa_question_id` + * * `qa_scorecard_id` + * * `min_create_time` + * * `max_create_time` + * * `min_update_time` + * * `max_update_time` + * * `feedback_label_type`: QUALITY_AI, TOPIC_MODELING + * @param {number} [request.pageSize] + * Optional. The maximum number of feedback labels to return in the response. + * A valid page size ranges from 0 to 100,000 inclusive. If the page size is + * zero or unspecified, a default page size of 100 will be chosen. Note that a + * call might return fewer results than the requested page size. + * @param {string} [request.pageToken] + * Optional. The value returned by the last `ListFeedbackLabelsResponse`. This + * value indicates that this is a continuation of a prior `ListFeedbackLabels` + * call and that the system should return the next page of data. * @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.contactcenterinsights.v1.PhraseMatcher|PhraseMatcher}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.cloud.contactcenterinsights.v1.FeedbackLabel|FeedbackLabel}. 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/v1/contact_center_insights.list_phrase_matchers.js - * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ListPhraseMatchers_async + * @example include:samples/generated/v1/contact_center_insights.list_feedback_labels.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ListFeedbackLabels_async */ - listPhraseMatchersAsync( - request?: protos.google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, + listFeedbackLabelsAsync( + request?: protos.google.cloud.contactcenterinsights.v1.IListFeedbackLabelsRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -5742,97 +9889,111 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listPhraseMatchers']; + const defaultCallSettings = this._defaults['listFeedbackLabels']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listPhraseMatchers.asyncIterate( - this.innerApiCalls['listPhraseMatchers'] as GaxCall, + return this.descriptors.page.listFeedbackLabels.asyncIterate( + this.innerApiCalls['listFeedbackLabels'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists views. + * List all feedback labels by project number. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource of the views. - * @param {number} request.pageSize - * The maximum number of views to return in the response. If this - * value is zero, the service will select a default size. A call may return - * fewer objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * @param {string} request.pageToken - * The value returned by the last `ListViewsResponse`; indicates - * that this is a continuation of a prior `ListViews` call and - * the system should return the next page of data. + * Required. The parent resource of all feedback labels per project. + * @param {number} [request.pageSize] + * Optional. The maximum number of feedback labels to return in the response. + * A valid page size ranges from 0 to 100,000 inclusive. If the page size is + * zero or unspecified, a default page size of 100 will be chosen. Note that a + * call might return fewer results than the requested page size. + * @param {string} [request.pageToken] + * Optional. The value returned by the last `ListAllFeedbackLabelsResponse`. + * This value indicates that this is a continuation of a prior + * `ListAllFeedbackLabels` call and that the system should return the next + * page of data. + * @param {string} [request.filter] + * Optional. A filter to reduce results to a specific subset in the entire + * project. Supports disjunctions (OR) and conjunctions (AND). + * + * Supported fields: + * + * * `issue_model_id` + * * `qa_question_id` + * * `min_create_time` + * * `max_create_time` + * * `min_update_time` + * * `max_update_time` + * * `feedback_label_type`: QUALITY_AI, TOPIC_MODELING * @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.contactcenterinsights.v1.View|View}. + * The first element of the array is Array of {@link protos.google.cloud.contactcenterinsights.v1.FeedbackLabel|FeedbackLabel}. * 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 `listViewsAsync()` + * We recommend using `listAllFeedbackLabelsAsync()` * 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. */ - listViews( - request?: protos.google.cloud.contactcenterinsights.v1.IListViewsRequest, + listAllFeedbackLabels( + request?: protos.google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.contactcenterinsights.v1.IView[], - protos.google.cloud.contactcenterinsights.v1.IListViewsRequest | null, - protos.google.cloud.contactcenterinsights.v1.IListViewsResponse, + protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel[], + protos.google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsRequest | null, + protos.google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsResponse, ] >; - listViews( - request: protos.google.cloud.contactcenterinsights.v1.IListViewsRequest, + listAllFeedbackLabels( + request: protos.google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.cloud.contactcenterinsights.v1.IListViewsRequest, - | protos.google.cloud.contactcenterinsights.v1.IListViewsResponse + protos.google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsRequest, + | protos.google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsResponse | null | undefined, - protos.google.cloud.contactcenterinsights.v1.IView + protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel > ): void; - listViews( - request: protos.google.cloud.contactcenterinsights.v1.IListViewsRequest, + listAllFeedbackLabels( + request: protos.google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsRequest, callback: PaginationCallback< - protos.google.cloud.contactcenterinsights.v1.IListViewsRequest, - | protos.google.cloud.contactcenterinsights.v1.IListViewsResponse + protos.google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsRequest, + | protos.google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsResponse | null | undefined, - protos.google.cloud.contactcenterinsights.v1.IView + protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel > ): void; - listViews( - request?: protos.google.cloud.contactcenterinsights.v1.IListViewsRequest, + listAllFeedbackLabels( + request?: protos.google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.cloud.contactcenterinsights.v1.IListViewsRequest, - | protos.google.cloud.contactcenterinsights.v1.IListViewsResponse + protos.google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsRequest, + | protos.google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsResponse | null | undefined, - protos.google.cloud.contactcenterinsights.v1.IView + protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel >, callback?: PaginationCallback< - protos.google.cloud.contactcenterinsights.v1.IListViewsRequest, - | protos.google.cloud.contactcenterinsights.v1.IListViewsResponse + protos.google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsRequest, + | protos.google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsResponse | null | undefined, - protos.google.cloud.contactcenterinsights.v1.IView + protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel > ): Promise< [ - protos.google.cloud.contactcenterinsights.v1.IView[], - protos.google.cloud.contactcenterinsights.v1.IListViewsRequest | null, - protos.google.cloud.contactcenterinsights.v1.IListViewsResponse, + protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel[], + protos.google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsRequest | null, + protos.google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsResponse, ] > | void { request = request || {}; @@ -5851,7 +10012,7 @@ export class ContactCenterInsightsClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listViews(request, options, callback); + return this.innerApiCalls.listAllFeedbackLabels(request, options, callback); } /** @@ -5859,29 +10020,43 @@ export class ContactCenterInsightsClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource of the views. - * @param {number} request.pageSize - * The maximum number of views to return in the response. If this - * value is zero, the service will select a default size. A call may return - * fewer objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * @param {string} request.pageToken - * The value returned by the last `ListViewsResponse`; indicates - * that this is a continuation of a prior `ListViews` call and - * the system should return the next page of data. + * Required. The parent resource of all feedback labels per project. + * @param {number} [request.pageSize] + * Optional. The maximum number of feedback labels to return in the response. + * A valid page size ranges from 0 to 100,000 inclusive. If the page size is + * zero or unspecified, a default page size of 100 will be chosen. Note that a + * call might return fewer results than the requested page size. + * @param {string} [request.pageToken] + * Optional. The value returned by the last `ListAllFeedbackLabelsResponse`. + * This value indicates that this is a continuation of a prior + * `ListAllFeedbackLabels` call and that the system should return the next + * page of data. + * @param {string} [request.filter] + * Optional. A filter to reduce results to a specific subset in the entire + * project. Supports disjunctions (OR) and conjunctions (AND). + * + * Supported fields: + * + * * `issue_model_id` + * * `qa_question_id` + * * `min_create_time` + * * `max_create_time` + * * `min_update_time` + * * `max_update_time` + * * `feedback_label_type`: QUALITY_AI, TOPIC_MODELING * @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.contactcenterinsights.v1.View|View} on 'data' event. + * An object stream which emits an object representing {@link protos.google.cloud.contactcenterinsights.v1.FeedbackLabel|FeedbackLabel} 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 `listViewsAsync()` + * We recommend using `listAllFeedbackLabelsAsync()` * 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. */ - listViewsStream( - request?: protos.google.cloud.contactcenterinsights.v1.IListViewsRequest, + listAllFeedbackLabelsStream( + request?: protos.google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -5892,66 +10067,218 @@ export class ContactCenterInsightsClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listViews']; + const defaultCallSettings = this._defaults['listAllFeedbackLabels']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listViews.createStream( - this.innerApiCalls.listViews as GaxCall, + return this.descriptors.page.listAllFeedbackLabels.createStream( + this.innerApiCalls.listAllFeedbackLabels as GaxCall, request, callSettings ); } /** - * Equivalent to `listViews`, but returns an iterable object. + * Equivalent to `listAllFeedbackLabels`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource of the views. - * @param {number} request.pageSize - * The maximum number of views to return in the response. If this - * value is zero, the service will select a default size. A call may return - * fewer objects than requested. A non-empty `next_page_token` in the response - * indicates that more data is available. - * @param {string} request.pageToken - * The value returned by the last `ListViewsResponse`; indicates - * that this is a continuation of a prior `ListViews` call and - * the system should return the next page of data. + * Required. The parent resource of all feedback labels per project. + * @param {number} [request.pageSize] + * Optional. The maximum number of feedback labels to return in the response. + * A valid page size ranges from 0 to 100,000 inclusive. If the page size is + * zero or unspecified, a default page size of 100 will be chosen. Note that a + * call might return fewer results than the requested page size. + * @param {string} [request.pageToken] + * Optional. The value returned by the last `ListAllFeedbackLabelsResponse`. + * This value indicates that this is a continuation of a prior + * `ListAllFeedbackLabels` call and that the system should return the next + * page of data. + * @param {string} [request.filter] + * Optional. A filter to reduce results to a specific subset in the entire + * project. Supports disjunctions (OR) and conjunctions (AND). + * + * Supported fields: + * + * * `issue_model_id` + * * `qa_question_id` + * * `min_create_time` + * * `max_create_time` + * * `min_update_time` + * * `max_update_time` + * * `feedback_label_type`: QUALITY_AI, TOPIC_MODELING * @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.contactcenterinsights.v1.View|View}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.cloud.contactcenterinsights.v1.FeedbackLabel|FeedbackLabel}. 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/v1/contact_center_insights.list_views.js - * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ListViews_async + * @example include:samples/generated/v1/contact_center_insights.list_all_feedback_labels.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ListAllFeedbackLabels_async + */ + listAllFeedbackLabelsAsync( + request?: protos.google.cloud.contactcenterinsights.v1.IListAllFeedbackLabelsRequest, + 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['listAllFeedbackLabels']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAllFeedbackLabels.asyncIterate( + this.innerApiCalls['listAllFeedbackLabels'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Gets the access control policy for a resource. Returns an empty policy + * if the resource exists and does not have a policy set. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {Object} [request.options] + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * + * This object should have the same structure as {@link google.iam.v1.GetPolicyOptions | GetPolicyOptions}. + * @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/interfaces/CallOptions.html | 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.iam.v1.Policy | Policy}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.Policy | Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getIamPolicy( + request: IamProtos.google.iam.v1.GetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise<[IamProtos.google.iam.v1.Policy]> { + return this.iamClient.getIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see {@link https://cloud.google.com/iam/docs/overview#permissions | IAM Overview }. + * @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/interfaces/CallOptions.html | 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.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + setIamPolicy( + request: IamProtos.google.iam.v1.SetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise<[IamProtos.google.iam.v1.Policy]> { + return this.iamClient.setIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see {@link https://cloud.google.com/iam/docs/overview#permissions | IAM Overview }. + * @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/interfaces/CallOptions.html | 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.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * */ - listViewsAsync( - request?: protos.google.cloud.contactcenterinsights.v1.IListViewsRequest, - 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['listViews']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listViews.asyncIterate( - this.innerApiCalls['listViews'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; + testIamPermissions( + request: IamProtos.google.iam.v1.TestIamPermissionsRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): Promise<[IamProtos.google.iam.v1.TestIamPermissionsResponse]> { + return this.iamClient.testIamPermissions(request, options, callback); } + /** * 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 @@ -6199,6 +10526,58 @@ export class ContactCenterInsightsClient { return this.pathTemplates.analysisPathTemplate.match(analysisName).analysis; } + /** + * Return a fully-qualified analysisRule resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} analysis_rule + * @returns {string} Resource name string. + */ + analysisRulePath(project: string, location: string, analysisRule: string) { + return this.pathTemplates.analysisRulePathTemplate.render({ + project: project, + location: location, + analysis_rule: analysisRule, + }); + } + + /** + * Parse the project from AnalysisRule resource. + * + * @param {string} analysisRuleName + * A fully-qualified path representing AnalysisRule resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAnalysisRuleName(analysisRuleName: string) { + return this.pathTemplates.analysisRulePathTemplate.match(analysisRuleName) + .project; + } + + /** + * Parse the location from AnalysisRule resource. + * + * @param {string} analysisRuleName + * A fully-qualified path representing AnalysisRule resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAnalysisRuleName(analysisRuleName: string) { + return this.pathTemplates.analysisRulePathTemplate.match(analysisRuleName) + .location; + } + + /** + * Parse the analysis_rule from AnalysisRule resource. + * + * @param {string} analysisRuleName + * A fully-qualified path representing AnalysisRule resource. + * @returns {string} A string representing the analysis_rule. + */ + matchAnalysisRuleFromAnalysisRuleName(analysisRuleName: string) { + return this.pathTemplates.analysisRulePathTemplate.match(analysisRuleName) + .analysis_rule; + } + /** * Return a fully-qualified conversation resource name string. * @@ -6291,6 +10670,77 @@ export class ContactCenterInsightsClient { ).location; } + /** + * Return a fully-qualified feedbackLabel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} conversation + * @param {string} feedback_label + * @returns {string} Resource name string. + */ + feedbackLabelPath( + project: string, + location: string, + conversation: string, + feedbackLabel: string + ) { + return this.pathTemplates.feedbackLabelPathTemplate.render({ + project: project, + location: location, + conversation: conversation, + feedback_label: feedbackLabel, + }); + } + + /** + * Parse the project from FeedbackLabel resource. + * + * @param {string} feedbackLabelName + * A fully-qualified path representing FeedbackLabel resource. + * @returns {string} A string representing the project. + */ + matchProjectFromFeedbackLabelName(feedbackLabelName: string) { + return this.pathTemplates.feedbackLabelPathTemplate.match(feedbackLabelName) + .project; + } + + /** + * Parse the location from FeedbackLabel resource. + * + * @param {string} feedbackLabelName + * A fully-qualified path representing FeedbackLabel resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFeedbackLabelName(feedbackLabelName: string) { + return this.pathTemplates.feedbackLabelPathTemplate.match(feedbackLabelName) + .location; + } + + /** + * Parse the conversation from FeedbackLabel resource. + * + * @param {string} feedbackLabelName + * A fully-qualified path representing FeedbackLabel resource. + * @returns {string} A string representing the conversation. + */ + matchConversationFromFeedbackLabelName(feedbackLabelName: string) { + return this.pathTemplates.feedbackLabelPathTemplate.match(feedbackLabelName) + .conversation; + } + + /** + * Parse the feedback_label from FeedbackLabel resource. + * + * @param {string} feedbackLabelName + * A fully-qualified path representing FeedbackLabel resource. + * @returns {string} A string representing the feedback_label. + */ + matchFeedbackLabelFromFeedbackLabelName(feedbackLabelName: string) { + return this.pathTemplates.feedbackLabelPathTemplate.match(feedbackLabelName) + .feedback_label; + } + /** * Return a fully-qualified issue resource name string. * @@ -6498,6 +10948,280 @@ export class ContactCenterInsightsClient { .phrase_matcher; } + /** + * Return a fully-qualified qaQuestion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} qa_scorecard + * @param {string} revision + * @param {string} qa_question + * @returns {string} Resource name string. + */ + qaQuestionPath( + project: string, + location: string, + qaScorecard: string, + revision: string, + qaQuestion: string + ) { + return this.pathTemplates.qaQuestionPathTemplate.render({ + project: project, + location: location, + qa_scorecard: qaScorecard, + revision: revision, + qa_question: qaQuestion, + }); + } + + /** + * Parse the project from QaQuestion resource. + * + * @param {string} qaQuestionName + * A fully-qualified path representing QaQuestion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromQaQuestionName(qaQuestionName: string) { + return this.pathTemplates.qaQuestionPathTemplate.match(qaQuestionName) + .project; + } + + /** + * Parse the location from QaQuestion resource. + * + * @param {string} qaQuestionName + * A fully-qualified path representing QaQuestion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromQaQuestionName(qaQuestionName: string) { + return this.pathTemplates.qaQuestionPathTemplate.match(qaQuestionName) + .location; + } + + /** + * Parse the qa_scorecard from QaQuestion resource. + * + * @param {string} qaQuestionName + * A fully-qualified path representing QaQuestion resource. + * @returns {string} A string representing the qa_scorecard. + */ + matchQaScorecardFromQaQuestionName(qaQuestionName: string) { + return this.pathTemplates.qaQuestionPathTemplate.match(qaQuestionName) + .qa_scorecard; + } + + /** + * Parse the revision from QaQuestion resource. + * + * @param {string} qaQuestionName + * A fully-qualified path representing QaQuestion resource. + * @returns {string} A string representing the revision. + */ + matchRevisionFromQaQuestionName(qaQuestionName: string) { + return this.pathTemplates.qaQuestionPathTemplate.match(qaQuestionName) + .revision; + } + + /** + * Parse the qa_question from QaQuestion resource. + * + * @param {string} qaQuestionName + * A fully-qualified path representing QaQuestion resource. + * @returns {string} A string representing the qa_question. + */ + matchQaQuestionFromQaQuestionName(qaQuestionName: string) { + return this.pathTemplates.qaQuestionPathTemplate.match(qaQuestionName) + .qa_question; + } + + /** + * Return a fully-qualified qaScorecard resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} qa_scorecard + * @returns {string} Resource name string. + */ + qaScorecardPath(project: string, location: string, qaScorecard: string) { + return this.pathTemplates.qaScorecardPathTemplate.render({ + project: project, + location: location, + qa_scorecard: qaScorecard, + }); + } + + /** + * Parse the project from QaScorecard resource. + * + * @param {string} qaScorecardName + * A fully-qualified path representing QaScorecard resource. + * @returns {string} A string representing the project. + */ + matchProjectFromQaScorecardName(qaScorecardName: string) { + return this.pathTemplates.qaScorecardPathTemplate.match(qaScorecardName) + .project; + } + + /** + * Parse the location from QaScorecard resource. + * + * @param {string} qaScorecardName + * A fully-qualified path representing QaScorecard resource. + * @returns {string} A string representing the location. + */ + matchLocationFromQaScorecardName(qaScorecardName: string) { + return this.pathTemplates.qaScorecardPathTemplate.match(qaScorecardName) + .location; + } + + /** + * Parse the qa_scorecard from QaScorecard resource. + * + * @param {string} qaScorecardName + * A fully-qualified path representing QaScorecard resource. + * @returns {string} A string representing the qa_scorecard. + */ + matchQaScorecardFromQaScorecardName(qaScorecardName: string) { + return this.pathTemplates.qaScorecardPathTemplate.match(qaScorecardName) + .qa_scorecard; + } + + /** + * Return a fully-qualified qaScorecardResult resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} qa_scorecard_result + * @returns {string} Resource name string. + */ + qaScorecardResultPath( + project: string, + location: string, + qaScorecardResult: string + ) { + return this.pathTemplates.qaScorecardResultPathTemplate.render({ + project: project, + location: location, + qa_scorecard_result: qaScorecardResult, + }); + } + + /** + * Parse the project from QaScorecardResult resource. + * + * @param {string} qaScorecardResultName + * A fully-qualified path representing QaScorecardResult resource. + * @returns {string} A string representing the project. + */ + matchProjectFromQaScorecardResultName(qaScorecardResultName: string) { + return this.pathTemplates.qaScorecardResultPathTemplate.match( + qaScorecardResultName + ).project; + } + + /** + * Parse the location from QaScorecardResult resource. + * + * @param {string} qaScorecardResultName + * A fully-qualified path representing QaScorecardResult resource. + * @returns {string} A string representing the location. + */ + matchLocationFromQaScorecardResultName(qaScorecardResultName: string) { + return this.pathTemplates.qaScorecardResultPathTemplate.match( + qaScorecardResultName + ).location; + } + + /** + * Parse the qa_scorecard_result from QaScorecardResult resource. + * + * @param {string} qaScorecardResultName + * A fully-qualified path representing QaScorecardResult resource. + * @returns {string} A string representing the qa_scorecard_result. + */ + matchQaScorecardResultFromQaScorecardResultName( + qaScorecardResultName: string + ) { + return this.pathTemplates.qaScorecardResultPathTemplate.match( + qaScorecardResultName + ).qa_scorecard_result; + } + + /** + * Return a fully-qualified qaScorecardRevision resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} qa_scorecard + * @param {string} revision + * @returns {string} Resource name string. + */ + qaScorecardRevisionPath( + project: string, + location: string, + qaScorecard: string, + revision: string + ) { + return this.pathTemplates.qaScorecardRevisionPathTemplate.render({ + project: project, + location: location, + qa_scorecard: qaScorecard, + revision: revision, + }); + } + + /** + * Parse the project from QaScorecardRevision resource. + * + * @param {string} qaScorecardRevisionName + * A fully-qualified path representing QaScorecardRevision resource. + * @returns {string} A string representing the project. + */ + matchProjectFromQaScorecardRevisionName(qaScorecardRevisionName: string) { + return this.pathTemplates.qaScorecardRevisionPathTemplate.match( + qaScorecardRevisionName + ).project; + } + + /** + * Parse the location from QaScorecardRevision resource. + * + * @param {string} qaScorecardRevisionName + * A fully-qualified path representing QaScorecardRevision resource. + * @returns {string} A string representing the location. + */ + matchLocationFromQaScorecardRevisionName(qaScorecardRevisionName: string) { + return this.pathTemplates.qaScorecardRevisionPathTemplate.match( + qaScorecardRevisionName + ).location; + } + + /** + * Parse the qa_scorecard from QaScorecardRevision resource. + * + * @param {string} qaScorecardRevisionName + * A fully-qualified path representing QaScorecardRevision resource. + * @returns {string} A string representing the qa_scorecard. + */ + matchQaScorecardFromQaScorecardRevisionName(qaScorecardRevisionName: string) { + return this.pathTemplates.qaScorecardRevisionPathTemplate.match( + qaScorecardRevisionName + ).qa_scorecard; + } + + /** + * Parse the revision from QaScorecardRevision resource. + * + * @param {string} qaScorecardRevisionName + * A fully-qualified path representing QaScorecardRevision resource. + * @returns {string} A string representing the revision. + */ + matchRevisionFromQaScorecardRevisionName(qaScorecardRevisionName: string) { + return this.pathTemplates.qaScorecardRevisionPathTemplate.match( + qaScorecardRevisionName + ).revision; + } + /** * Return a fully-qualified settings resource name string. * @@ -6594,6 +11318,7 @@ export class ContactCenterInsightsClient { return this.contactCenterInsightsStub.then(stub => { this._terminated = true; stub.close(); + this.iamClient.close(); this.operationsClient.close(); }); } diff --git a/packages/google-cloud-contactcenterinsights/src/v1/contact_center_insights_client_config.json b/packages/google-cloud-contactcenterinsights/src/v1/contact_center_insights_client_config.json index ab40ab3cf3e..fd4379f9038 100644 --- a/packages/google-cloud-contactcenterinsights/src/v1/contact_center_insights_client_config.json +++ b/packages/google-cloud-contactcenterinsights/src/v1/contact_center_insights_client_config.json @@ -212,6 +212,31 @@ "retry_codes_name": "unavailable", "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" }, + "CreateAnalysisRule": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetAnalysisRule": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListAnalysisRules": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateAnalysisRule": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeleteAnalysisRule": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, "GetEncryptionSpec": { "timeout_millis": 60000, "retry_codes_name": "unavailable", @@ -246,6 +271,136 @@ "timeout_millis": 60000, "retry_codes_name": "unavailable", "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "QueryMetrics": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateQaQuestion": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetQaQuestion": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateQaQuestion": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeleteQaQuestion": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListQaQuestions": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateQaScorecard": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetQaScorecard": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateQaScorecard": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeleteQaScorecard": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListQaScorecards": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateQaScorecardRevision": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetQaScorecardRevision": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "TuneQaScorecardRevision": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeployQaScorecardRevision": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UndeployQaScorecardRevision": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeleteQaScorecardRevision": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListQaScorecardRevisions": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateFeedbackLabel": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListFeedbackLabels": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetFeedbackLabel": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateFeedbackLabel": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeleteFeedbackLabel": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListAllFeedbackLabels": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "BulkUploadFeedbackLabels": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "BulkDownloadFeedbackLabels": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" } } } diff --git a/packages/google-cloud-contactcenterinsights/src/v1/gapic_metadata.json b/packages/google-cloud-contactcenterinsights/src/v1/gapic_metadata.json index 0ea1d0cf82e..62b185d2e99 100644 --- a/packages/google-cloud-contactcenterinsights/src/v1/gapic_metadata.json +++ b/packages/google-cloud-contactcenterinsights/src/v1/gapic_metadata.json @@ -115,6 +115,26 @@ "updateSettings" ] }, + "CreateAnalysisRule": { + "methods": [ + "createAnalysisRule" + ] + }, + "GetAnalysisRule": { + "methods": [ + "getAnalysisRule" + ] + }, + "UpdateAnalysisRule": { + "methods": [ + "updateAnalysisRule" + ] + }, + "DeleteAnalysisRule": { + "methods": [ + "deleteAnalysisRule" + ] + }, "GetEncryptionSpec": { "methods": [ "getEncryptionSpec" @@ -140,6 +160,91 @@ "deleteView" ] }, + "CreateQaQuestion": { + "methods": [ + "createQaQuestion" + ] + }, + "GetQaQuestion": { + "methods": [ + "getQaQuestion" + ] + }, + "UpdateQaQuestion": { + "methods": [ + "updateQaQuestion" + ] + }, + "DeleteQaQuestion": { + "methods": [ + "deleteQaQuestion" + ] + }, + "CreateQaScorecard": { + "methods": [ + "createQaScorecard" + ] + }, + "GetQaScorecard": { + "methods": [ + "getQaScorecard" + ] + }, + "UpdateQaScorecard": { + "methods": [ + "updateQaScorecard" + ] + }, + "DeleteQaScorecard": { + "methods": [ + "deleteQaScorecard" + ] + }, + "CreateQaScorecardRevision": { + "methods": [ + "createQaScorecardRevision" + ] + }, + "GetQaScorecardRevision": { + "methods": [ + "getQaScorecardRevision" + ] + }, + "DeployQaScorecardRevision": { + "methods": [ + "deployQaScorecardRevision" + ] + }, + "UndeployQaScorecardRevision": { + "methods": [ + "undeployQaScorecardRevision" + ] + }, + "DeleteQaScorecardRevision": { + "methods": [ + "deleteQaScorecardRevision" + ] + }, + "CreateFeedbackLabel": { + "methods": [ + "createFeedbackLabel" + ] + }, + "GetFeedbackLabel": { + "methods": [ + "getFeedbackLabel" + ] + }, + "UpdateFeedbackLabel": { + "methods": [ + "updateFeedbackLabel" + ] + }, + "DeleteFeedbackLabel": { + "methods": [ + "deleteFeedbackLabel" + ] + }, "UploadConversation": { "methods": [ "uploadConversation" @@ -205,6 +310,26 @@ "initializeEncryptionSpec" ] }, + "QueryMetrics": { + "methods": [ + "queryMetrics" + ] + }, + "TuneQaScorecardRevision": { + "methods": [ + "tuneQaScorecardRevision" + ] + }, + "BulkUploadFeedbackLabels": { + "methods": [ + "bulkUploadFeedbackLabels" + ] + }, + "BulkDownloadFeedbackLabels": { + "methods": [ + "bulkDownloadFeedbackLabels" + ] + }, "ListConversations": { "methods": [ "listConversations", @@ -226,12 +351,54 @@ "listPhraseMatchersAsync" ] }, + "ListAnalysisRules": { + "methods": [ + "listAnalysisRules", + "listAnalysisRulesStream", + "listAnalysisRulesAsync" + ] + }, "ListViews": { "methods": [ "listViews", "listViewsStream", "listViewsAsync" ] + }, + "ListQaQuestions": { + "methods": [ + "listQaQuestions", + "listQaQuestionsStream", + "listQaQuestionsAsync" + ] + }, + "ListQaScorecards": { + "methods": [ + "listQaScorecards", + "listQaScorecardsStream", + "listQaScorecardsAsync" + ] + }, + "ListQaScorecardRevisions": { + "methods": [ + "listQaScorecardRevisions", + "listQaScorecardRevisionsStream", + "listQaScorecardRevisionsAsync" + ] + }, + "ListFeedbackLabels": { + "methods": [ + "listFeedbackLabels", + "listFeedbackLabelsStream", + "listFeedbackLabelsAsync" + ] + }, + "ListAllFeedbackLabels": { + "methods": [ + "listAllFeedbackLabels", + "listAllFeedbackLabelsStream", + "listAllFeedbackLabelsAsync" + ] } } }, @@ -343,6 +510,26 @@ "updateSettings" ] }, + "CreateAnalysisRule": { + "methods": [ + "createAnalysisRule" + ] + }, + "GetAnalysisRule": { + "methods": [ + "getAnalysisRule" + ] + }, + "UpdateAnalysisRule": { + "methods": [ + "updateAnalysisRule" + ] + }, + "DeleteAnalysisRule": { + "methods": [ + "deleteAnalysisRule" + ] + }, "GetEncryptionSpec": { "methods": [ "getEncryptionSpec" @@ -368,6 +555,91 @@ "deleteView" ] }, + "CreateQaQuestion": { + "methods": [ + "createQaQuestion" + ] + }, + "GetQaQuestion": { + "methods": [ + "getQaQuestion" + ] + }, + "UpdateQaQuestion": { + "methods": [ + "updateQaQuestion" + ] + }, + "DeleteQaQuestion": { + "methods": [ + "deleteQaQuestion" + ] + }, + "CreateQaScorecard": { + "methods": [ + "createQaScorecard" + ] + }, + "GetQaScorecard": { + "methods": [ + "getQaScorecard" + ] + }, + "UpdateQaScorecard": { + "methods": [ + "updateQaScorecard" + ] + }, + "DeleteQaScorecard": { + "methods": [ + "deleteQaScorecard" + ] + }, + "CreateQaScorecardRevision": { + "methods": [ + "createQaScorecardRevision" + ] + }, + "GetQaScorecardRevision": { + "methods": [ + "getQaScorecardRevision" + ] + }, + "DeployQaScorecardRevision": { + "methods": [ + "deployQaScorecardRevision" + ] + }, + "UndeployQaScorecardRevision": { + "methods": [ + "undeployQaScorecardRevision" + ] + }, + "DeleteQaScorecardRevision": { + "methods": [ + "deleteQaScorecardRevision" + ] + }, + "CreateFeedbackLabel": { + "methods": [ + "createFeedbackLabel" + ] + }, + "GetFeedbackLabel": { + "methods": [ + "getFeedbackLabel" + ] + }, + "UpdateFeedbackLabel": { + "methods": [ + "updateFeedbackLabel" + ] + }, + "DeleteFeedbackLabel": { + "methods": [ + "deleteFeedbackLabel" + ] + }, "UploadConversation": { "methods": [ "uploadConversation" @@ -433,6 +705,26 @@ "initializeEncryptionSpec" ] }, + "QueryMetrics": { + "methods": [ + "queryMetrics" + ] + }, + "TuneQaScorecardRevision": { + "methods": [ + "tuneQaScorecardRevision" + ] + }, + "BulkUploadFeedbackLabels": { + "methods": [ + "bulkUploadFeedbackLabels" + ] + }, + "BulkDownloadFeedbackLabels": { + "methods": [ + "bulkDownloadFeedbackLabels" + ] + }, "ListConversations": { "methods": [ "listConversations", @@ -454,12 +746,54 @@ "listPhraseMatchersAsync" ] }, + "ListAnalysisRules": { + "methods": [ + "listAnalysisRules", + "listAnalysisRulesStream", + "listAnalysisRulesAsync" + ] + }, "ListViews": { "methods": [ "listViews", "listViewsStream", "listViewsAsync" ] + }, + "ListQaQuestions": { + "methods": [ + "listQaQuestions", + "listQaQuestionsStream", + "listQaQuestionsAsync" + ] + }, + "ListQaScorecards": { + "methods": [ + "listQaScorecards", + "listQaScorecardsStream", + "listQaScorecardsAsync" + ] + }, + "ListQaScorecardRevisions": { + "methods": [ + "listQaScorecardRevisions", + "listQaScorecardRevisionsStream", + "listQaScorecardRevisionsAsync" + ] + }, + "ListFeedbackLabels": { + "methods": [ + "listFeedbackLabels", + "listFeedbackLabelsStream", + "listFeedbackLabelsAsync" + ] + }, + "ListAllFeedbackLabels": { + "methods": [ + "listAllFeedbackLabels", + "listAllFeedbackLabelsStream", + "listAllFeedbackLabelsAsync" + ] } } } diff --git a/packages/google-cloud-contactcenterinsights/test/gapic_contact_center_insights_v1.ts b/packages/google-cloud-contactcenterinsights/test/gapic_contact_center_insights_v1.ts index 1d9f6eb8ffb..878e56036ba 100644 --- a/packages/google-cloud-contactcenterinsights/test/gapic_contact_center_insights_v1.ts +++ b/packages/google-cloud-contactcenterinsights/test/gapic_contact_center_insights_v1.ts @@ -25,7 +25,7 @@ import * as contactcenterinsightsModule from '../src'; import {PassThrough} from 'stream'; -import {protobuf, LROperation, operationsProtos} from 'google-gax'; +import {protobuf, LROperation, operationsProtos, IamProtos} from 'google-gax'; // Dynamically loaded proto JSON is needed to get the type information // to fill in default values for request objects @@ -3200,8 +3200,8 @@ describe('v1.ContactCenterInsightsClient', () => { }); }); - describe('getEncryptionSpec', () => { - it('invokes getEncryptionSpec without error', async () => { + describe('createAnalysisRule', () => { + it('invokes createAnalysisRule without error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3209,31 +3209,32 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest() + new protos.google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest', - ['name'] + '.google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.EncryptionSpec() + new protos.google.cloud.contactcenterinsights.v1.AnalysisRule() ); - client.innerApiCalls.getEncryptionSpec = stubSimpleCall(expectedResponse); - const [response] = await client.getEncryptionSpec(request); + client.innerApiCalls.createAnalysisRule = + stubSimpleCall(expectedResponse); + const [response] = await client.createAnalysisRule(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.getEncryptionSpec as SinonStub + client.innerApiCalls.createAnalysisRule as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getEncryptionSpec as SinonStub + client.innerApiCalls.createAnalysisRule as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getEncryptionSpec without error using callback', async () => { + it('invokes createAnalysisRule without error using callback', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3241,25 +3242,25 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest() + new protos.google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest', - ['name'] + '.google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.EncryptionSpec() + new protos.google.cloud.contactcenterinsights.v1.AnalysisRule() ); - client.innerApiCalls.getEncryptionSpec = + client.innerApiCalls.createAnalysisRule = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.getEncryptionSpec( + client.createAnalysisRule( request, ( err?: Error | null, - result?: protos.google.cloud.contactcenterinsights.v1.IEncryptionSpec | null + result?: protos.google.cloud.contactcenterinsights.v1.IAnalysisRule | null ) => { if (err) { reject(err); @@ -3272,16 +3273,16 @@ describe('v1.ContactCenterInsightsClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.getEncryptionSpec as SinonStub + client.innerApiCalls.createAnalysisRule as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getEncryptionSpec as SinonStub + client.innerApiCalls.createAnalysisRule as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getEncryptionSpec with error', async () => { + it('invokes createAnalysisRule with error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3289,31 +3290,31 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest() + new protos.google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest', - ['name'] + '.google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.getEncryptionSpec = stubSimpleCall( + client.innerApiCalls.createAnalysisRule = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.getEncryptionSpec(request), expectedError); + await assert.rejects(client.createAnalysisRule(request), expectedError); const actualRequest = ( - client.innerApiCalls.getEncryptionSpec as SinonStub + client.innerApiCalls.createAnalysisRule as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getEncryptionSpec as SinonStub + client.innerApiCalls.createAnalysisRule as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getEncryptionSpec with closed client', async () => { + it('invokes createAnalysisRule with closed client', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3321,21 +3322,21 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest() + new protos.google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest', - ['name'] + '.google.cloud.contactcenterinsights.v1.CreateAnalysisRuleRequest', + ['parent'] ); - request.name = defaultValue1; + request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); - await assert.rejects(client.getEncryptionSpec(request), expectedError); + await assert.rejects(client.createAnalysisRule(request), expectedError); }); }); - describe('createView', () => { - it('invokes createView without error', async () => { + describe('getAnalysisRule', () => { + it('invokes getAnalysisRule without error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3343,31 +3344,31 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.CreateViewRequest() + new protos.google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.CreateViewRequest', - ['parent'] + '.google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.View() + new protos.google.cloud.contactcenterinsights.v1.AnalysisRule() ); - client.innerApiCalls.createView = stubSimpleCall(expectedResponse); - const [response] = await client.createView(request); + client.innerApiCalls.getAnalysisRule = stubSimpleCall(expectedResponse); + const [response] = await client.getAnalysisRule(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createView as SinonStub + client.innerApiCalls.getAnalysisRule as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createView as SinonStub + client.innerApiCalls.getAnalysisRule as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createView without error using callback', async () => { + it('invokes getAnalysisRule without error using callback', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3375,25 +3376,25 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.CreateViewRequest() + new protos.google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.CreateViewRequest', - ['parent'] + '.google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.View() + new protos.google.cloud.contactcenterinsights.v1.AnalysisRule() ); - client.innerApiCalls.createView = + client.innerApiCalls.getAnalysisRule = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.createView( + client.getAnalysisRule( request, ( err?: Error | null, - result?: protos.google.cloud.contactcenterinsights.v1.IView | null + result?: protos.google.cloud.contactcenterinsights.v1.IAnalysisRule | null ) => { if (err) { reject(err); @@ -3406,16 +3407,16 @@ describe('v1.ContactCenterInsightsClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createView as SinonStub + client.innerApiCalls.getAnalysisRule as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createView as SinonStub + client.innerApiCalls.getAnalysisRule as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createView with error', async () => { + it('invokes getAnalysisRule with error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3423,31 +3424,31 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.CreateViewRequest() + new protos.google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.CreateViewRequest', - ['parent'] + '.google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.createView = stubSimpleCall( + client.innerApiCalls.getAnalysisRule = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.createView(request), expectedError); + await assert.rejects(client.getAnalysisRule(request), expectedError); const actualRequest = ( - client.innerApiCalls.createView as SinonStub + client.innerApiCalls.getAnalysisRule as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createView as SinonStub + client.innerApiCalls.getAnalysisRule as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createView with closed client', async () => { + it('invokes getAnalysisRule with closed client', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3455,21 +3456,21 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.CreateViewRequest() + new protos.google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.CreateViewRequest', - ['parent'] + '.google.cloud.contactcenterinsights.v1.GetAnalysisRuleRequest', + ['name'] ); - request.parent = defaultValue1; + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); - await assert.rejects(client.createView(request), expectedError); + await assert.rejects(client.getAnalysisRule(request), expectedError); }); }); - describe('getView', () => { - it('invokes getView without error', async () => { + describe('updateAnalysisRule', () => { + it('invokes updateAnalysisRule without error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3477,31 +3478,33 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.GetViewRequest() + new protos.google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest() ); + request.analysisRule ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.GetViewRequest', - ['name'] + '.google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest', + ['analysisRule', 'name'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.analysisRule.name = defaultValue1; + const expectedHeaderRequestParams = `analysis_rule.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.View() + new protos.google.cloud.contactcenterinsights.v1.AnalysisRule() ); - client.innerApiCalls.getView = stubSimpleCall(expectedResponse); - const [response] = await client.getView(request); + client.innerApiCalls.updateAnalysisRule = + stubSimpleCall(expectedResponse); + const [response] = await client.updateAnalysisRule(request); assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getView as SinonStub).getCall( - 0 - ).args[0]; + const actualRequest = ( + client.innerApiCalls.updateAnalysisRule as SinonStub + ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getView as SinonStub + client.innerApiCalls.updateAnalysisRule as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getView without error using callback', async () => { + it('invokes updateAnalysisRule without error using callback', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3509,25 +3512,26 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.GetViewRequest() + new protos.google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest() ); + request.analysisRule ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.GetViewRequest', - ['name'] + '.google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest', + ['analysisRule', 'name'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.analysisRule.name = defaultValue1; + const expectedHeaderRequestParams = `analysis_rule.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.View() + new protos.google.cloud.contactcenterinsights.v1.AnalysisRule() ); - client.innerApiCalls.getView = + client.innerApiCalls.updateAnalysisRule = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.getView( + client.updateAnalysisRule( request, ( err?: Error | null, - result?: protos.google.cloud.contactcenterinsights.v1.IView | null + result?: protos.google.cloud.contactcenterinsights.v1.IAnalysisRule | null ) => { if (err) { reject(err); @@ -3539,17 +3543,17 @@ describe('v1.ContactCenterInsightsClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getView as SinonStub).getCall( - 0 - ).args[0]; + const actualRequest = ( + client.innerApiCalls.updateAnalysisRule as SinonStub + ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getView as SinonStub + client.innerApiCalls.updateAnalysisRule as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getView with error', async () => { + it('invokes updateAnalysisRule with error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3557,28 +3561,32 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.GetViewRequest() + new protos.google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest() ); + request.analysisRule ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.GetViewRequest', - ['name'] + '.google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest', + ['analysisRule', 'name'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.analysisRule.name = defaultValue1; + const expectedHeaderRequestParams = `analysis_rule.name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.getView = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getView(request), expectedError); - const actualRequest = (client.innerApiCalls.getView as SinonStub).getCall( - 0 - ).args[0]; + client.innerApiCalls.updateAnalysisRule = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateAnalysisRule(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateAnalysisRule as SinonStub + ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getView as SinonStub + client.innerApiCalls.updateAnalysisRule as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getView with closed client', async () => { + it('invokes updateAnalysisRule with closed client', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3586,21 +3594,22 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.GetViewRequest() + new protos.google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest() ); + request.analysisRule ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.GetViewRequest', - ['name'] + '.google.cloud.contactcenterinsights.v1.UpdateAnalysisRuleRequest', + ['analysisRule', 'name'] ); - request.name = defaultValue1; + request.analysisRule.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); - await assert.rejects(client.getView(request), expectedError); + await assert.rejects(client.updateAnalysisRule(request), expectedError); }); }); - describe('updateView', () => { - it('invokes updateView without error', async () => { + describe('deleteAnalysisRule', () => { + it('invokes deleteAnalysisRule without error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3608,32 +3617,32 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.UpdateViewRequest() + new protos.google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest() ); - request.view ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.UpdateViewRequest', - ['view', 'name'] + '.google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest', + ['name'] ); - request.view.name = defaultValue1; - const expectedHeaderRequestParams = `view.name=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.View() + new protos.google.protobuf.Empty() ); - client.innerApiCalls.updateView = stubSimpleCall(expectedResponse); - const [response] = await client.updateView(request); + client.innerApiCalls.deleteAnalysisRule = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteAnalysisRule(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.updateView as SinonStub + client.innerApiCalls.deleteAnalysisRule as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.updateView as SinonStub + client.innerApiCalls.deleteAnalysisRule as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes updateView without error using callback', async () => { + it('invokes deleteAnalysisRule without error using callback', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3641,26 +3650,25 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.UpdateViewRequest() + new protos.google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest() ); - request.view ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.UpdateViewRequest', - ['view', 'name'] + '.google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest', + ['name'] ); - request.view.name = defaultValue1; - const expectedHeaderRequestParams = `view.name=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.View() + new protos.google.protobuf.Empty() ); - client.innerApiCalls.updateView = + client.innerApiCalls.deleteAnalysisRule = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.updateView( + client.deleteAnalysisRule( request, ( err?: Error | null, - result?: protos.google.cloud.contactcenterinsights.v1.IView | null + result?: protos.google.protobuf.IEmpty | null ) => { if (err) { reject(err); @@ -3673,16 +3681,16 @@ describe('v1.ContactCenterInsightsClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.updateView as SinonStub + client.innerApiCalls.deleteAnalysisRule as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.updateView as SinonStub + client.innerApiCalls.deleteAnalysisRule as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes updateView with error', async () => { + it('invokes deleteAnalysisRule with error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3690,32 +3698,31 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.UpdateViewRequest() + new protos.google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest() ); - request.view ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.UpdateViewRequest', - ['view', 'name'] + '.google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest', + ['name'] ); - request.view.name = defaultValue1; - const expectedHeaderRequestParams = `view.name=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.updateView = stubSimpleCall( + client.innerApiCalls.deleteAnalysisRule = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.updateView(request), expectedError); + await assert.rejects(client.deleteAnalysisRule(request), expectedError); const actualRequest = ( - client.innerApiCalls.updateView as SinonStub + client.innerApiCalls.deleteAnalysisRule as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.updateView as SinonStub + client.innerApiCalls.deleteAnalysisRule as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes updateView with closed client', async () => { + it('invokes deleteAnalysisRule with closed client', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3723,22 +3730,21 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.UpdateViewRequest() + new protos.google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest() ); - request.view ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.UpdateViewRequest', - ['view', 'name'] + '.google.cloud.contactcenterinsights.v1.DeleteAnalysisRuleRequest', + ['name'] ); - request.view.name = defaultValue1; + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); - await assert.rejects(client.updateView(request), expectedError); + await assert.rejects(client.deleteAnalysisRule(request), expectedError); }); }); - describe('deleteView', () => { - it('invokes deleteView without error', async () => { + describe('getEncryptionSpec', () => { + it('invokes getEncryptionSpec without error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3746,31 +3752,31 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.DeleteViewRequest() + new protos.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.DeleteViewRequest', + '.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() + new protos.google.cloud.contactcenterinsights.v1.EncryptionSpec() ); - client.innerApiCalls.deleteView = stubSimpleCall(expectedResponse); - const [response] = await client.deleteView(request); + client.innerApiCalls.getEncryptionSpec = stubSimpleCall(expectedResponse); + const [response] = await client.getEncryptionSpec(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.deleteView as SinonStub + client.innerApiCalls.getEncryptionSpec as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteView as SinonStub + client.innerApiCalls.getEncryptionSpec as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteView without error using callback', async () => { + it('invokes getEncryptionSpec without error using callback', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3778,25 +3784,25 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.DeleteViewRequest() + new protos.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.DeleteViewRequest', + '.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() + new protos.google.cloud.contactcenterinsights.v1.EncryptionSpec() ); - client.innerApiCalls.deleteView = + client.innerApiCalls.getEncryptionSpec = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.deleteView( + client.getEncryptionSpec( request, ( err?: Error | null, - result?: protos.google.protobuf.IEmpty | null + result?: protos.google.cloud.contactcenterinsights.v1.IEncryptionSpec | null ) => { if (err) { reject(err); @@ -3809,16 +3815,16 @@ describe('v1.ContactCenterInsightsClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.deleteView as SinonStub + client.innerApiCalls.getEncryptionSpec as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteView as SinonStub + client.innerApiCalls.getEncryptionSpec as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteView with error', async () => { + it('invokes getEncryptionSpec with error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3826,31 +3832,31 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.DeleteViewRequest() + new protos.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.DeleteViewRequest', + '.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.deleteView = stubSimpleCall( + client.innerApiCalls.getEncryptionSpec = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.deleteView(request), expectedError); + await assert.rejects(client.getEncryptionSpec(request), expectedError); const actualRequest = ( - client.innerApiCalls.deleteView as SinonStub + client.innerApiCalls.getEncryptionSpec as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteView as SinonStub + client.innerApiCalls.getEncryptionSpec as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteView with closed client', async () => { + it('invokes getEncryptionSpec with closed client', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3858,21 +3864,21 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.DeleteViewRequest() + new protos.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.DeleteViewRequest', + '.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest', ['name'] ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); - await assert.rejects(client.deleteView(request), expectedError); + await assert.rejects(client.getEncryptionSpec(request), expectedError); }); }); - describe('uploadConversation', () => { - it('invokes uploadConversation without error', async () => { + describe('createView', () => { + it('invokes createView without error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3880,33 +3886,31 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.UploadConversationRequest() + new protos.google.cloud.contactcenterinsights.v1.CreateViewRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.UploadConversationRequest', + '.google.cloud.contactcenterinsights.v1.CreateViewRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.contactcenterinsights.v1.View() ); - client.innerApiCalls.uploadConversation = - stubLongRunningCall(expectedResponse); - const [operation] = await client.uploadConversation(request); - const [response] = await operation.promise(); + client.innerApiCalls.createView = stubSimpleCall(expectedResponse); + const [response] = await client.createView(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.uploadConversation as SinonStub + client.innerApiCalls.createView as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.uploadConversation as SinonStub + client.innerApiCalls.createView as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes uploadConversation without error using callback', async () => { + it('invokes createView without error using callback', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3914,28 +3918,25 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.UploadConversationRequest() + new protos.google.cloud.contactcenterinsights.v1.CreateViewRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.UploadConversationRequest', + '.google.cloud.contactcenterinsights.v1.CreateViewRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.contactcenterinsights.v1.View() ); - client.innerApiCalls.uploadConversation = - stubLongRunningCallWithCallback(expectedResponse); + client.innerApiCalls.createView = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.uploadConversation( + client.createView( request, ( err?: Error | null, - result?: LROperation< - protos.google.cloud.contactcenterinsights.v1.IConversation, - protos.google.cloud.contactcenterinsights.v1.IUploadConversationMetadata - > | null + result?: protos.google.cloud.contactcenterinsights.v1.IView | null ) => { if (err) { reject(err); @@ -3945,23 +3946,19 @@ describe('v1.ContactCenterInsightsClient', () => { } ); }); - const operation = (await promise) as LROperation< - protos.google.cloud.contactcenterinsights.v1.IConversation, - protos.google.cloud.contactcenterinsights.v1.IUploadConversationMetadata - >; - const [response] = await operation.promise(); + const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.uploadConversation as SinonStub + client.innerApiCalls.createView as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.uploadConversation as SinonStub + client.innerApiCalls.createView as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes uploadConversation with call error', async () => { + it('invokes createView with error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3969,31 +3966,31 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.UploadConversationRequest() + new protos.google.cloud.contactcenterinsights.v1.CreateViewRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.UploadConversationRequest', + '.google.cloud.contactcenterinsights.v1.CreateViewRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.uploadConversation = stubLongRunningCall( + client.innerApiCalls.createView = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.uploadConversation(request), expectedError); + await assert.rejects(client.createView(request), expectedError); const actualRequest = ( - client.innerApiCalls.uploadConversation as SinonStub + client.innerApiCalls.createView as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.uploadConversation as SinonStub + client.innerApiCalls.createView as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes uploadConversation with LRO error', async () => { + it('invokes createView with closed client', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -4001,78 +3998,21 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.UploadConversationRequest() + new protos.google.cloud.contactcenterinsights.v1.CreateViewRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.UploadConversationRequest', + '.google.cloud.contactcenterinsights.v1.CreateViewRequest', ['parent'] ); request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.uploadConversation = stubLongRunningCall( - undefined, - undefined, - expectedError - ); - const [operation] = await client.uploadConversation(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = ( - client.innerApiCalls.uploadConversation as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.uploadConversation as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUploadConversationProgress without error', async () => { - const client = - new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkUploadConversationProgress( - expectedResponse.name - ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUploadConversationProgress with error', async () => { - const client = - new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.checkUploadConversationProgress(''), - expectedError - ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createView(request), expectedError); }); }); - describe('createAnalysis', () => { - it('invokes createAnalysis without error', async () => { + describe('getView', () => { + it('invokes getView without error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -4080,33 +4020,31 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest() + new protos.google.cloud.contactcenterinsights.v1.GetViewRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest', - ['parent'] + '.google.cloud.contactcenterinsights.v1.GetViewRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.contactcenterinsights.v1.View() ); - client.innerApiCalls.createAnalysis = - stubLongRunningCall(expectedResponse); - const [operation] = await client.createAnalysis(request); - const [response] = await operation.promise(); + client.innerApiCalls.getView = stubSimpleCall(expectedResponse); + const [response] = await client.getView(request); assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createAnalysis as SinonStub - ).getCall(0).args[0]; + const actualRequest = (client.innerApiCalls.getView as SinonStub).getCall( + 0 + ).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createAnalysis as SinonStub + client.innerApiCalls.getView as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createAnalysis without error using callback', async () => { + it('invokes getView without error using callback', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -4114,28 +4052,25 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest() + new protos.google.cloud.contactcenterinsights.v1.GetViewRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest', - ['parent'] + '.google.cloud.contactcenterinsights.v1.GetViewRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.contactcenterinsights.v1.View() ); - client.innerApiCalls.createAnalysis = - stubLongRunningCallWithCallback(expectedResponse); + client.innerApiCalls.getView = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.createAnalysis( + client.getView( request, ( err?: Error | null, - result?: LROperation< - protos.google.cloud.contactcenterinsights.v1.IAnalysis, - protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisOperationMetadata - > | null + result?: protos.google.cloud.contactcenterinsights.v1.IView | null ) => { if (err) { reject(err); @@ -4145,23 +4080,19 @@ describe('v1.ContactCenterInsightsClient', () => { } ); }); - const operation = (await promise) as LROperation< - protos.google.cloud.contactcenterinsights.v1.IAnalysis, - protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisOperationMetadata - >; - const [response] = await operation.promise(); + const response = await promise; assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createAnalysis as SinonStub - ).getCall(0).args[0]; + const actualRequest = (client.innerApiCalls.getView as SinonStub).getCall( + 0 + ).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createAnalysis as SinonStub + client.innerApiCalls.getView as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createAnalysis with call error', async () => { + it('invokes getView with error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -4169,31 +4100,28 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest() + new protos.google.cloud.contactcenterinsights.v1.GetViewRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest', - ['parent'] + '.google.cloud.contactcenterinsights.v1.GetViewRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.createAnalysis = stubLongRunningCall( - undefined, - expectedError - ); - await assert.rejects(client.createAnalysis(request), expectedError); - const actualRequest = ( - client.innerApiCalls.createAnalysis as SinonStub - ).getCall(0).args[0]; + client.innerApiCalls.getView = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getView(request), expectedError); + const actualRequest = (client.innerApiCalls.getView as SinonStub).getCall( + 0 + ).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createAnalysis as SinonStub + client.innerApiCalls.getView as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createAnalysis with LRO error', async () => { + it('invokes getView with closed client', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -4201,78 +4129,159 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest() + new protos.google.cloud.contactcenterinsights.v1.GetViewRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest', - ['parent'] + '.google.cloud.contactcenterinsights.v1.GetViewRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createAnalysis = stubLongRunningCall( - undefined, - undefined, - expectedError + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getView(request), expectedError); + }); + }); + + describe('updateView', () => { + it('invokes updateView without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UpdateViewRequest() ); - const [operation] = await client.createAnalysis(request); - await assert.rejects(operation.promise(), expectedError); + request.view ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UpdateViewRequest', + ['view', 'name'] + ); + request.view.name = defaultValue1; + const expectedHeaderRequestParams = `view.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.View() + ); + client.innerApiCalls.updateView = stubSimpleCall(expectedResponse); + const [response] = await client.updateView(request); + assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createAnalysis as SinonStub + client.innerApiCalls.updateView as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createAnalysis as SinonStub + client.innerApiCalls.updateView as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkCreateAnalysisProgress without error', async () => { + it('invokes updateView without error using callback', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UpdateViewRequest() ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkCreateAnalysisProgress( - expectedResponse.name + request.view ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UpdateViewRequest', + ['view', 'name'] ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + request.view.name = defaultValue1; + const expectedHeaderRequestParams = `view.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.View() + ); + client.innerApiCalls.updateView = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateView( + request, + ( + err?: Error | null, + result?: protos.google.cloud.contactcenterinsights.v1.IView | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkCreateAnalysisProgress with error', async () => { + it('invokes updateView with error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UpdateViewRequest() + ); + request.view ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UpdateViewRequest', + ['view', 'name'] + ); + request.view.name = defaultValue1; + const expectedHeaderRequestParams = `view.name=${defaultValue1}`; const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( + client.innerApiCalls.updateView = stubSimpleCall( undefined, expectedError ); - await assert.rejects( - client.checkCreateAnalysisProgress(''), - expectedError + await assert.rejects(client.updateView(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateView as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateView as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateView with closed client', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UpdateViewRequest() ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + request.view ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UpdateViewRequest', + ['view', 'name'] + ); + request.view.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateView(request), expectedError); }); }); - describe('bulkAnalyzeConversations', () => { - it('invokes bulkAnalyzeConversations without error', async () => { + describe('deleteView', () => { + it('invokes deleteView without error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -4280,33 +4289,31 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest() + new protos.google.cloud.contactcenterinsights.v1.DeleteViewRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest', - ['parent'] + '.google.cloud.contactcenterinsights.v1.DeleteViewRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.protobuf.Empty() ); - client.innerApiCalls.bulkAnalyzeConversations = - stubLongRunningCall(expectedResponse); - const [operation] = await client.bulkAnalyzeConversations(request); - const [response] = await operation.promise(); + client.innerApiCalls.deleteView = stubSimpleCall(expectedResponse); + const [response] = await client.deleteView(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.bulkAnalyzeConversations as SinonStub + client.innerApiCalls.deleteView as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.bulkAnalyzeConversations as SinonStub + client.innerApiCalls.deleteView as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes bulkAnalyzeConversations without error using callback', async () => { + it('invokes deleteView without error using callback', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -4314,28 +4321,25 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest() + new protos.google.cloud.contactcenterinsights.v1.DeleteViewRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest', - ['parent'] + '.google.cloud.contactcenterinsights.v1.DeleteViewRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.protobuf.Empty() ); - client.innerApiCalls.bulkAnalyzeConversations = - stubLongRunningCallWithCallback(expectedResponse); + client.innerApiCalls.deleteView = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.bulkAnalyzeConversations( + client.deleteView( request, ( err?: Error | null, - result?: LROperation< - protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsResponse, - protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsMetadata - > | null + result?: protos.google.protobuf.IEmpty | null ) => { if (err) { reject(err); @@ -4345,23 +4349,19 @@ describe('v1.ContactCenterInsightsClient', () => { } ); }); - const operation = (await promise) as LROperation< - protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsResponse, - protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsMetadata - >; - const [response] = await operation.promise(); + const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.bulkAnalyzeConversations as SinonStub + client.innerApiCalls.deleteView as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.bulkAnalyzeConversations as SinonStub + client.innerApiCalls.deleteView as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes bulkAnalyzeConversations with call error', async () => { + it('invokes deleteView with error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -4369,34 +4369,31 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest() + new protos.google.cloud.contactcenterinsights.v1.DeleteViewRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest', - ['parent'] + '.google.cloud.contactcenterinsights.v1.DeleteViewRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.bulkAnalyzeConversations = stubLongRunningCall( + client.innerApiCalls.deleteView = stubSimpleCall( undefined, expectedError ); - await assert.rejects( - client.bulkAnalyzeConversations(request), - expectedError - ); + await assert.rejects(client.deleteView(request), expectedError); const actualRequest = ( - client.innerApiCalls.bulkAnalyzeConversations as SinonStub + client.innerApiCalls.deleteView as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.bulkAnalyzeConversations as SinonStub + client.innerApiCalls.deleteView as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes bulkAnalyzeConversations with LRO error', async () => { + it('invokes deleteView with closed client', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -4404,79 +4401,133 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest() + new protos.google.cloud.contactcenterinsights.v1.DeleteViewRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest', + '.google.cloud.contactcenterinsights.v1.DeleteViewRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteView(request), expectedError); + }); + }); + + describe('createQaQuestion', () => { + it('invokes createQaQuestion without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.bulkAnalyzeConversations = stubLongRunningCall( - undefined, - undefined, - expectedError + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.QaQuestion() ); - const [operation] = await client.bulkAnalyzeConversations(request); - await assert.rejects(operation.promise(), expectedError); + client.innerApiCalls.createQaQuestion = stubSimpleCall(expectedResponse); + const [response] = await client.createQaQuestion(request); + assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.bulkAnalyzeConversations as SinonStub + client.innerApiCalls.createQaQuestion as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.bulkAnalyzeConversations as SinonStub + client.innerApiCalls.createQaQuestion as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkBulkAnalyzeConversationsProgress without error', async () => { + it('invokes createQaQuestion without error using callback', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() + new protos.google.cloud.contactcenterinsights.v1.QaQuestion() ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = - await client.checkBulkAnalyzeConversationsProgress( - expectedResponse.name + client.innerApiCalls.createQaQuestion = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createQaQuestion( + request, + ( + err?: Error | null, + result?: protos.google.cloud.contactcenterinsights.v1.IQaQuestion | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createQaQuestion as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createQaQuestion as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkBulkAnalyzeConversationsProgress with error', async () => { + it('invokes createQaQuestion with error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( + client.innerApiCalls.createQaQuestion = stubSimpleCall( undefined, expectedError ); - await assert.rejects( - client.checkBulkAnalyzeConversationsProgress(''), - expectedError - ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + await assert.rejects(client.createQaQuestion(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createQaQuestion as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createQaQuestion as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - }); - describe('bulkDeleteConversations', () => { - it('invokes bulkDeleteConversations without error', async () => { + it('invokes createQaQuestion with closed client', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -4484,33 +4535,53 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.BulkDeleteConversationsRequest() + new protos.google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.BulkDeleteConversationsRequest', + '.google.cloud.contactcenterinsights.v1.CreateQaQuestionRequest', ['parent'] ); request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createQaQuestion(request), expectedError); + }); + }); + + describe('getQaQuestion', () => { + it('invokes getQaQuestion without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetQaQuestionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.GetQaQuestionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.contactcenterinsights.v1.QaQuestion() ); - client.innerApiCalls.bulkDeleteConversations = - stubLongRunningCall(expectedResponse); - const [operation] = await client.bulkDeleteConversations(request); - const [response] = await operation.promise(); + client.innerApiCalls.getQaQuestion = stubSimpleCall(expectedResponse); + const [response] = await client.getQaQuestion(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.bulkDeleteConversations as SinonStub + client.innerApiCalls.getQaQuestion as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.bulkDeleteConversations as SinonStub + client.innerApiCalls.getQaQuestion as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes bulkDeleteConversations without error using callback', async () => { + it('invokes getQaQuestion without error using callback', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -4518,28 +4589,25 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.BulkDeleteConversationsRequest() + new protos.google.cloud.contactcenterinsights.v1.GetQaQuestionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.BulkDeleteConversationsRequest', - ['parent'] + '.google.cloud.contactcenterinsights.v1.GetQaQuestionRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.contactcenterinsights.v1.QaQuestion() ); - client.innerApiCalls.bulkDeleteConversations = - stubLongRunningCallWithCallback(expectedResponse); + client.innerApiCalls.getQaQuestion = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.bulkDeleteConversations( + client.getQaQuestion( request, ( err?: Error | null, - result?: LROperation< - protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsResponse, - protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsMetadata - > | null + result?: protos.google.cloud.contactcenterinsights.v1.IQaQuestion | null ) => { if (err) { reject(err); @@ -4549,23 +4617,19 @@ describe('v1.ContactCenterInsightsClient', () => { } ); }); - const operation = (await promise) as LROperation< - protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsResponse, - protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsMetadata - >; - const [response] = await operation.promise(); + const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.bulkDeleteConversations as SinonStub + client.innerApiCalls.getQaQuestion as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.bulkDeleteConversations as SinonStub + client.innerApiCalls.getQaQuestion as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes bulkDeleteConversations with call error', async () => { + it('invokes getQaQuestion with error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -4573,34 +4637,31 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.BulkDeleteConversationsRequest() + new protos.google.cloud.contactcenterinsights.v1.GetQaQuestionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.BulkDeleteConversationsRequest', - ['parent'] + '.google.cloud.contactcenterinsights.v1.GetQaQuestionRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.bulkDeleteConversations = stubLongRunningCall( + client.innerApiCalls.getQaQuestion = stubSimpleCall( undefined, expectedError ); - await assert.rejects( - client.bulkDeleteConversations(request), - expectedError - ); + await assert.rejects(client.getQaQuestion(request), expectedError); const actualRequest = ( - client.innerApiCalls.bulkDeleteConversations as SinonStub + client.innerApiCalls.getQaQuestion as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.bulkDeleteConversations as SinonStub + client.innerApiCalls.getQaQuestion as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes bulkDeleteConversations with LRO error', async () => { + it('invokes getQaQuestion with closed client', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -4608,79 +4669,21 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.BulkDeleteConversationsRequest() + new protos.google.cloud.contactcenterinsights.v1.GetQaQuestionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.BulkDeleteConversationsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.bulkDeleteConversations = stubLongRunningCall( - undefined, - undefined, - expectedError - ); - const [operation] = await client.bulkDeleteConversations(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = ( - client.innerApiCalls.bulkDeleteConversations as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.bulkDeleteConversations as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkBulkDeleteConversationsProgress without error', async () => { - const client = - new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = - await client.checkBulkDeleteConversationsProgress( - expectedResponse.name - ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkBulkDeleteConversationsProgress with error', async () => { - const client = - new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.checkBulkDeleteConversationsProgress(''), - expectedError + '.google.cloud.contactcenterinsights.v1.GetQaQuestionRequest', + ['name'] ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getQaQuestion(request), expectedError); }); }); - describe('ingestConversations', () => { - it('invokes ingestConversations without error', async () => { + describe('updateQaQuestion', () => { + it('invokes updateQaQuestion without error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -4688,33 +4691,32 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.IngestConversationsRequest() + new protos.google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest() ); + request.qaQuestion ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.IngestConversationsRequest', - ['parent'] + '.google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest', + ['qaQuestion', 'name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.qaQuestion.name = defaultValue1; + const expectedHeaderRequestParams = `qa_question.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.contactcenterinsights.v1.QaQuestion() ); - client.innerApiCalls.ingestConversations = - stubLongRunningCall(expectedResponse); - const [operation] = await client.ingestConversations(request); - const [response] = await operation.promise(); + client.innerApiCalls.updateQaQuestion = stubSimpleCall(expectedResponse); + const [response] = await client.updateQaQuestion(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.ingestConversations as SinonStub + client.innerApiCalls.updateQaQuestion as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.ingestConversations as SinonStub + client.innerApiCalls.updateQaQuestion as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes ingestConversations without error using callback', async () => { + it('invokes updateQaQuestion without error using callback', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -4722,28 +4724,26 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.IngestConversationsRequest() + new protos.google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest() ); + request.qaQuestion ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.IngestConversationsRequest', - ['parent'] + '.google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest', + ['qaQuestion', 'name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.qaQuestion.name = defaultValue1; + const expectedHeaderRequestParams = `qa_question.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.contactcenterinsights.v1.QaQuestion() ); - client.innerApiCalls.ingestConversations = - stubLongRunningCallWithCallback(expectedResponse); + client.innerApiCalls.updateQaQuestion = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.ingestConversations( + client.updateQaQuestion( request, ( err?: Error | null, - result?: LROperation< - protos.google.cloud.contactcenterinsights.v1.IIngestConversationsResponse, - protos.google.cloud.contactcenterinsights.v1.IIngestConversationsMetadata - > | null + result?: protos.google.cloud.contactcenterinsights.v1.IQaQuestion | null ) => { if (err) { reject(err); @@ -4753,23 +4753,19 @@ describe('v1.ContactCenterInsightsClient', () => { } ); }); - const operation = (await promise) as LROperation< - protos.google.cloud.contactcenterinsights.v1.IIngestConversationsResponse, - protos.google.cloud.contactcenterinsights.v1.IIngestConversationsMetadata - >; - const [response] = await operation.promise(); + const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.ingestConversations as SinonStub + client.innerApiCalls.updateQaQuestion as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.ingestConversations as SinonStub + client.innerApiCalls.updateQaQuestion as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes ingestConversations with call error', async () => { + it('invokes updateQaQuestion with error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -4777,31 +4773,32 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.IngestConversationsRequest() + new protos.google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest() ); + request.qaQuestion ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.IngestConversationsRequest', - ['parent'] + '.google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest', + ['qaQuestion', 'name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.qaQuestion.name = defaultValue1; + const expectedHeaderRequestParams = `qa_question.name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.ingestConversations = stubLongRunningCall( + client.innerApiCalls.updateQaQuestion = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.ingestConversations(request), expectedError); + await assert.rejects(client.updateQaQuestion(request), expectedError); const actualRequest = ( - client.innerApiCalls.ingestConversations as SinonStub + client.innerApiCalls.updateQaQuestion as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.ingestConversations as SinonStub + client.innerApiCalls.updateQaQuestion as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes ingestConversations with LRO error', async () => { + it('invokes updateQaQuestion with closed client', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -4809,78 +4806,22 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.IngestConversationsRequest() + new protos.google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest() ); + request.qaQuestion ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.IngestConversationsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.ingestConversations = stubLongRunningCall( - undefined, - undefined, - expectedError - ); - const [operation] = await client.ingestConversations(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = ( - client.innerApiCalls.ingestConversations as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.ingestConversations as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkIngestConversationsProgress without error', async () => { - const client = - new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkIngestConversationsProgress( - expectedResponse.name - ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkIngestConversationsProgress with error', async () => { - const client = - new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.checkIngestConversationsProgress(''), - expectedError + '.google.cloud.contactcenterinsights.v1.UpdateQaQuestionRequest', + ['qaQuestion', 'name'] ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + request.qaQuestion.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateQaQuestion(request), expectedError); }); }); - describe('exportInsightsData', () => { - it('invokes exportInsightsData without error', async () => { + describe('deleteQaQuestion', () => { + it('invokes deleteQaQuestion without error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -4888,33 +4829,31 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest() + new protos.google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest', - ['parent'] + '.google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.protobuf.Empty() ); - client.innerApiCalls.exportInsightsData = - stubLongRunningCall(expectedResponse); - const [operation] = await client.exportInsightsData(request); - const [response] = await operation.promise(); + client.innerApiCalls.deleteQaQuestion = stubSimpleCall(expectedResponse); + const [response] = await client.deleteQaQuestion(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.exportInsightsData as SinonStub + client.innerApiCalls.deleteQaQuestion as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.exportInsightsData as SinonStub + client.innerApiCalls.deleteQaQuestion as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes exportInsightsData without error using callback', async () => { + it('invokes deleteQaQuestion without error using callback', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -4922,28 +4861,25 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest() + new protos.google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest', - ['parent'] + '.google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.protobuf.Empty() ); - client.innerApiCalls.exportInsightsData = - stubLongRunningCallWithCallback(expectedResponse); + client.innerApiCalls.deleteQaQuestion = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.exportInsightsData( + client.deleteQaQuestion( request, ( err?: Error | null, - result?: LROperation< - protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataResponse, - protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataMetadata - > | null + result?: protos.google.protobuf.IEmpty | null ) => { if (err) { reject(err); @@ -4953,23 +4889,19 @@ describe('v1.ContactCenterInsightsClient', () => { } ); }); - const operation = (await promise) as LROperation< - protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataResponse, - protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataMetadata - >; - const [response] = await operation.promise(); + const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.exportInsightsData as SinonStub + client.innerApiCalls.deleteQaQuestion as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.exportInsightsData as SinonStub + client.innerApiCalls.deleteQaQuestion as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes exportInsightsData with call error', async () => { + it('invokes deleteQaQuestion with error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -4977,31 +4909,31 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest() + new protos.google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest', - ['parent'] + '.google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.exportInsightsData = stubLongRunningCall( + client.innerApiCalls.deleteQaQuestion = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.exportInsightsData(request), expectedError); + await assert.rejects(client.deleteQaQuestion(request), expectedError); const actualRequest = ( - client.innerApiCalls.exportInsightsData as SinonStub + client.innerApiCalls.deleteQaQuestion as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.exportInsightsData as SinonStub + client.innerApiCalls.deleteQaQuestion as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes exportInsightsData with LRO error', async () => { + it('invokes deleteQaQuestion with closed client', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -5009,78 +4941,21 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest() + new protos.google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.exportInsightsData = stubLongRunningCall( - undefined, - undefined, - expectedError - ); - const [operation] = await client.exportInsightsData(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = ( - client.innerApiCalls.exportInsightsData as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.exportInsightsData as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkExportInsightsDataProgress without error', async () => { - const client = - new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkExportInsightsDataProgress( - expectedResponse.name - ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkExportInsightsDataProgress with error', async () => { - const client = - new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.checkExportInsightsDataProgress(''), - expectedError + '.google.cloud.contactcenterinsights.v1.DeleteQaQuestionRequest', + ['name'] ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteQaQuestion(request), expectedError); }); }); - describe('createIssueModel', () => { - it('invokes createIssueModel without error', async () => { + describe('createQaScorecard', () => { + it('invokes createQaScorecard without error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -5088,33 +4963,31 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest() + new protos.google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest', + '.google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.contactcenterinsights.v1.QaScorecard() ); - client.innerApiCalls.createIssueModel = - stubLongRunningCall(expectedResponse); - const [operation] = await client.createIssueModel(request); - const [response] = await operation.promise(); + client.innerApiCalls.createQaScorecard = stubSimpleCall(expectedResponse); + const [response] = await client.createQaScorecard(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createIssueModel as SinonStub + client.innerApiCalls.createQaScorecard as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createIssueModel as SinonStub + client.innerApiCalls.createQaScorecard as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createIssueModel without error using callback', async () => { + it('invokes createQaScorecard without error using callback', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -5122,28 +4995,25 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest() + new protos.google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest', + '.google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.contactcenterinsights.v1.QaScorecard() ); - client.innerApiCalls.createIssueModel = - stubLongRunningCallWithCallback(expectedResponse); + client.innerApiCalls.createQaScorecard = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.createIssueModel( + client.createQaScorecard( request, ( err?: Error | null, - result?: LROperation< - protos.google.cloud.contactcenterinsights.v1.IIssueModel, - protos.google.cloud.contactcenterinsights.v1.ICreateIssueModelMetadata - > | null + result?: protos.google.cloud.contactcenterinsights.v1.IQaScorecard | null ) => { if (err) { reject(err); @@ -5153,23 +5023,19 @@ describe('v1.ContactCenterInsightsClient', () => { } ); }); - const operation = (await promise) as LROperation< - protos.google.cloud.contactcenterinsights.v1.IIssueModel, - protos.google.cloud.contactcenterinsights.v1.ICreateIssueModelMetadata - >; - const [response] = await operation.promise(); + const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createIssueModel as SinonStub + client.innerApiCalls.createQaScorecard as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createIssueModel as SinonStub + client.innerApiCalls.createQaScorecard as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createIssueModel with call error', async () => { + it('invokes createQaScorecard with error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -5177,31 +5043,31 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest() + new protos.google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest', + '.google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.createIssueModel = stubLongRunningCall( + client.innerApiCalls.createQaScorecard = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.createIssueModel(request), expectedError); + await assert.rejects(client.createQaScorecard(request), expectedError); const actualRequest = ( - client.innerApiCalls.createIssueModel as SinonStub + client.innerApiCalls.createQaScorecard as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createIssueModel as SinonStub + client.innerApiCalls.createQaScorecard as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createIssueModel with LRO error', async () => { + it('invokes createQaScorecard with closed client', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -5209,112 +5075,53 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest() + new protos.google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest', + '.google.cloud.contactcenterinsights.v1.CreateQaScorecardRequest', ['parent'] ); request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createIssueModel = stubLongRunningCall( - undefined, - undefined, - expectedError - ); - const [operation] = await client.createIssueModel(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = ( - client.innerApiCalls.createIssueModel as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createIssueModel as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateIssueModelProgress without error', async () => { - const client = - new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkCreateIssueModelProgress( - expectedResponse.name - ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateIssueModelProgress with error', async () => { - const client = - new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.checkCreateIssueModelProgress(''), - expectedError - ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - }); - - describe('deleteIssueModel', () => { - it('invokes deleteIssueModel without error', async () => { - const client = - new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest() + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createQaScorecard(request), expectedError); + }); + }); + + describe('getQaScorecard', () => { + it('invokes getQaScorecard without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetQaScorecardRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest', + '.google.cloud.contactcenterinsights.v1.GetQaScorecardRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.contactcenterinsights.v1.QaScorecard() ); - client.innerApiCalls.deleteIssueModel = - stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteIssueModel(request); - const [response] = await operation.promise(); + client.innerApiCalls.getQaScorecard = stubSimpleCall(expectedResponse); + const [response] = await client.getQaScorecard(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.deleteIssueModel as SinonStub + client.innerApiCalls.getQaScorecard as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteIssueModel as SinonStub + client.innerApiCalls.getQaScorecard as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteIssueModel without error using callback', async () => { + it('invokes getQaScorecard without error using callback', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -5322,28 +5129,25 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest() + new protos.google.cloud.contactcenterinsights.v1.GetQaScorecardRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest', + '.google.cloud.contactcenterinsights.v1.GetQaScorecardRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.contactcenterinsights.v1.QaScorecard() ); - client.innerApiCalls.deleteIssueModel = - stubLongRunningCallWithCallback(expectedResponse); + client.innerApiCalls.getQaScorecard = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.deleteIssueModel( + client.getQaScorecard( request, ( err?: Error | null, - result?: LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.contactcenterinsights.v1.IDeleteIssueModelMetadata - > | null + result?: protos.google.cloud.contactcenterinsights.v1.IQaScorecard | null ) => { if (err) { reject(err); @@ -5353,23 +5157,19 @@ describe('v1.ContactCenterInsightsClient', () => { } ); }); - const operation = (await promise) as LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.contactcenterinsights.v1.IDeleteIssueModelMetadata - >; - const [response] = await operation.promise(); + const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.deleteIssueModel as SinonStub + client.innerApiCalls.getQaScorecard as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteIssueModel as SinonStub + client.innerApiCalls.getQaScorecard as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteIssueModel with call error', async () => { + it('invokes getQaScorecard with error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -5377,31 +5177,31 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest() + new protos.google.cloud.contactcenterinsights.v1.GetQaScorecardRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest', + '.google.cloud.contactcenterinsights.v1.GetQaScorecardRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.deleteIssueModel = stubLongRunningCall( + client.innerApiCalls.getQaScorecard = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.deleteIssueModel(request), expectedError); + await assert.rejects(client.getQaScorecard(request), expectedError); const actualRequest = ( - client.innerApiCalls.deleteIssueModel as SinonStub + client.innerApiCalls.getQaScorecard as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteIssueModel as SinonStub + client.innerApiCalls.getQaScorecard as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteIssueModel with LRO error', async () => { + it('invokes getQaScorecard with closed client', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -5409,78 +5209,159 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest() + new protos.google.cloud.contactcenterinsights.v1.GetQaScorecardRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest', + '.google.cloud.contactcenterinsights.v1.GetQaScorecardRequest', ['name'] ); request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteIssueModel = stubLongRunningCall( - undefined, - undefined, - expectedError + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getQaScorecard(request), expectedError); + }); + }); + + describe('updateQaScorecard', () => { + it('invokes updateQaScorecard without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest() ); - const [operation] = await client.deleteIssueModel(request); - await assert.rejects(operation.promise(), expectedError); + request.qaScorecard ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest', + ['qaScorecard', 'name'] + ); + request.qaScorecard.name = defaultValue1; + const expectedHeaderRequestParams = `qa_scorecard.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.QaScorecard() + ); + client.innerApiCalls.updateQaScorecard = stubSimpleCall(expectedResponse); + const [response] = await client.updateQaScorecard(request); + assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.deleteIssueModel as SinonStub + client.innerApiCalls.updateQaScorecard as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteIssueModel as SinonStub + client.innerApiCalls.updateQaScorecard as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkDeleteIssueModelProgress without error', async () => { + it('invokes updateQaScorecard without error using callback', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest() ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkDeleteIssueModelProgress( - expectedResponse.name + request.qaScorecard ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest', + ['qaScorecard', 'name'] ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + request.qaScorecard.name = defaultValue1; + const expectedHeaderRequestParams = `qa_scorecard.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.QaScorecard() + ); + client.innerApiCalls.updateQaScorecard = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateQaScorecard( + request, + ( + err?: Error | null, + result?: protos.google.cloud.contactcenterinsights.v1.IQaScorecard | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateQaScorecard as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateQaScorecard as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkDeleteIssueModelProgress with error', async () => { + it('invokes updateQaScorecard with error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest() + ); + request.qaScorecard ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest', + ['qaScorecard', 'name'] + ); + request.qaScorecard.name = defaultValue1; + const expectedHeaderRequestParams = `qa_scorecard.name=${defaultValue1}`; const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( + client.innerApiCalls.updateQaScorecard = stubSimpleCall( undefined, expectedError ); - await assert.rejects( - client.checkDeleteIssueModelProgress(''), - expectedError + await assert.rejects(client.updateQaScorecard(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateQaScorecard as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateQaScorecard as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateQaScorecard with closed client', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest() ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + request.qaScorecard ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UpdateQaScorecardRequest', + ['qaScorecard', 'name'] + ); + request.qaScorecard.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateQaScorecard(request), expectedError); }); }); - describe('deployIssueModel', () => { - it('invokes deployIssueModel without error', async () => { + describe('deleteQaScorecard', () => { + it('invokes deleteQaScorecard without error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -5488,33 +5369,31 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest() + new protos.google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest', + '.google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.protobuf.Empty() ); - client.innerApiCalls.deployIssueModel = - stubLongRunningCall(expectedResponse); - const [operation] = await client.deployIssueModel(request); - const [response] = await operation.promise(); + client.innerApiCalls.deleteQaScorecard = stubSimpleCall(expectedResponse); + const [response] = await client.deleteQaScorecard(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.deployIssueModel as SinonStub + client.innerApiCalls.deleteQaScorecard as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deployIssueModel as SinonStub + client.innerApiCalls.deleteQaScorecard as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deployIssueModel without error using callback', async () => { + it('invokes deleteQaScorecard without error using callback', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -5522,28 +5401,25 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest() + new protos.google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest', + '.google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.protobuf.Empty() ); - client.innerApiCalls.deployIssueModel = - stubLongRunningCallWithCallback(expectedResponse); + client.innerApiCalls.deleteQaScorecard = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.deployIssueModel( + client.deleteQaScorecard( request, ( err?: Error | null, - result?: LROperation< - protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelMetadata - > | null + result?: protos.google.protobuf.IEmpty | null ) => { if (err) { reject(err); @@ -5553,23 +5429,19 @@ describe('v1.ContactCenterInsightsClient', () => { } ); }); - const operation = (await promise) as LROperation< - protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelMetadata - >; - const [response] = await operation.promise(); + const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.deployIssueModel as SinonStub + client.innerApiCalls.deleteQaScorecard as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deployIssueModel as SinonStub + client.innerApiCalls.deleteQaScorecard as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deployIssueModel with call error', async () => { + it('invokes deleteQaScorecard with error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -5577,31 +5449,31 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest() + new protos.google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest', + '.google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.deployIssueModel = stubLongRunningCall( + client.innerApiCalls.deleteQaScorecard = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.deployIssueModel(request), expectedError); + await assert.rejects(client.deleteQaScorecard(request), expectedError); const actualRequest = ( - client.innerApiCalls.deployIssueModel as SinonStub + client.innerApiCalls.deleteQaScorecard as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deployIssueModel as SinonStub + client.innerApiCalls.deleteQaScorecard as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deployIssueModel with LRO error', async () => { + it('invokes deleteQaScorecard with closed client', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -5609,78 +5481,162 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest() + new protos.google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest', + '.google.cloud.contactcenterinsights.v1.DeleteQaScorecardRequest', ['name'] ); request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deployIssueModel = stubLongRunningCall( - undefined, - undefined, - expectedError - ); - const [operation] = await client.deployIssueModel(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = ( - client.innerApiCalls.deployIssueModel as SinonStub + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteQaScorecard(request), expectedError); + }); + }); + + describe('createQaScorecardRevision', () => { + it('invokes createQaScorecardRevision without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.QaScorecardRevision() + ); + client.innerApiCalls.createQaScorecardRevision = + stubSimpleCall(expectedResponse); + const [response] = await client.createQaScorecardRevision(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createQaScorecardRevision as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deployIssueModel as SinonStub + client.innerApiCalls.createQaScorecardRevision as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkDeployIssueModelProgress without error', async () => { + it('invokes createQaScorecardRevision without error using callback', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest() ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkDeployIssueModelProgress( - expectedResponse.name + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest', + ['parent'] ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.QaScorecardRevision() + ); + client.innerApiCalls.createQaScorecardRevision = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createQaScorecardRevision( + request, + ( + err?: Error | null, + result?: protos.google.cloud.contactcenterinsights.v1.IQaScorecardRevision | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createQaScorecardRevision as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createQaScorecardRevision as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkDeployIssueModelProgress with error', async () => { + it('invokes createQaScorecardRevision with error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( + client.innerApiCalls.createQaScorecardRevision = stubSimpleCall( undefined, expectedError ); await assert.rejects( - client.checkDeployIssueModelProgress(''), + client.createQaScorecardRevision(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.createQaScorecardRevision as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createQaScorecardRevision as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createQaScorecardRevision with closed client', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreateQaScorecardRevisionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.createQaScorecardRevision(request), expectedError ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('undeployIssueModel', () => { - it('invokes undeployIssueModel without error', async () => { + describe('getQaScorecardRevision', () => { + it('invokes getQaScorecardRevision without error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -5688,33 +5644,32 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest() + new protos.google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest', + '.google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.contactcenterinsights.v1.QaScorecardRevision() ); - client.innerApiCalls.undeployIssueModel = - stubLongRunningCall(expectedResponse); - const [operation] = await client.undeployIssueModel(request); - const [response] = await operation.promise(); + client.innerApiCalls.getQaScorecardRevision = + stubSimpleCall(expectedResponse); + const [response] = await client.getQaScorecardRevision(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.undeployIssueModel as SinonStub + client.innerApiCalls.getQaScorecardRevision as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.undeployIssueModel as SinonStub + client.innerApiCalls.getQaScorecardRevision as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes undeployIssueModel without error using callback', async () => { + it('invokes getQaScorecardRevision without error using callback', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -5722,28 +5677,25 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest() + new protos.google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest', + '.google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.contactcenterinsights.v1.QaScorecardRevision() ); - client.innerApiCalls.undeployIssueModel = - stubLongRunningCallWithCallback(expectedResponse); + client.innerApiCalls.getQaScorecardRevision = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.undeployIssueModel( + client.getQaScorecardRevision( request, ( err?: Error | null, - result?: LROperation< - protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelMetadata - > | null + result?: protos.google.cloud.contactcenterinsights.v1.IQaScorecardRevision | null ) => { if (err) { reject(err); @@ -5753,23 +5705,19 @@ describe('v1.ContactCenterInsightsClient', () => { } ); }); - const operation = (await promise) as LROperation< - protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelMetadata - >; - const [response] = await operation.promise(); + const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.undeployIssueModel as SinonStub + client.innerApiCalls.getQaScorecardRevision as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.undeployIssueModel as SinonStub + client.innerApiCalls.getQaScorecardRevision as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes undeployIssueModel with call error', async () => { + it('invokes getQaScorecardRevision with error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -5777,31 +5725,34 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest() + new protos.google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest', + '.google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.undeployIssueModel = stubLongRunningCall( + client.innerApiCalls.getQaScorecardRevision = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.undeployIssueModel(request), expectedError); + await assert.rejects( + client.getQaScorecardRevision(request), + expectedError + ); const actualRequest = ( - client.innerApiCalls.undeployIssueModel as SinonStub + client.innerApiCalls.getQaScorecardRevision as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.undeployIssueModel as SinonStub + client.innerApiCalls.getQaScorecardRevision as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes undeployIssueModel with LRO error', async () => { + it('invokes getQaScorecardRevision with closed client', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -5809,78 +5760,24 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest() + new protos.google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest', + '.google.cloud.contactcenterinsights.v1.GetQaScorecardRevisionRequest', ['name'] ); request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.undeployIssueModel = stubLongRunningCall( - undefined, - undefined, - expectedError - ); - const [operation] = await client.undeployIssueModel(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = ( - client.innerApiCalls.undeployIssueModel as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.undeployIssueModel as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUndeployIssueModelProgress without error', async () => { - const client = - new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkUndeployIssueModelProgress( - expectedResponse.name - ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUndeployIssueModelProgress with error', async () => { - const client = - new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( - undefined, - expectedError - ); + const expectedError = new Error('The client has already been closed.'); + client.close(); await assert.rejects( - client.checkUndeployIssueModelProgress(''), + client.getQaScorecardRevision(request), expectedError ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('exportIssueModel', () => { - it('invokes exportIssueModel without error', async () => { + describe('deployQaScorecardRevision', () => { + it('invokes deployQaScorecardRevision without error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -5888,33 +5785,32 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest() + new protos.google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest', + '.google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.contactcenterinsights.v1.QaScorecardRevision() ); - client.innerApiCalls.exportIssueModel = - stubLongRunningCall(expectedResponse); - const [operation] = await client.exportIssueModel(request); - const [response] = await operation.promise(); + client.innerApiCalls.deployQaScorecardRevision = + stubSimpleCall(expectedResponse); + const [response] = await client.deployQaScorecardRevision(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.exportIssueModel as SinonStub + client.innerApiCalls.deployQaScorecardRevision as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.exportIssueModel as SinonStub + client.innerApiCalls.deployQaScorecardRevision as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes exportIssueModel without error using callback', async () => { + it('invokes deployQaScorecardRevision without error using callback', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -5922,28 +5818,25 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest() + new protos.google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest', + '.google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.contactcenterinsights.v1.QaScorecardRevision() ); - client.innerApiCalls.exportIssueModel = - stubLongRunningCallWithCallback(expectedResponse); + client.innerApiCalls.deployQaScorecardRevision = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.exportIssueModel( + client.deployQaScorecardRevision( request, ( err?: Error | null, - result?: LROperation< - protos.google.cloud.contactcenterinsights.v1.IExportIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.IExportIssueModelMetadata - > | null + result?: protos.google.cloud.contactcenterinsights.v1.IQaScorecardRevision | null ) => { if (err) { reject(err); @@ -5953,23 +5846,19 @@ describe('v1.ContactCenterInsightsClient', () => { } ); }); - const operation = (await promise) as LROperation< - protos.google.cloud.contactcenterinsights.v1.IExportIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.IExportIssueModelMetadata - >; - const [response] = await operation.promise(); + const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.exportIssueModel as SinonStub + client.innerApiCalls.deployQaScorecardRevision as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.exportIssueModel as SinonStub + client.innerApiCalls.deployQaScorecardRevision as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes exportIssueModel with call error', async () => { + it('invokes deployQaScorecardRevision with error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -5977,31 +5866,34 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest() + new protos.google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest', + '.google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.exportIssueModel = stubLongRunningCall( + client.innerApiCalls.deployQaScorecardRevision = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.exportIssueModel(request), expectedError); + await assert.rejects( + client.deployQaScorecardRevision(request), + expectedError + ); const actualRequest = ( - client.innerApiCalls.exportIssueModel as SinonStub + client.innerApiCalls.deployQaScorecardRevision as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.exportIssueModel as SinonStub + client.innerApiCalls.deployQaScorecardRevision as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes exportIssueModel with LRO error', async () => { + it('invokes deployQaScorecardRevision with closed client', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -6009,78 +5901,24 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest() + new protos.google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest', + '.google.cloud.contactcenterinsights.v1.DeployQaScorecardRevisionRequest', ['name'] ); request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.exportIssueModel = stubLongRunningCall( - undefined, - undefined, - expectedError - ); - const [operation] = await client.exportIssueModel(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = ( - client.innerApiCalls.exportIssueModel as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.exportIssueModel as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkExportIssueModelProgress without error', async () => { - const client = - new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkExportIssueModelProgress( - expectedResponse.name - ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkExportIssueModelProgress with error', async () => { - const client = - new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( - undefined, - expectedError - ); + const expectedError = new Error('The client has already been closed.'); + client.close(); await assert.rejects( - client.checkExportIssueModelProgress(''), + client.deployQaScorecardRevision(request), expectedError ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('importIssueModel', () => { - it('invokes importIssueModel without error', async () => { + describe('undeployQaScorecardRevision', () => { + it('invokes undeployQaScorecardRevision without error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -6088,33 +5926,32 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest() + new protos.google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest', - ['parent'] + '.google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.contactcenterinsights.v1.QaScorecardRevision() ); - client.innerApiCalls.importIssueModel = - stubLongRunningCall(expectedResponse); - const [operation] = await client.importIssueModel(request); - const [response] = await operation.promise(); + client.innerApiCalls.undeployQaScorecardRevision = + stubSimpleCall(expectedResponse); + const [response] = await client.undeployQaScorecardRevision(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.importIssueModel as SinonStub + client.innerApiCalls.undeployQaScorecardRevision as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.importIssueModel as SinonStub + client.innerApiCalls.undeployQaScorecardRevision as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes importIssueModel without error using callback', async () => { + it('invokes undeployQaScorecardRevision without error using callback', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -6122,28 +5959,25 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest() + new protos.google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest', - ['parent'] + '.google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.contactcenterinsights.v1.QaScorecardRevision() ); - client.innerApiCalls.importIssueModel = - stubLongRunningCallWithCallback(expectedResponse); + client.innerApiCalls.undeployQaScorecardRevision = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.importIssueModel( + client.undeployQaScorecardRevision( request, ( err?: Error | null, - result?: LROperation< - protos.google.cloud.contactcenterinsights.v1.IImportIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.IImportIssueModelMetadata - > | null + result?: protos.google.cloud.contactcenterinsights.v1.IQaScorecardRevision | null ) => { if (err) { reject(err); @@ -6153,23 +5987,19 @@ describe('v1.ContactCenterInsightsClient', () => { } ); }); - const operation = (await promise) as LROperation< - protos.google.cloud.contactcenterinsights.v1.IImportIssueModelResponse, - protos.google.cloud.contactcenterinsights.v1.IImportIssueModelMetadata - >; - const [response] = await operation.promise(); + const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.importIssueModel as SinonStub + client.innerApiCalls.undeployQaScorecardRevision as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.importIssueModel as SinonStub + client.innerApiCalls.undeployQaScorecardRevision as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes importIssueModel with call error', async () => { + it('invokes undeployQaScorecardRevision with error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -6177,110 +6007,59 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest() + new protos.google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest', - ['parent'] + '.google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.importIssueModel = stubLongRunningCall( + client.innerApiCalls.undeployQaScorecardRevision = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.importIssueModel(request), expectedError); - const actualRequest = ( - client.innerApiCalls.importIssueModel as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.importIssueModel as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes importIssueModel with LRO error', async () => { - const client = - new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.importIssueModel = stubLongRunningCall( - undefined, - undefined, + await assert.rejects( + client.undeployQaScorecardRevision(request), expectedError ); - const [operation] = await client.importIssueModel(request); - await assert.rejects(operation.promise(), expectedError); const actualRequest = ( - client.innerApiCalls.importIssueModel as SinonStub + client.innerApiCalls.undeployQaScorecardRevision as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.importIssueModel as SinonStub + client.innerApiCalls.undeployQaScorecardRevision as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkImportIssueModelProgress without error', async () => { + it('invokes undeployQaScorecardRevision with closed client', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkImportIssueModelProgress( - expectedResponse.name + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest() ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkImportIssueModelProgress with error', async () => { - const client = - new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( - undefined, - expectedError + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UndeployQaScorecardRevisionRequest', + ['name'] ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); await assert.rejects( - client.checkImportIssueModelProgress(''), + client.undeployQaScorecardRevision(request), expectedError ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('initializeEncryptionSpec', () => { - it('invokes initializeEncryptionSpec without error', async () => { + describe('deleteQaScorecardRevision', () => { + it('invokes deleteQaScorecardRevision without error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -6288,34 +6067,32 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest() + new protos.google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest() ); - request.encryptionSpec ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest', - ['encryptionSpec', 'name'] + '.google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest', + ['name'] ); - request.encryptionSpec.name = defaultValue1; - const expectedHeaderRequestParams = `encryption_spec.name=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.protobuf.Empty() ); - client.innerApiCalls.initializeEncryptionSpec = - stubLongRunningCall(expectedResponse); - const [operation] = await client.initializeEncryptionSpec(request); - const [response] = await operation.promise(); + client.innerApiCalls.deleteQaScorecardRevision = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteQaScorecardRevision(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.initializeEncryptionSpec as SinonStub + client.innerApiCalls.deleteQaScorecardRevision as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.initializeEncryptionSpec as SinonStub + client.innerApiCalls.deleteQaScorecardRevision as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes initializeEncryptionSpec without error using callback', async () => { + it('invokes deleteQaScorecardRevision without error using callback', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -6323,29 +6100,25 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest() + new protos.google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest() ); - request.encryptionSpec ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest', - ['encryptionSpec', 'name'] + '.google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest', + ['name'] ); - request.encryptionSpec.name = defaultValue1; - const expectedHeaderRequestParams = `encryption_spec.name=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.protobuf.Empty() ); - client.innerApiCalls.initializeEncryptionSpec = - stubLongRunningCallWithCallback(expectedResponse); + client.innerApiCalls.deleteQaScorecardRevision = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.initializeEncryptionSpec( + client.deleteQaScorecardRevision( request, ( err?: Error | null, - result?: LROperation< - protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse, - protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata - > | null + result?: protos.google.protobuf.IEmpty | null ) => { if (err) { reject(err); @@ -6355,23 +6128,19 @@ describe('v1.ContactCenterInsightsClient', () => { } ); }); - const operation = (await promise) as LROperation< - protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse, - protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata - >; - const [response] = await operation.promise(); + const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.initializeEncryptionSpec as SinonStub + client.innerApiCalls.deleteQaScorecardRevision as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.initializeEncryptionSpec as SinonStub + client.innerApiCalls.deleteQaScorecardRevision as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes initializeEncryptionSpec with call error', async () => { + it('invokes deleteQaScorecardRevision with error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -6379,35 +6148,34 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest() + new protos.google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest() ); - request.encryptionSpec ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest', - ['encryptionSpec', 'name'] + '.google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest', + ['name'] ); - request.encryptionSpec.name = defaultValue1; - const expectedHeaderRequestParams = `encryption_spec.name=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.initializeEncryptionSpec = stubLongRunningCall( + client.innerApiCalls.deleteQaScorecardRevision = stubSimpleCall( undefined, expectedError ); await assert.rejects( - client.initializeEncryptionSpec(request), + client.deleteQaScorecardRevision(request), expectedError ); const actualRequest = ( - client.innerApiCalls.initializeEncryptionSpec as SinonStub + client.innerApiCalls.deleteQaScorecardRevision as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.initializeEncryptionSpec as SinonStub + client.innerApiCalls.deleteQaScorecardRevision as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes initializeEncryptionSpec with LRO error', async () => { + it('invokes deleteQaScorecardRevision with closed client', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -6415,80 +6183,6377 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest() + new protos.google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest() ); - request.encryptionSpec ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest', - ['encryptionSpec', 'name'] + '.google.cloud.contactcenterinsights.v1.DeleteQaScorecardRevisionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.deleteQaScorecardRevision(request), + expectedError + ); + }); + }); + + describe('createFeedbackLabel', () => { + it('invokes createFeedbackLabel without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.FeedbackLabel() + ); + client.innerApiCalls.createFeedbackLabel = + stubSimpleCall(expectedResponse); + const [response] = await client.createFeedbackLabel(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createFeedbackLabel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createFeedbackLabel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createFeedbackLabel without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.FeedbackLabel() + ); + client.innerApiCalls.createFeedbackLabel = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createFeedbackLabel( + request, + ( + err?: Error | null, + result?: protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createFeedbackLabel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createFeedbackLabel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createFeedbackLabel with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createFeedbackLabel = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createFeedbackLabel(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createFeedbackLabel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createFeedbackLabel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createFeedbackLabel with closed client', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreateFeedbackLabelRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createFeedbackLabel(request), expectedError); + }); + }); + + describe('getFeedbackLabel', () => { + it('invokes getFeedbackLabel without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.FeedbackLabel() + ); + client.innerApiCalls.getFeedbackLabel = stubSimpleCall(expectedResponse); + const [response] = await client.getFeedbackLabel(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getFeedbackLabel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getFeedbackLabel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getFeedbackLabel without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.FeedbackLabel() + ); + client.innerApiCalls.getFeedbackLabel = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getFeedbackLabel( + request, + ( + err?: Error | null, + result?: protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getFeedbackLabel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getFeedbackLabel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getFeedbackLabel with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getFeedbackLabel = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getFeedbackLabel(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getFeedbackLabel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getFeedbackLabel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getFeedbackLabel with closed client', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.GetFeedbackLabelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getFeedbackLabel(request), expectedError); + }); + }); + + describe('updateFeedbackLabel', () => { + it('invokes updateFeedbackLabel without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest() + ); + request.feedbackLabel ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest', + ['feedbackLabel', 'name'] + ); + request.feedbackLabel.name = defaultValue1; + const expectedHeaderRequestParams = `feedback_label.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.FeedbackLabel() + ); + client.innerApiCalls.updateFeedbackLabel = + stubSimpleCall(expectedResponse); + const [response] = await client.updateFeedbackLabel(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateFeedbackLabel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateFeedbackLabel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateFeedbackLabel without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest() + ); + request.feedbackLabel ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest', + ['feedbackLabel', 'name'] + ); + request.feedbackLabel.name = defaultValue1; + const expectedHeaderRequestParams = `feedback_label.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.FeedbackLabel() + ); + client.innerApiCalls.updateFeedbackLabel = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateFeedbackLabel( + request, + ( + err?: Error | null, + result?: protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateFeedbackLabel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateFeedbackLabel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateFeedbackLabel with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest() + ); + request.feedbackLabel ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest', + ['feedbackLabel', 'name'] + ); + request.feedbackLabel.name = defaultValue1; + const expectedHeaderRequestParams = `feedback_label.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateFeedbackLabel = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateFeedbackLabel(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateFeedbackLabel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateFeedbackLabel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateFeedbackLabel with closed client', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest() + ); + request.feedbackLabel ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UpdateFeedbackLabelRequest', + ['feedbackLabel', 'name'] + ); + request.feedbackLabel.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateFeedbackLabel(request), expectedError); + }); + }); + + describe('deleteFeedbackLabel', () => { + it('invokes deleteFeedbackLabel without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteFeedbackLabel = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteFeedbackLabel(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteFeedbackLabel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteFeedbackLabel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFeedbackLabel without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteFeedbackLabel = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteFeedbackLabel( + 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.deleteFeedbackLabel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteFeedbackLabel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFeedbackLabel with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteFeedbackLabel = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteFeedbackLabel(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteFeedbackLabel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteFeedbackLabel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFeedbackLabel with closed client', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeleteFeedbackLabelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteFeedbackLabel(request), expectedError); + }); + }); + + describe('uploadConversation', () => { + it('invokes uploadConversation without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UploadConversationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UploadConversationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.uploadConversation = + stubLongRunningCall(expectedResponse); + const [operation] = await client.uploadConversation(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.uploadConversation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.uploadConversation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes uploadConversation without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UploadConversationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UploadConversationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.uploadConversation = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.uploadConversation( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.contactcenterinsights.v1.IConversation, + protos.google.cloud.contactcenterinsights.v1.IUploadConversationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.contactcenterinsights.v1.IConversation, + protos.google.cloud.contactcenterinsights.v1.IUploadConversationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.uploadConversation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.uploadConversation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes uploadConversation with call error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UploadConversationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UploadConversationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.uploadConversation = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.uploadConversation(request), expectedError); + const actualRequest = ( + client.innerApiCalls.uploadConversation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.uploadConversation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes uploadConversation with LRO error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UploadConversationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UploadConversationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.uploadConversation = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.uploadConversation(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.uploadConversation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.uploadConversation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUploadConversationProgress without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUploadConversationProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUploadConversationProgress with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkUploadConversationProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createAnalysis', () => { + it('invokes createAnalysis without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAnalysis = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createAnalysis(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createAnalysis as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAnalysis as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAnalysis without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createAnalysis = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createAnalysis( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.contactcenterinsights.v1.IAnalysis, + protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.contactcenterinsights.v1.IAnalysis, + protos.google.cloud.contactcenterinsights.v1.ICreateAnalysisOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createAnalysis as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAnalysis as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAnalysis with call error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAnalysis = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createAnalysis(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createAnalysis as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAnalysis as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAnalysis with LRO error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAnalysis = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createAnalysis(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createAnalysis as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAnalysis as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateAnalysisProgress without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateAnalysisProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateAnalysisProgress with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkCreateAnalysisProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('bulkAnalyzeConversations', () => { + it('invokes bulkAnalyzeConversations without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.bulkAnalyzeConversations = + stubLongRunningCall(expectedResponse); + const [operation] = await client.bulkAnalyzeConversations(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.bulkAnalyzeConversations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.bulkAnalyzeConversations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes bulkAnalyzeConversations without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.bulkAnalyzeConversations = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.bulkAnalyzeConversations( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.bulkAnalyzeConversations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.bulkAnalyzeConversations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes bulkAnalyzeConversations with call error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.bulkAnalyzeConversations = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.bulkAnalyzeConversations(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.bulkAnalyzeConversations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.bulkAnalyzeConversations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes bulkAnalyzeConversations with LRO error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.bulkAnalyzeConversations = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.bulkAnalyzeConversations(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.bulkAnalyzeConversations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.bulkAnalyzeConversations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkBulkAnalyzeConversationsProgress without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = + await client.checkBulkAnalyzeConversationsProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkBulkAnalyzeConversationsProgress with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkBulkAnalyzeConversationsProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('bulkDeleteConversations', () => { + it('invokes bulkDeleteConversations without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.BulkDeleteConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.BulkDeleteConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.bulkDeleteConversations = + stubLongRunningCall(expectedResponse); + const [operation] = await client.bulkDeleteConversations(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.bulkDeleteConversations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.bulkDeleteConversations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes bulkDeleteConversations without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.BulkDeleteConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.BulkDeleteConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.bulkDeleteConversations = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.bulkDeleteConversations( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkDeleteConversationsMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.bulkDeleteConversations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.bulkDeleteConversations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes bulkDeleteConversations with call error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.BulkDeleteConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.BulkDeleteConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.bulkDeleteConversations = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.bulkDeleteConversations(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.bulkDeleteConversations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.bulkDeleteConversations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes bulkDeleteConversations with LRO error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.BulkDeleteConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.BulkDeleteConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.bulkDeleteConversations = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.bulkDeleteConversations(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.bulkDeleteConversations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.bulkDeleteConversations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkBulkDeleteConversationsProgress without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = + await client.checkBulkDeleteConversationsProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkBulkDeleteConversationsProgress with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkBulkDeleteConversationsProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('ingestConversations', () => { + it('invokes ingestConversations without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.IngestConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.IngestConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.ingestConversations = + stubLongRunningCall(expectedResponse); + const [operation] = await client.ingestConversations(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.ingestConversations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.ingestConversations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes ingestConversations without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.IngestConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.IngestConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.ingestConversations = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.ingestConversations( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.contactcenterinsights.v1.IIngestConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IIngestConversationsMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.contactcenterinsights.v1.IIngestConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IIngestConversationsMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.ingestConversations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.ingestConversations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes ingestConversations with call error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.IngestConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.IngestConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.ingestConversations = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.ingestConversations(request), expectedError); + const actualRequest = ( + client.innerApiCalls.ingestConversations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.ingestConversations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes ingestConversations with LRO error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.IngestConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.IngestConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.ingestConversations = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.ingestConversations(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.ingestConversations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.ingestConversations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkIngestConversationsProgress without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkIngestConversationsProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkIngestConversationsProgress with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkIngestConversationsProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('exportInsightsData', () => { + it('invokes exportInsightsData without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.exportInsightsData = + stubLongRunningCall(expectedResponse); + const [operation] = await client.exportInsightsData(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.exportInsightsData as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.exportInsightsData as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes exportInsightsData without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.exportInsightsData = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.exportInsightsData( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataResponse, + protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataResponse, + protos.google.cloud.contactcenterinsights.v1.IExportInsightsDataMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.exportInsightsData as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.exportInsightsData as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes exportInsightsData with call error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.exportInsightsData = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.exportInsightsData(request), expectedError); + const actualRequest = ( + client.innerApiCalls.exportInsightsData as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.exportInsightsData as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes exportInsightsData with LRO error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.exportInsightsData = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.exportInsightsData(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.exportInsightsData as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.exportInsightsData as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkExportInsightsDataProgress without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkExportInsightsDataProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkExportInsightsDataProgress with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkExportInsightsDataProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createIssueModel', () => { + it('invokes createIssueModel without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createIssueModel = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createIssueModel(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createIssueModel without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createIssueModel = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createIssueModel( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.contactcenterinsights.v1.IIssueModel, + protos.google.cloud.contactcenterinsights.v1.ICreateIssueModelMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.contactcenterinsights.v1.IIssueModel, + protos.google.cloud.contactcenterinsights.v1.ICreateIssueModelMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createIssueModel with call error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createIssueModel = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createIssueModel(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createIssueModel with LRO error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createIssueModel = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createIssueModel(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateIssueModelProgress without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateIssueModelProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateIssueModelProgress with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkCreateIssueModelProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteIssueModel', () => { + it('invokes deleteIssueModel without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteIssueModel = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteIssueModel(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteIssueModel without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteIssueModel = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteIssueModel( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.contactcenterinsights.v1.IDeleteIssueModelMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.contactcenterinsights.v1.IDeleteIssueModelMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteIssueModel with call error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteIssueModel = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteIssueModel(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteIssueModel with LRO error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteIssueModel = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteIssueModel(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteIssueModelProgress without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteIssueModelProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteIssueModelProgress with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkDeleteIssueModelProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deployIssueModel', () => { + it('invokes deployIssueModel without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deployIssueModel = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deployIssueModel(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deployIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deployIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deployIssueModel without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deployIssueModel = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deployIssueModel( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IDeployIssueModelMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deployIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deployIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deployIssueModel with call error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deployIssueModel = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deployIssueModel(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deployIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deployIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deployIssueModel with LRO error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deployIssueModel = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deployIssueModel(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deployIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deployIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeployIssueModelProgress without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeployIssueModelProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeployIssueModelProgress with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkDeployIssueModelProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('undeployIssueModel', () => { + it('invokes undeployIssueModel without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.undeployIssueModel = + stubLongRunningCall(expectedResponse); + const [operation] = await client.undeployIssueModel(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.undeployIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.undeployIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes undeployIssueModel without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.undeployIssueModel = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.undeployIssueModel( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IUndeployIssueModelMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.undeployIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.undeployIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes undeployIssueModel with call error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.undeployIssueModel = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.undeployIssueModel(request), expectedError); + const actualRequest = ( + client.innerApiCalls.undeployIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.undeployIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes undeployIssueModel with LRO error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.undeployIssueModel = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.undeployIssueModel(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.undeployIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.undeployIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUndeployIssueModelProgress without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUndeployIssueModelProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUndeployIssueModelProgress with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkUndeployIssueModelProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('exportIssueModel', () => { + it('invokes exportIssueModel without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.exportIssueModel = + stubLongRunningCall(expectedResponse); + const [operation] = await client.exportIssueModel(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.exportIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.exportIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes exportIssueModel without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.exportIssueModel = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.exportIssueModel( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.contactcenterinsights.v1.IExportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IExportIssueModelMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.contactcenterinsights.v1.IExportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IExportIssueModelMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.exportIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.exportIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes exportIssueModel with call error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.exportIssueModel = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.exportIssueModel(request), expectedError); + const actualRequest = ( + client.innerApiCalls.exportIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.exportIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes exportIssueModel with LRO error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.exportIssueModel = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.exportIssueModel(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.exportIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.exportIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkExportIssueModelProgress without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkExportIssueModelProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkExportIssueModelProgress with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkExportIssueModelProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('importIssueModel', () => { + it('invokes importIssueModel without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.importIssueModel = + stubLongRunningCall(expectedResponse); + const [operation] = await client.importIssueModel(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.importIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.importIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importIssueModel without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.importIssueModel = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.importIssueModel( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.contactcenterinsights.v1.IImportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IImportIssueModelMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.contactcenterinsights.v1.IImportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IImportIssueModelMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.importIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.importIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importIssueModel with call error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.importIssueModel = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.importIssueModel(request), expectedError); + const actualRequest = ( + client.innerApiCalls.importIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.importIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importIssueModel with LRO error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.importIssueModel = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.importIssueModel(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.importIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.importIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkImportIssueModelProgress without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkImportIssueModelProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkImportIssueModelProgress with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkImportIssueModelProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('initializeEncryptionSpec', () => { + it('invokes initializeEncryptionSpec without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest() + ); + request.encryptionSpec ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest', + ['encryptionSpec', 'name'] + ); + request.encryptionSpec.name = defaultValue1; + const expectedHeaderRequestParams = `encryption_spec.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.initializeEncryptionSpec = + stubLongRunningCall(expectedResponse); + const [operation] = await client.initializeEncryptionSpec(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.initializeEncryptionSpec as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.initializeEncryptionSpec as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes initializeEncryptionSpec without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest() + ); + request.encryptionSpec ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest', + ['encryptionSpec', 'name'] + ); + request.encryptionSpec.name = defaultValue1; + const expectedHeaderRequestParams = `encryption_spec.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.initializeEncryptionSpec = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.initializeEncryptionSpec( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse, + protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse, + protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.initializeEncryptionSpec as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.initializeEncryptionSpec as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes initializeEncryptionSpec with call error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest() + ); + request.encryptionSpec ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest', + ['encryptionSpec', 'name'] + ); + request.encryptionSpec.name = defaultValue1; + const expectedHeaderRequestParams = `encryption_spec.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.initializeEncryptionSpec = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.initializeEncryptionSpec(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.initializeEncryptionSpec as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.initializeEncryptionSpec as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes initializeEncryptionSpec with LRO error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest() + ); + request.encryptionSpec ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest', + ['encryptionSpec', 'name'] + ); + request.encryptionSpec.name = defaultValue1; + const expectedHeaderRequestParams = `encryption_spec.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.initializeEncryptionSpec = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.initializeEncryptionSpec(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.initializeEncryptionSpec as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.initializeEncryptionSpec as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkInitializeEncryptionSpecProgress without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = + await client.checkInitializeEncryptionSpecProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkInitializeEncryptionSpecProgress with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkInitializeEncryptionSpecProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('queryMetrics', () => { + it('invokes queryMetrics without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.QueryMetricsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.QueryMetricsRequest', + ['location'] + ); + request.location = defaultValue1; + const expectedHeaderRequestParams = `location=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.queryMetrics = stubLongRunningCall(expectedResponse); + const [operation] = await client.queryMetrics(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.queryMetrics as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryMetrics as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryMetrics without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.QueryMetricsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.QueryMetricsRequest', + ['location'] + ); + request.location = defaultValue1; + const expectedHeaderRequestParams = `location=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.queryMetrics = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.queryMetrics( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.contactcenterinsights.v1.IQueryMetricsResponse, + protos.google.cloud.contactcenterinsights.v1.IQueryMetricsMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.contactcenterinsights.v1.IQueryMetricsResponse, + protos.google.cloud.contactcenterinsights.v1.IQueryMetricsMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.queryMetrics as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryMetrics as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryMetrics with call error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.QueryMetricsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.QueryMetricsRequest', + ['location'] + ); + request.location = defaultValue1; + const expectedHeaderRequestParams = `location=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.queryMetrics = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.queryMetrics(request), expectedError); + const actualRequest = ( + client.innerApiCalls.queryMetrics as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryMetrics as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryMetrics with LRO error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.QueryMetricsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.QueryMetricsRequest', + ['location'] + ); + request.location = defaultValue1; + const expectedHeaderRequestParams = `location=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.queryMetrics = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.queryMetrics(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.queryMetrics as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryMetrics as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkQueryMetricsProgress without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkQueryMetricsProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkQueryMetricsProgress with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkQueryMetricsProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('tuneQaScorecardRevision', () => { + it('invokes tuneQaScorecardRevision without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.tuneQaScorecardRevision = + stubLongRunningCall(expectedResponse); + const [operation] = await client.tuneQaScorecardRevision(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.tuneQaScorecardRevision as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.tuneQaScorecardRevision as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes tuneQaScorecardRevision without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.tuneQaScorecardRevision = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.tuneQaScorecardRevision( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionResponse, + protos.google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionResponse, + protos.google.cloud.contactcenterinsights.v1.ITuneQaScorecardRevisionMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.tuneQaScorecardRevision as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.tuneQaScorecardRevision as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes tuneQaScorecardRevision with call error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.tuneQaScorecardRevision = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.tuneQaScorecardRevision(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.tuneQaScorecardRevision as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.tuneQaScorecardRevision as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes tuneQaScorecardRevision with LRO error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.TuneQaScorecardRevisionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.tuneQaScorecardRevision = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.tuneQaScorecardRevision(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.tuneQaScorecardRevision as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.tuneQaScorecardRevision as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkTuneQaScorecardRevisionProgress without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = + await client.checkTuneQaScorecardRevisionProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkTuneQaScorecardRevisionProgress with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkTuneQaScorecardRevisionProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('bulkUploadFeedbackLabels', () => { + it('invokes bulkUploadFeedbackLabels without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.bulkUploadFeedbackLabels = + stubLongRunningCall(expectedResponse); + const [operation] = await client.bulkUploadFeedbackLabels(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.bulkUploadFeedbackLabels as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.bulkUploadFeedbackLabels as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes bulkUploadFeedbackLabels without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.bulkUploadFeedbackLabels = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.bulkUploadFeedbackLabels( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkUploadFeedbackLabelsMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.bulkUploadFeedbackLabels as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.bulkUploadFeedbackLabels as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes bulkUploadFeedbackLabels with call error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.bulkUploadFeedbackLabels = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.bulkUploadFeedbackLabels(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.bulkUploadFeedbackLabels as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.bulkUploadFeedbackLabels as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes bulkUploadFeedbackLabels with LRO error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.BulkUploadFeedbackLabelsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.bulkUploadFeedbackLabels = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.bulkUploadFeedbackLabels(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.bulkUploadFeedbackLabels as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.bulkUploadFeedbackLabels as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkBulkUploadFeedbackLabelsProgress without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = + await client.checkBulkUploadFeedbackLabelsProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkBulkUploadFeedbackLabelsProgress with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkBulkUploadFeedbackLabelsProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('bulkDownloadFeedbackLabels', () => { + it('invokes bulkDownloadFeedbackLabels without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.bulkDownloadFeedbackLabels = + stubLongRunningCall(expectedResponse); + const [operation] = await client.bulkDownloadFeedbackLabels(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.bulkDownloadFeedbackLabels as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.bulkDownloadFeedbackLabels as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes bulkDownloadFeedbackLabels without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.bulkDownloadFeedbackLabels = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.bulkDownloadFeedbackLabels( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkDownloadFeedbackLabelsMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.bulkDownloadFeedbackLabels as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.bulkDownloadFeedbackLabels as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes bulkDownloadFeedbackLabels with call error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.bulkDownloadFeedbackLabels = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.bulkDownloadFeedbackLabels(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.bulkDownloadFeedbackLabels as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.bulkDownloadFeedbackLabels as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes bulkDownloadFeedbackLabels with LRO error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.BulkDownloadFeedbackLabelsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.bulkDownloadFeedbackLabels = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.bulkDownloadFeedbackLabels(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.bulkDownloadFeedbackLabels as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.bulkDownloadFeedbackLabels as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkBulkDownloadFeedbackLabelsProgress without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = + await client.checkBulkDownloadFeedbackLabelsProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkBulkDownloadFeedbackLabelsProgress with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkBulkDownloadFeedbackLabelsProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listConversations', () => { + it('invokes listConversations without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ), + ]; + client.innerApiCalls.listConversations = stubSimpleCall(expectedResponse); + const [response] = await client.listConversations(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listConversations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listConversations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConversations without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ), + ]; + client.innerApiCalls.listConversations = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listConversations( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.contactcenterinsights.v1.IConversation[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listConversations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listConversations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConversations with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listConversations = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listConversations(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listConversations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listConversations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConversationsStream without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ), + ]; + client.descriptors.page.listConversations.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listConversationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.contactcenterinsights.v1.Conversation[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.contactcenterinsights.v1.Conversation + ) => { + 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.listConversations.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listConversations, request) + ); + assert( + (client.descriptors.page.listConversations.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('invokes listConversationsStream with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listConversations.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listConversationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.contactcenterinsights.v1.Conversation[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.contactcenterinsights.v1.Conversation + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listConversations.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listConversations, request) + ); + assert( + (client.descriptors.page.listConversations.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listConversations without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ), + ]; + client.descriptors.page.listConversations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.contactcenterinsights.v1.IConversation[] = + []; + const iterable = client.listConversationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listConversations.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listConversations.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listConversations with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listConversations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listConversationsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.contactcenterinsights.v1.IConversation[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listConversations.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listConversations.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + }); + + describe('listAnalyses', () => { + it('invokes listAnalyses without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListAnalysesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListAnalysesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Analysis() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Analysis() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Analysis() + ), + ]; + client.innerApiCalls.listAnalyses = stubSimpleCall(expectedResponse); + const [response] = await client.listAnalyses(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listAnalyses as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAnalyses as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAnalyses without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListAnalysesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListAnalysesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Analysis() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Analysis() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Analysis() + ), + ]; + client.innerApiCalls.listAnalyses = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAnalyses( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.contactcenterinsights.v1.IAnalysis[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listAnalyses as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAnalyses as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAnalyses with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListAnalysesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListAnalysesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listAnalyses = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listAnalyses(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listAnalyses as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAnalyses as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAnalysesStream without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListAnalysesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListAnalysesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Analysis() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Analysis() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Analysis() + ), + ]; + client.descriptors.page.listAnalyses.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listAnalysesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.contactcenterinsights.v1.Analysis[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.contactcenterinsights.v1.Analysis) => { + 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.listAnalyses.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAnalyses, request) + ); + assert( + (client.descriptors.page.listAnalyses.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('invokes listAnalysesStream with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListAnalysesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListAnalysesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAnalyses.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listAnalysesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.contactcenterinsights.v1.Analysis[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.contactcenterinsights.v1.Analysis) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listAnalyses.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAnalyses, request) + ); + assert( + (client.descriptors.page.listAnalyses.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listAnalyses without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListAnalysesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListAnalysesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Analysis() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Analysis() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Analysis() + ), + ]; + client.descriptors.page.listAnalyses.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.contactcenterinsights.v1.IAnalysis[] = + []; + const iterable = client.listAnalysesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listAnalyses.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listAnalyses.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listAnalyses with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListAnalysesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListAnalysesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAnalyses.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAnalysesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.contactcenterinsights.v1.IAnalysis[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listAnalyses.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listAnalyses.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + }); + + describe('listPhraseMatchers', () => { + it('invokes listPhraseMatchers without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + ), + ]; + client.innerApiCalls.listPhraseMatchers = + stubSimpleCall(expectedResponse); + const [response] = await client.listPhraseMatchers(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listPhraseMatchers as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listPhraseMatchers as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listPhraseMatchers without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + ), + ]; + client.innerApiCalls.listPhraseMatchers = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listPhraseMatchers( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listPhraseMatchers as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listPhraseMatchers as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listPhraseMatchers with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listPhraseMatchers = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listPhraseMatchers(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listPhraseMatchers as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listPhraseMatchers as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listPhraseMatchersStream without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + ), + ]; + client.descriptors.page.listPhraseMatchers.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listPhraseMatchersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.contactcenterinsights.v1.PhraseMatcher[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.contactcenterinsights.v1.PhraseMatcher + ) => { + 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.listPhraseMatchers.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listPhraseMatchers, request) + ); + assert( + (client.descriptors.page.listPhraseMatchers.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('invokes listPhraseMatchersStream with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listPhraseMatchers.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listPhraseMatchersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.contactcenterinsights.v1.PhraseMatcher[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.contactcenterinsights.v1.PhraseMatcher + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listPhraseMatchers.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listPhraseMatchers, request) + ); + assert( + (client.descriptors.page.listPhraseMatchers.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listPhraseMatchers without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + ), + ]; + client.descriptors.page.listPhraseMatchers.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher[] = + []; + const iterable = client.listPhraseMatchersAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listPhraseMatchers.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listPhraseMatchers.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listPhraseMatchers with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listPhraseMatchers.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listPhraseMatchersAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listPhraseMatchers.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listPhraseMatchers.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + }); + + describe('listAnalysisRules', () => { + it('invokes listAnalysisRules without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.AnalysisRule() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.AnalysisRule() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.AnalysisRule() + ), + ]; + client.innerApiCalls.listAnalysisRules = stubSimpleCall(expectedResponse); + const [response] = await client.listAnalysisRules(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listAnalysisRules as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAnalysisRules as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAnalysisRules without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.AnalysisRule() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.AnalysisRule() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.AnalysisRule() + ), + ]; + client.innerApiCalls.listAnalysisRules = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAnalysisRules( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.contactcenterinsights.v1.IAnalysisRule[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listAnalysisRules as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAnalysisRules as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAnalysisRules with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listAnalysisRules = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listAnalysisRules(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listAnalysisRules as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAnalysisRules as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAnalysisRulesStream without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.AnalysisRule() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.AnalysisRule() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.AnalysisRule() + ), + ]; + client.descriptors.page.listAnalysisRules.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listAnalysisRulesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.contactcenterinsights.v1.AnalysisRule[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.contactcenterinsights.v1.AnalysisRule + ) => { + 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.listAnalysisRules.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAnalysisRules, request) + ); + assert( + (client.descriptors.page.listAnalysisRules.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('invokes listAnalysisRulesStream with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAnalysisRules.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listAnalysisRulesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.contactcenterinsights.v1.AnalysisRule[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.contactcenterinsights.v1.AnalysisRule + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listAnalysisRules.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAnalysisRules, request) + ); + assert( + (client.descriptors.page.listAnalysisRules.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listAnalysisRules without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.AnalysisRule() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.AnalysisRule() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.AnalysisRule() + ), + ]; + client.descriptors.page.listAnalysisRules.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.contactcenterinsights.v1.IAnalysisRule[] = + []; + const iterable = client.listAnalysisRulesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listAnalysisRules.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listAnalysisRules.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listAnalysisRules with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListAnalysisRulesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAnalysisRules.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAnalysisRulesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.contactcenterinsights.v1.IAnalysisRule[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listAnalysisRules.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listAnalysisRules.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + }); + + describe('listViews', () => { + it('invokes listViews without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListViewsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListViewsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.View() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.View() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.View() + ), + ]; + client.innerApiCalls.listViews = stubSimpleCall(expectedResponse); + const [response] = await client.listViews(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listViews as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listViews as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listViews without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListViewsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListViewsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.View() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.View() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.View() + ), + ]; + client.innerApiCalls.listViews = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listViews( + request, + ( + err?: Error | null, + result?: protos.google.cloud.contactcenterinsights.v1.IView[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listViews as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listViews as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listViews with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListViewsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListViewsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listViews = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listViews(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listViews as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listViews as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listViewsStream without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListViewsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListViewsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.View() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.View() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.View() + ), + ]; + client.descriptors.page.listViews.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listViewsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.contactcenterinsights.v1.View[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.contactcenterinsights.v1.View) => { + 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.listViews.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listViews, request) + ); + assert( + (client.descriptors.page.listViews.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('invokes listViewsStream with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListViewsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListViewsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listViews.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listViewsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.contactcenterinsights.v1.View[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.contactcenterinsights.v1.View) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listViews.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listViews, request) + ); + assert( + (client.descriptors.page.listViews.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listViews without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListViewsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListViewsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.View() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.View() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.View() + ), + ]; + client.descriptors.page.listViews.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.contactcenterinsights.v1.IView[] = + []; + const iterable = client.listViewsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listViews.asyncIterate as SinonStub).getCall(0) + .args[1], + request + ); + assert( + (client.descriptors.page.listViews.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listViews with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListViewsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListViewsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listViews.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listViewsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.contactcenterinsights.v1.IView[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listViews.asyncIterate as SinonStub).getCall(0) + .args[1], + request + ); + assert( + (client.descriptors.page.listViews.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + }); + + describe('listQaQuestions', () => { + it('invokes listQaQuestions without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.QaQuestion() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.QaQuestion() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.QaQuestion() + ), + ]; + client.innerApiCalls.listQaQuestions = stubSimpleCall(expectedResponse); + const [response] = await client.listQaQuestions(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listQaQuestions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listQaQuestions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listQaQuestions without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.QaQuestion() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.QaQuestion() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.QaQuestion() + ), + ]; + client.innerApiCalls.listQaQuestions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listQaQuestions( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.contactcenterinsights.v1.IQaQuestion[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listQaQuestions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listQaQuestions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listQaQuestions with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listQaQuestions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listQaQuestions(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listQaQuestions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listQaQuestions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listQaQuestionsStream without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.QaQuestion() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.QaQuestion() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.QaQuestion() + ), + ]; + client.descriptors.page.listQaQuestions.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listQaQuestionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.contactcenterinsights.v1.QaQuestion[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.contactcenterinsights.v1.QaQuestion + ) => { + 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.listQaQuestions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listQaQuestions, request) + ); + assert( + (client.descriptors.page.listQaQuestions.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('invokes listQaQuestionsStream with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listQaQuestions.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listQaQuestionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.contactcenterinsights.v1.QaQuestion[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.contactcenterinsights.v1.QaQuestion + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listQaQuestions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listQaQuestions, request) + ); + assert( + (client.descriptors.page.listQaQuestions.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listQaQuestions without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.QaQuestion() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.QaQuestion() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.QaQuestion() + ), + ]; + client.descriptors.page.listQaQuestions.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.contactcenterinsights.v1.IQaQuestion[] = + []; + const iterable = client.listQaQuestionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listQaQuestions.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listQaQuestions.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listQaQuestions with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListQaQuestionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listQaQuestions.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listQaQuestionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.contactcenterinsights.v1.IQaQuestion[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listQaQuestions.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listQaQuestions.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + }); + + describe('listQaScorecards', () => { + it('invokes listQaScorecards without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.QaScorecard() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.QaScorecard() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.QaScorecard() + ), + ]; + client.innerApiCalls.listQaScorecards = stubSimpleCall(expectedResponse); + const [response] = await client.listQaScorecards(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listQaScorecards as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listQaScorecards as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listQaScorecards without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.QaScorecard() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.QaScorecard() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.QaScorecard() + ), + ]; + client.innerApiCalls.listQaScorecards = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listQaScorecards( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.contactcenterinsights.v1.IQaScorecard[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listQaScorecards as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listQaScorecards as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listQaScorecards with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listQaScorecards = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listQaScorecards(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listQaScorecards as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listQaScorecards as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listQaScorecardsStream without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.QaScorecard() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.QaScorecard() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.QaScorecard() + ), + ]; + client.descriptors.page.listQaScorecards.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listQaScorecardsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.contactcenterinsights.v1.QaScorecard[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.contactcenterinsights.v1.QaScorecard + ) => { + 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.listQaScorecards.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listQaScorecards, request) + ); + assert( + (client.descriptors.page.listQaScorecards.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('invokes listQaScorecardsStream with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listQaScorecards.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listQaScorecardsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.contactcenterinsights.v1.QaScorecard[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.contactcenterinsights.v1.QaScorecard + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listQaScorecards.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listQaScorecards, request) + ); + assert( + (client.descriptors.page.listQaScorecards.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listQaScorecards without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.QaScorecard() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.QaScorecard() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.QaScorecard() + ), + ]; + client.descriptors.page.listQaScorecards.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.contactcenterinsights.v1.IQaScorecard[] = + []; + const iterable = client.listQaScorecardsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listQaScorecards.asyncIterate as SinonStub + ).getCall(0).args[1], + request ); - request.encryptionSpec.name = defaultValue1; - const expectedHeaderRequestParams = `encryption_spec.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.initializeEncryptionSpec = stubLongRunningCall( - undefined, - undefined, - expectedError + assert( + (client.descriptors.page.listQaScorecards.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); - const [operation] = await client.initializeEncryptionSpec(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = ( - client.innerApiCalls.initializeEncryptionSpec as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.initializeEncryptionSpec as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkInitializeEncryptionSpecProgress without error', async () => { + it('uses async iteration with listQaScorecards with error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest() ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = - await client.checkInitializeEncryptionSpecProgress( - expectedResponse.name - ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkInitializeEncryptionSpecProgress with error', async () => { - const client = - new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListQaScorecardsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( - undefined, - expectedError + client.descriptors.page.listQaScorecards.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listQaScorecardsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.contactcenterinsights.v1.IQaScorecard[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listQaScorecards.asyncIterate as SinonStub + ).getCall(0).args[1], + request ); - await assert.rejects( - client.checkInitializeEncryptionSpecProgress(''), - expectedError + assert( + (client.descriptors.page.listQaScorecards.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('listConversations', () => { - it('invokes listConversations without error', async () => { + describe('listQaScorecardRevisions', () => { + it('invokes listQaScorecardRevisions without error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -6496,39 +12561,40 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() + new protos.google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ListConversationsRequest', + '.google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.Conversation() + new protos.google.cloud.contactcenterinsights.v1.QaScorecardRevision() ), generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.Conversation() + new protos.google.cloud.contactcenterinsights.v1.QaScorecardRevision() ), generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.Conversation() + new protos.google.cloud.contactcenterinsights.v1.QaScorecardRevision() ), ]; - client.innerApiCalls.listConversations = stubSimpleCall(expectedResponse); - const [response] = await client.listConversations(request); + client.innerApiCalls.listQaScorecardRevisions = + stubSimpleCall(expectedResponse); + const [response] = await client.listQaScorecardRevisions(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listConversations as SinonStub + client.innerApiCalls.listQaScorecardRevisions as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listConversations as SinonStub + client.innerApiCalls.listQaScorecardRevisions as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listConversations without error using callback', async () => { + it('invokes listQaScorecardRevisions without error using callback', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -6536,34 +12602,34 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() + new protos.google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ListConversationsRequest', + '.google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.Conversation() + new protos.google.cloud.contactcenterinsights.v1.QaScorecardRevision() ), generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.Conversation() + new protos.google.cloud.contactcenterinsights.v1.QaScorecardRevision() ), generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.Conversation() + new protos.google.cloud.contactcenterinsights.v1.QaScorecardRevision() ), ]; - client.innerApiCalls.listConversations = + client.innerApiCalls.listQaScorecardRevisions = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listConversations( + client.listQaScorecardRevisions( request, ( err?: Error | null, result?: - | protos.google.cloud.contactcenterinsights.v1.IConversation[] + | protos.google.cloud.contactcenterinsights.v1.IQaScorecardRevision[] | null ) => { if (err) { @@ -6577,16 +12643,16 @@ describe('v1.ContactCenterInsightsClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listConversations as SinonStub + client.innerApiCalls.listQaScorecardRevisions as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listConversations as SinonStub + client.innerApiCalls.listQaScorecardRevisions as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listConversations with error', async () => { + it('invokes listQaScorecardRevisions with error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -6594,31 +12660,34 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() + new protos.google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ListConversationsRequest', + '.google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listConversations = stubSimpleCall( + client.innerApiCalls.listQaScorecardRevisions = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listConversations(request), expectedError); + await assert.rejects( + client.listQaScorecardRevisions(request), + expectedError + ); const actualRequest = ( - client.innerApiCalls.listConversations as SinonStub + client.innerApiCalls.listQaScorecardRevisions as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listConversations as SinonStub + client.innerApiCalls.listQaScorecardRevisions as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listConversationsStream without error', async () => { + it('invokes listQaScorecardRevisionsStream without error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -6626,35 +12695,35 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() + new protos.google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ListConversationsRequest', + '.google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.Conversation() + new protos.google.cloud.contactcenterinsights.v1.QaScorecardRevision() ), generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.Conversation() + new protos.google.cloud.contactcenterinsights.v1.QaScorecardRevision() ), generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.Conversation() + new protos.google.cloud.contactcenterinsights.v1.QaScorecardRevision() ), ]; - client.descriptors.page.listConversations.createStream = + client.descriptors.page.listQaScorecardRevisions.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listConversationsStream(request); + const stream = client.listQaScorecardRevisionsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.contactcenterinsights.v1.Conversation[] = + const responses: protos.google.cloud.contactcenterinsights.v1.QaScorecardRevision[] = []; stream.on( 'data', ( - response: protos.google.cloud.contactcenterinsights.v1.Conversation + response: protos.google.cloud.contactcenterinsights.v1.QaScorecardRevision ) => { responses.push(response); } @@ -6669,20 +12738,26 @@ describe('v1.ContactCenterInsightsClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listConversations.createStream as SinonStub) + ( + client.descriptors.page.listQaScorecardRevisions + .createStream as SinonStub + ) .getCall(0) - .calledWith(client.innerApiCalls.listConversations, request) + .calledWith(client.innerApiCalls.listQaScorecardRevisions, request) ); assert( - (client.descriptors.page.listConversations.createStream as SinonStub) + ( + client.descriptors.page.listQaScorecardRevisions + .createStream as SinonStub + ) .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); - it('invokes listConversationsStream with error', async () => { + it('invokes listQaScorecardRevisionsStream with error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -6690,25 +12765,25 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() + new protos.google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ListConversationsRequest', + '.google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listConversations.createStream = + client.descriptors.page.listQaScorecardRevisions.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listConversationsStream(request); + const stream = client.listQaScorecardRevisionsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.contactcenterinsights.v1.Conversation[] = + const responses: protos.google.cloud.contactcenterinsights.v1.QaScorecardRevision[] = []; stream.on( 'data', ( - response: protos.google.cloud.contactcenterinsights.v1.Conversation + response: protos.google.cloud.contactcenterinsights.v1.QaScorecardRevision ) => { responses.push(response); } @@ -6722,20 +12797,26 @@ describe('v1.ContactCenterInsightsClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listConversations.createStream as SinonStub) + ( + client.descriptors.page.listQaScorecardRevisions + .createStream as SinonStub + ) .getCall(0) - .calledWith(client.innerApiCalls.listConversations, request) + .calledWith(client.innerApiCalls.listQaScorecardRevisions, request) ); assert( - (client.descriptors.page.listConversations.createStream as SinonStub) + ( + client.descriptors.page.listQaScorecardRevisions + .createStream as SinonStub + ) .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); - it('uses async iteration with listConversations without error', async () => { + it('uses async iteration with listQaScorecardRevisions without error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -6743,50 +12824,54 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() + new protos.google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ListConversationsRequest', + '.google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.Conversation() + new protos.google.cloud.contactcenterinsights.v1.QaScorecardRevision() ), generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.Conversation() + new protos.google.cloud.contactcenterinsights.v1.QaScorecardRevision() ), generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.Conversation() + new protos.google.cloud.contactcenterinsights.v1.QaScorecardRevision() ), ]; - client.descriptors.page.listConversations.asyncIterate = + client.descriptors.page.listQaScorecardRevisions.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.contactcenterinsights.v1.IConversation[] = + const responses: protos.google.cloud.contactcenterinsights.v1.IQaScorecardRevision[] = []; - const iterable = client.listConversationsAsync(request); + const iterable = client.listQaScorecardRevisionsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listConversations.asyncIterate as SinonStub + client.descriptors.page.listQaScorecardRevisions + .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listConversations.asyncIterate as SinonStub) + ( + client.descriptors.page.listQaScorecardRevisions + .asyncIterate as SinonStub + ) .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); - it('uses async iteration with listConversations with error', async () => { + it('uses async iteration with listQaScorecardRevisions with error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -6794,20 +12879,20 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() + new protos.google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ListConversationsRequest', + '.google.cloud.contactcenterinsights.v1.ListQaScorecardRevisionsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listConversations.asyncIterate = + client.descriptors.page.listQaScorecardRevisions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listConversationsAsync(request); + const iterable = client.listQaScorecardRevisionsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.contactcenterinsights.v1.IConversation[] = + const responses: protos.google.cloud.contactcenterinsights.v1.IQaScorecardRevision[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -6815,22 +12900,26 @@ describe('v1.ContactCenterInsightsClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listConversations.asyncIterate as SinonStub + client.descriptors.page.listQaScorecardRevisions + .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listConversations.asyncIterate as SinonStub) + ( + client.descriptors.page.listQaScorecardRevisions + .asyncIterate as SinonStub + ) .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); - describe('listAnalyses', () => { - it('invokes listAnalyses without error', async () => { + describe('listFeedbackLabels', () => { + it('invokes listFeedbackLabels without error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -6838,39 +12927,40 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ListAnalysesRequest() + new protos.google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ListAnalysesRequest', + '.google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.Analysis() + new protos.google.cloud.contactcenterinsights.v1.FeedbackLabel() ), generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.Analysis() + new protos.google.cloud.contactcenterinsights.v1.FeedbackLabel() ), generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.Analysis() + new protos.google.cloud.contactcenterinsights.v1.FeedbackLabel() ), ]; - client.innerApiCalls.listAnalyses = stubSimpleCall(expectedResponse); - const [response] = await client.listAnalyses(request); + client.innerApiCalls.listFeedbackLabels = + stubSimpleCall(expectedResponse); + const [response] = await client.listFeedbackLabels(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listAnalyses as SinonStub + client.innerApiCalls.listFeedbackLabels as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listAnalyses as SinonStub + client.innerApiCalls.listFeedbackLabels as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listAnalyses without error using callback', async () => { + it('invokes listFeedbackLabels without error using callback', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -6878,34 +12968,34 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ListAnalysesRequest() + new protos.google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ListAnalysesRequest', + '.google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.Analysis() + new protos.google.cloud.contactcenterinsights.v1.FeedbackLabel() ), generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.Analysis() + new protos.google.cloud.contactcenterinsights.v1.FeedbackLabel() ), generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.Analysis() + new protos.google.cloud.contactcenterinsights.v1.FeedbackLabel() ), ]; - client.innerApiCalls.listAnalyses = + client.innerApiCalls.listFeedbackLabels = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listAnalyses( + client.listFeedbackLabels( request, ( err?: Error | null, result?: - | protos.google.cloud.contactcenterinsights.v1.IAnalysis[] + | protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel[] | null ) => { if (err) { @@ -6919,16 +13009,16 @@ describe('v1.ContactCenterInsightsClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listAnalyses as SinonStub + client.innerApiCalls.listFeedbackLabels as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listAnalyses as SinonStub + client.innerApiCalls.listFeedbackLabels as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listAnalyses with error', async () => { + it('invokes listFeedbackLabels with error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -6936,31 +13026,31 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ListAnalysesRequest() + new protos.google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ListAnalysesRequest', + '.google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listAnalyses = stubSimpleCall( + client.innerApiCalls.listFeedbackLabels = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listAnalyses(request), expectedError); + await assert.rejects(client.listFeedbackLabels(request), expectedError); const actualRequest = ( - client.innerApiCalls.listAnalyses as SinonStub + client.innerApiCalls.listFeedbackLabels as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listAnalyses as SinonStub + client.innerApiCalls.listFeedbackLabels as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listAnalysesStream without error', async () => { + it('invokes listFeedbackLabelsStream without error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -6968,34 +13058,36 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ListAnalysesRequest() + new protos.google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ListAnalysesRequest', + '.google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.Analysis() + new protos.google.cloud.contactcenterinsights.v1.FeedbackLabel() ), generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.Analysis() + new protos.google.cloud.contactcenterinsights.v1.FeedbackLabel() ), generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.Analysis() + new protos.google.cloud.contactcenterinsights.v1.FeedbackLabel() ), ]; - client.descriptors.page.listAnalyses.createStream = + client.descriptors.page.listFeedbackLabels.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listAnalysesStream(request); + const stream = client.listFeedbackLabelsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.contactcenterinsights.v1.Analysis[] = + const responses: protos.google.cloud.contactcenterinsights.v1.FeedbackLabel[] = []; stream.on( 'data', - (response: protos.google.cloud.contactcenterinsights.v1.Analysis) => { + ( + response: protos.google.cloud.contactcenterinsights.v1.FeedbackLabel + ) => { responses.push(response); } ); @@ -7009,12 +13101,12 @@ describe('v1.ContactCenterInsightsClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listAnalyses.createStream as SinonStub) + (client.descriptors.page.listFeedbackLabels.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listAnalyses, request) + .calledWith(client.innerApiCalls.listFeedbackLabels, request) ); assert( - (client.descriptors.page.listAnalyses.createStream as SinonStub) + (client.descriptors.page.listFeedbackLabels.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' @@ -7022,7 +13114,7 @@ describe('v1.ContactCenterInsightsClient', () => { ); }); - it('invokes listAnalysesStream with error', async () => { + it('invokes listFeedbackLabelsStream with error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -7030,26 +13122,26 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ListAnalysesRequest() + new protos.google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ListAnalysesRequest', + '.google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listAnalyses.createStream = stubPageStreamingCall( - undefined, - expectedError - ); - const stream = client.listAnalysesStream(request); + client.descriptors.page.listFeedbackLabels.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listFeedbackLabelsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.contactcenterinsights.v1.Analysis[] = + const responses: protos.google.cloud.contactcenterinsights.v1.FeedbackLabel[] = []; stream.on( 'data', - (response: protos.google.cloud.contactcenterinsights.v1.Analysis) => { + ( + response: protos.google.cloud.contactcenterinsights.v1.FeedbackLabel + ) => { responses.push(response); } ); @@ -7062,12 +13154,12 @@ describe('v1.ContactCenterInsightsClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listAnalyses.createStream as SinonStub) + (client.descriptors.page.listFeedbackLabels.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listAnalyses, request) + .calledWith(client.innerApiCalls.listFeedbackLabels, request) ); assert( - (client.descriptors.page.listAnalyses.createStream as SinonStub) + (client.descriptors.page.listFeedbackLabels.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' @@ -7075,7 +13167,7 @@ describe('v1.ContactCenterInsightsClient', () => { ); }); - it('uses async iteration with listAnalyses without error', async () => { + it('uses async iteration with listFeedbackLabels without error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -7083,42 +13175,42 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ListAnalysesRequest() + new protos.google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ListAnalysesRequest', + '.google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.Analysis() + new protos.google.cloud.contactcenterinsights.v1.FeedbackLabel() ), generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.Analysis() + new protos.google.cloud.contactcenterinsights.v1.FeedbackLabel() ), generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.Analysis() + new protos.google.cloud.contactcenterinsights.v1.FeedbackLabel() ), ]; - client.descriptors.page.listAnalyses.asyncIterate = + client.descriptors.page.listFeedbackLabels.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.contactcenterinsights.v1.IAnalysis[] = + const responses: protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel[] = []; - const iterable = client.listAnalysesAsync(request); + const iterable = client.listFeedbackLabelsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listAnalyses.asyncIterate as SinonStub + client.descriptors.page.listFeedbackLabels.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listAnalyses.asyncIterate as SinonStub) + (client.descriptors.page.listFeedbackLabels.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' @@ -7126,7 +13218,7 @@ describe('v1.ContactCenterInsightsClient', () => { ); }); - it('uses async iteration with listAnalyses with error', async () => { + it('uses async iteration with listFeedbackLabels with error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -7134,20 +13226,20 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ListAnalysesRequest() + new protos.google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ListAnalysesRequest', + '.google.cloud.contactcenterinsights.v1.ListFeedbackLabelsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listAnalyses.asyncIterate = + client.descriptors.page.listFeedbackLabels.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listAnalysesAsync(request); + const iterable = client.listFeedbackLabelsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.contactcenterinsights.v1.IAnalysis[] = + const responses: protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -7155,12 +13247,12 @@ describe('v1.ContactCenterInsightsClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listAnalyses.asyncIterate as SinonStub + client.descriptors.page.listFeedbackLabels.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listAnalyses.asyncIterate as SinonStub) + (client.descriptors.page.listFeedbackLabels.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers[ 'x-goog-request-params' @@ -7168,9 +13260,9 @@ describe('v1.ContactCenterInsightsClient', () => { ); }); }); - - describe('listPhraseMatchers', () => { - it('invokes listPhraseMatchers without error', async () => { + + describe('listAllFeedbackLabels', () => { + it('invokes listAllFeedbackLabels without error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -7178,40 +13270,40 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest() + new protos.google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest', + '.google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + new protos.google.cloud.contactcenterinsights.v1.FeedbackLabel() ), generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + new protos.google.cloud.contactcenterinsights.v1.FeedbackLabel() ), generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + new protos.google.cloud.contactcenterinsights.v1.FeedbackLabel() ), ]; - client.innerApiCalls.listPhraseMatchers = + client.innerApiCalls.listAllFeedbackLabels = stubSimpleCall(expectedResponse); - const [response] = await client.listPhraseMatchers(request); + const [response] = await client.listAllFeedbackLabels(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listPhraseMatchers as SinonStub + client.innerApiCalls.listAllFeedbackLabels as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listPhraseMatchers as SinonStub + client.innerApiCalls.listAllFeedbackLabels as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listPhraseMatchers without error using callback', async () => { + it('invokes listAllFeedbackLabels without error using callback', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -7219,34 +13311,34 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest() + new protos.google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest', + '.google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + new protos.google.cloud.contactcenterinsights.v1.FeedbackLabel() ), generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + new protos.google.cloud.contactcenterinsights.v1.FeedbackLabel() ), generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + new protos.google.cloud.contactcenterinsights.v1.FeedbackLabel() ), ]; - client.innerApiCalls.listPhraseMatchers = + client.innerApiCalls.listAllFeedbackLabels = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listPhraseMatchers( + client.listAllFeedbackLabels( request, ( err?: Error | null, result?: - | protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher[] + | protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel[] | null ) => { if (err) { @@ -7260,16 +13352,16 @@ describe('v1.ContactCenterInsightsClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listPhraseMatchers as SinonStub + client.innerApiCalls.listAllFeedbackLabels as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listPhraseMatchers as SinonStub + client.innerApiCalls.listAllFeedbackLabels as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listPhraseMatchers with error', async () => { + it('invokes listAllFeedbackLabels with error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -7277,31 +13369,34 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest() + new protos.google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest', + '.google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listPhraseMatchers = stubSimpleCall( + client.innerApiCalls.listAllFeedbackLabels = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listPhraseMatchers(request), expectedError); + await assert.rejects( + client.listAllFeedbackLabels(request), + expectedError + ); const actualRequest = ( - client.innerApiCalls.listPhraseMatchers as SinonStub + client.innerApiCalls.listAllFeedbackLabels as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listPhraseMatchers as SinonStub + client.innerApiCalls.listAllFeedbackLabels as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listPhraseMatchersStream without error', async () => { + it('invokes listAllFeedbackLabelsStream without error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -7309,35 +13404,35 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest() + new protos.google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest', + '.google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + new protos.google.cloud.contactcenterinsights.v1.FeedbackLabel() ), generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + new protos.google.cloud.contactcenterinsights.v1.FeedbackLabel() ), generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + new protos.google.cloud.contactcenterinsights.v1.FeedbackLabel() ), ]; - client.descriptors.page.listPhraseMatchers.createStream = + client.descriptors.page.listAllFeedbackLabels.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listPhraseMatchersStream(request); + const stream = client.listAllFeedbackLabelsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.contactcenterinsights.v1.PhraseMatcher[] = + const responses: protos.google.cloud.contactcenterinsights.v1.FeedbackLabel[] = []; stream.on( 'data', ( - response: protos.google.cloud.contactcenterinsights.v1.PhraseMatcher + response: protos.google.cloud.contactcenterinsights.v1.FeedbackLabel ) => { responses.push(response); } @@ -7352,20 +13447,26 @@ describe('v1.ContactCenterInsightsClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listPhraseMatchers.createStream as SinonStub) + ( + client.descriptors.page.listAllFeedbackLabels + .createStream as SinonStub + ) .getCall(0) - .calledWith(client.innerApiCalls.listPhraseMatchers, request) + .calledWith(client.innerApiCalls.listAllFeedbackLabels, request) ); assert( - (client.descriptors.page.listPhraseMatchers.createStream as SinonStub) + ( + client.descriptors.page.listAllFeedbackLabels + .createStream as SinonStub + ) .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); - it('invokes listPhraseMatchersStream with error', async () => { + it('invokes listAllFeedbackLabelsStream with error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -7373,25 +13474,25 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest() + new protos.google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest', + '.google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listPhraseMatchers.createStream = + client.descriptors.page.listAllFeedbackLabels.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listPhraseMatchersStream(request); + const stream = client.listAllFeedbackLabelsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.contactcenterinsights.v1.PhraseMatcher[] = + const responses: protos.google.cloud.contactcenterinsights.v1.FeedbackLabel[] = []; stream.on( 'data', ( - response: protos.google.cloud.contactcenterinsights.v1.PhraseMatcher + response: protos.google.cloud.contactcenterinsights.v1.FeedbackLabel ) => { responses.push(response); } @@ -7405,20 +13506,26 @@ describe('v1.ContactCenterInsightsClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listPhraseMatchers.createStream as SinonStub) + ( + client.descriptors.page.listAllFeedbackLabels + .createStream as SinonStub + ) .getCall(0) - .calledWith(client.innerApiCalls.listPhraseMatchers, request) + .calledWith(client.innerApiCalls.listAllFeedbackLabels, request) ); assert( - (client.descriptors.page.listPhraseMatchers.createStream as SinonStub) + ( + client.descriptors.page.listAllFeedbackLabels + .createStream as SinonStub + ) .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); - it('uses async iteration with listPhraseMatchers without error', async () => { + it('uses async iteration with listAllFeedbackLabels without error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -7426,50 +13533,54 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest() + new protos.google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest', + '.google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + new protos.google.cloud.contactcenterinsights.v1.FeedbackLabel() ), generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + new protos.google.cloud.contactcenterinsights.v1.FeedbackLabel() ), generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.PhraseMatcher() + new protos.google.cloud.contactcenterinsights.v1.FeedbackLabel() ), ]; - client.descriptors.page.listPhraseMatchers.asyncIterate = + client.descriptors.page.listAllFeedbackLabels.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher[] = + const responses: protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel[] = []; - const iterable = client.listPhraseMatchersAsync(request); + const iterable = client.listAllFeedbackLabelsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listPhraseMatchers.asyncIterate as SinonStub + client.descriptors.page.listAllFeedbackLabels + .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listPhraseMatchers.asyncIterate as SinonStub) + ( + client.descriptors.page.listAllFeedbackLabels + .asyncIterate as SinonStub + ) .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); - it('uses async iteration with listPhraseMatchers with error', async () => { + it('uses async iteration with listAllFeedbackLabels with error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -7477,20 +13588,20 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest() + new protos.google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest', + '.google.cloud.contactcenterinsights.v1.ListAllFeedbackLabelsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listPhraseMatchers.asyncIterate = + client.descriptors.page.listAllFeedbackLabels.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listPhraseMatchersAsync(request); + const iterable = client.listAllFeedbackLabelsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.contactcenterinsights.v1.IPhraseMatcher[] = + const responses: protos.google.cloud.contactcenterinsights.v1.IFeedbackLabel[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -7498,22 +13609,25 @@ describe('v1.ContactCenterInsightsClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listPhraseMatchers.asyncIterate as SinonStub + client.descriptors.page.listAllFeedbackLabels + .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listPhraseMatchers.asyncIterate as SinonStub) + ( + client.descriptors.page.listAllFeedbackLabels + .asyncIterate as SinonStub + ) .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); - - describe('listViews', () => { - it('invokes listViews without error', async () => { + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -7521,39 +13635,30 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ListViewsRequest() + new IamProtos.google.iam.v1.GetIamPolicyRequest() ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ListViewsRequest', - ['parent'] + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.getIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.View() - ), - generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.View() - ), - generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.View() - ), - ]; - client.innerApiCalls.listViews = stubSimpleCall(expectedResponse); - const [response] = await client.listViews(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listViews as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listViews as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - - it('invokes listViews without error using callback', async () => { + it('invokes getIamPolicy without error using callback', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -7561,33 +13666,30 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ListViewsRequest() + new IamProtos.google.iam.v1.GetIamPolicyRequest() ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ListViewsRequest', - ['parent'] + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.View() - ), - generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.View() - ), - generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.View() - ), - ]; - client.innerApiCalls.listViews = - stubSimpleCallWithCallback(expectedResponse); + client.iamClient.getIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); const promise = new Promise((resolve, reject) => { - client.listViews( + client.getIamPolicy( request, + expectedOptions, ( err?: Error | null, - result?: protos.google.cloud.contactcenterinsights.v1.IView[] | null + result?: IamProtos.google.iam.v1.Policy | null ) => { if (err) { reject(err); @@ -7599,17 +13701,9 @@ describe('v1.ContactCenterInsightsClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listViews as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listViews as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + assert((client.iamClient.getIamPolicy as SinonStub).getCall(0)); }); - - it('invokes listViews with error', async () => { + it('invokes getIamPolicy with error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -7617,28 +13711,32 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ListViewsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ListViewsRequest', - ['parent'] + new IamProtos.google.iam.v1.GetIamPolicyRequest() ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedError = new Error('expected'); - client.innerApiCalls.listViews = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listViews(request), expectedError); - const actualRequest = ( - client.innerApiCalls.listViews as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listViews as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.getIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); }); - - it('invokes listViewsStream without error', async () => { + }); + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -7646,61 +13744,75 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ListViewsRequest() + new IamProtos.google.iam.v1.SetIamPolicyRequest() ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ListViewsRequest', - ['parent'] + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.View() - ), - generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.View() - ), - generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.View() - ), - ]; - client.descriptors.page.listViews.createStream = - stubPageStreamingCall(expectedResponse); - const stream = client.listViewsStream(request); + client.iamClient.setIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.setIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes setIamPolicy without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.contactcenterinsights.v1.View[] = - []; - stream.on( - 'data', - (response: protos.google.cloud.contactcenterinsights.v1.View) => { - responses.push(response); + client.setIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } } ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); }); - const responses = await promise; - assert.deepStrictEqual(responses, expectedResponse); - assert( - (client.descriptors.page.listViews.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listViews, request) - ); - assert( - (client.descriptors.page.listViews.createStream as SinonStub) - .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) - ); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.setIamPolicy as SinonStub).getCall(0)); }); - - it('invokes listViewsStream with error', async () => { + it('invokes setIamPolicy with error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -7708,52 +13820,32 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ListViewsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ListViewsRequest', - ['parent'] + new IamProtos.google.iam.v1.SetIamPolicyRequest() ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedError = new Error('expected'); - client.descriptors.page.listViews.createStream = stubPageStreamingCall( - undefined, + client.iamClient.setIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.setIamPolicy(request, expectedOptions), expectedError ); - const stream = client.listViewsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.contactcenterinsights.v1.View[] = - []; - stream.on( - 'data', - (response: protos.google.cloud.contactcenterinsights.v1.View) => { - responses.push(response); - } - ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert( - (client.descriptors.page.listViews.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listViews, request) - ); assert( - (client.descriptors.page.listViews.createStream as SinonStub) + (client.iamClient.setIamPolicy as SinonStub) .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + .calledWith(request, expectedOptions, undefined) ); }); - - it('uses async iteration with listViews without error', async () => { + }); + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -7761,49 +13853,33 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ListViewsRequest() + new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ListViewsRequest', - ['parent'] + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.View() - ), - generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.View() - ), - generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.View() - ), - ]; - client.descriptors.page.listViews.asyncIterate = - stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.contactcenterinsights.v1.IView[] = - []; - const iterable = client.listViewsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listViews.asyncIterate as SinonStub).getCall(0) - .args[1], - request + client.iamClient.testIamPermissions = stubSimpleCall(expectedResponse); + const response = await client.testIamPermissions( + request, + expectedOptions ); + assert.deepStrictEqual(response, [expectedResponse]); assert( - (client.descriptors.page.listViews.asyncIterate as SinonStub) + (client.iamClient.testIamPermissions as SinonStub) .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + .calledWith(request, expectedOptions, undefined) ); }); - - it('uses async iteration with listViews with error', async () => { + it('invokes testIamPermissions without error using callback', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -7811,38 +13887,75 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ListViewsRequest() + new IamProtos.google.iam.v1.TestIamPermissionsRequest() ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ListViewsRequest', - ['parent'] + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + client.iamClient.testIamPermissions = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.TestIamPermissionsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.testIamPermissions as SinonStub).getCall(0)); + }); + it('invokes testIamPermissions with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedError = new Error('expected'); - client.descriptors.page.listViews.asyncIterate = stubAsyncIterationCall( + client.iamClient.testIamPermissions = stubSimpleCall( undefined, expectedError ); - const iterable = client.listViewsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.contactcenterinsights.v1.IView[] = - []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listViews.asyncIterate as SinonStub).getCall(0) - .args[1], - request + await assert.rejects( + client.testIamPermissions(request, expectedOptions), + expectedError ); assert( - (client.descriptors.page.listViews.asyncIterate as SinonStub) + (client.iamClient.testIamPermissions as SinonStub) .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + .calledWith(request, expectedOptions, undefined) ); }); }); @@ -8241,6 +14354,71 @@ describe('v1.ContactCenterInsightsClient', () => { }); }); + describe('analysisRule', () => { + const fakePath = '/rendered/path/analysisRule'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + analysis_rule: 'analysisRuleValue', + }; + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.analysisRulePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.analysisRulePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('analysisRulePath', () => { + const result = client.analysisRulePath( + 'projectValue', + 'locationValue', + 'analysisRuleValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.analysisRulePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromAnalysisRuleName', () => { + const result = client.matchProjectFromAnalysisRuleName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.analysisRulePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromAnalysisRuleName', () => { + const result = client.matchLocationFromAnalysisRuleName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.analysisRulePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAnalysisRuleFromAnalysisRuleName', () => { + const result = client.matchAnalysisRuleFromAnalysisRuleName(fakePath); + assert.strictEqual(result, 'analysisRuleValue'); + assert( + (client.pathTemplates.analysisRulePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('conversation', () => { const fakePath = '/rendered/path/conversation'; const expectedParameters = { @@ -8289,28 +14467,83 @@ describe('v1.ContactCenterInsightsClient', () => { const result = client.matchLocationFromConversationName(fakePath); assert.strictEqual(result, 'locationValue'); assert( - (client.pathTemplates.conversationPathTemplate.match as SinonStub) + (client.pathTemplates.conversationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchConversationFromConversationName', () => { + const result = client.matchConversationFromConversationName(fakePath); + assert.strictEqual(result, 'conversationValue'); + assert( + (client.pathTemplates.conversationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('encryptionSpec', () => { + const fakePath = '/rendered/path/encryptionSpec'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.encryptionSpecPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.encryptionSpecPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('encryptionSpecPath', () => { + const result = client.encryptionSpecPath( + 'projectValue', + 'locationValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.encryptionSpecPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromEncryptionSpecName', () => { + const result = client.matchProjectFromEncryptionSpecName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.encryptionSpecPathTemplate.match as SinonStub) .getCall(-1) .calledWith(fakePath) ); }); - it('matchConversationFromConversationName', () => { - const result = client.matchConversationFromConversationName(fakePath); - assert.strictEqual(result, 'conversationValue'); + it('matchLocationFromEncryptionSpecName', () => { + const result = client.matchLocationFromEncryptionSpecName(fakePath); + assert.strictEqual(result, 'locationValue'); assert( - (client.pathTemplates.conversationPathTemplate.match as SinonStub) + (client.pathTemplates.encryptionSpecPathTemplate.match as SinonStub) .getCall(-1) .calledWith(fakePath) ); }); }); - describe('encryptionSpec', () => { - const fakePath = '/rendered/path/encryptionSpec'; + describe('feedbackLabel', () => { + const fakePath = '/rendered/path/feedbackLabel'; const expectedParameters = { project: 'projectValue', location: 'locationValue', + conversation: 'conversationValue', + feedback_label: 'feedbackLabelValue', }; const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ @@ -8318,41 +14551,63 @@ describe('v1.ContactCenterInsightsClient', () => { projectId: 'bogus', }); client.initialize(); - client.pathTemplates.encryptionSpecPathTemplate.render = sinon + client.pathTemplates.feedbackLabelPathTemplate.render = sinon .stub() .returns(fakePath); - client.pathTemplates.encryptionSpecPathTemplate.match = sinon + client.pathTemplates.feedbackLabelPathTemplate.match = sinon .stub() .returns(expectedParameters); - it('encryptionSpecPath', () => { - const result = client.encryptionSpecPath( + it('feedbackLabelPath', () => { + const result = client.feedbackLabelPath( 'projectValue', - 'locationValue' + 'locationValue', + 'conversationValue', + 'feedbackLabelValue' ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.encryptionSpecPathTemplate.render as SinonStub) + (client.pathTemplates.feedbackLabelPathTemplate.render as SinonStub) .getCall(-1) .calledWith(expectedParameters) ); }); - it('matchProjectFromEncryptionSpecName', () => { - const result = client.matchProjectFromEncryptionSpecName(fakePath); + it('matchProjectFromFeedbackLabelName', () => { + const result = client.matchProjectFromFeedbackLabelName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.encryptionSpecPathTemplate.match as SinonStub) + (client.pathTemplates.feedbackLabelPathTemplate.match as SinonStub) .getCall(-1) .calledWith(fakePath) ); }); - it('matchLocationFromEncryptionSpecName', () => { - const result = client.matchLocationFromEncryptionSpecName(fakePath); + it('matchLocationFromFeedbackLabelName', () => { + const result = client.matchLocationFromFeedbackLabelName(fakePath); assert.strictEqual(result, 'locationValue'); assert( - (client.pathTemplates.encryptionSpecPathTemplate.match as SinonStub) + (client.pathTemplates.feedbackLabelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchConversationFromFeedbackLabelName', () => { + const result = client.matchConversationFromFeedbackLabelName(fakePath); + assert.strictEqual(result, 'conversationValue'); + assert( + (client.pathTemplates.feedbackLabelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFeedbackLabelFromFeedbackLabelName', () => { + const result = client.matchFeedbackLabelFromFeedbackLabelName(fakePath); + assert.strictEqual(result, 'feedbackLabelValue'); + assert( + (client.pathTemplates.feedbackLabelPathTemplate.match as SinonStub) .getCall(-1) .calledWith(fakePath) ); @@ -8616,6 +14871,333 @@ describe('v1.ContactCenterInsightsClient', () => { }); }); + describe('qaQuestion', () => { + const fakePath = '/rendered/path/qaQuestion'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + qa_scorecard: 'qaScorecardValue', + revision: 'revisionValue', + qa_question: 'qaQuestionValue', + }; + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.qaQuestionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.qaQuestionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('qaQuestionPath', () => { + const result = client.qaQuestionPath( + 'projectValue', + 'locationValue', + 'qaScorecardValue', + 'revisionValue', + 'qaQuestionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.qaQuestionPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromQaQuestionName', () => { + const result = client.matchProjectFromQaQuestionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.qaQuestionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromQaQuestionName', () => { + const result = client.matchLocationFromQaQuestionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.qaQuestionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchQaScorecardFromQaQuestionName', () => { + const result = client.matchQaScorecardFromQaQuestionName(fakePath); + assert.strictEqual(result, 'qaScorecardValue'); + assert( + (client.pathTemplates.qaQuestionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRevisionFromQaQuestionName', () => { + const result = client.matchRevisionFromQaQuestionName(fakePath); + assert.strictEqual(result, 'revisionValue'); + assert( + (client.pathTemplates.qaQuestionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchQaQuestionFromQaQuestionName', () => { + const result = client.matchQaQuestionFromQaQuestionName(fakePath); + assert.strictEqual(result, 'qaQuestionValue'); + assert( + (client.pathTemplates.qaQuestionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('qaScorecard', () => { + const fakePath = '/rendered/path/qaScorecard'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + qa_scorecard: 'qaScorecardValue', + }; + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.qaScorecardPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.qaScorecardPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('qaScorecardPath', () => { + const result = client.qaScorecardPath( + 'projectValue', + 'locationValue', + 'qaScorecardValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.qaScorecardPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromQaScorecardName', () => { + const result = client.matchProjectFromQaScorecardName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.qaScorecardPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromQaScorecardName', () => { + const result = client.matchLocationFromQaScorecardName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.qaScorecardPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchQaScorecardFromQaScorecardName', () => { + const result = client.matchQaScorecardFromQaScorecardName(fakePath); + assert.strictEqual(result, 'qaScorecardValue'); + assert( + (client.pathTemplates.qaScorecardPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('qaScorecardResult', () => { + const fakePath = '/rendered/path/qaScorecardResult'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + qa_scorecard_result: 'qaScorecardResultValue', + }; + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.qaScorecardResultPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.qaScorecardResultPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('qaScorecardResultPath', () => { + const result = client.qaScorecardResultPath( + 'projectValue', + 'locationValue', + 'qaScorecardResultValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.qaScorecardResultPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromQaScorecardResultName', () => { + const result = client.matchProjectFromQaScorecardResultName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.qaScorecardResultPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromQaScorecardResultName', () => { + const result = client.matchLocationFromQaScorecardResultName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.qaScorecardResultPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchQaScorecardResultFromQaScorecardResultName', () => { + const result = + client.matchQaScorecardResultFromQaScorecardResultName(fakePath); + assert.strictEqual(result, 'qaScorecardResultValue'); + assert( + ( + client.pathTemplates.qaScorecardResultPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('qaScorecardRevision', () => { + const fakePath = '/rendered/path/qaScorecardRevision'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + qa_scorecard: 'qaScorecardValue', + revision: 'revisionValue', + }; + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.qaScorecardRevisionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.qaScorecardRevisionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('qaScorecardRevisionPath', () => { + const result = client.qaScorecardRevisionPath( + 'projectValue', + 'locationValue', + 'qaScorecardValue', + 'revisionValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.qaScorecardRevisionPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromQaScorecardRevisionName', () => { + const result = client.matchProjectFromQaScorecardRevisionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.qaScorecardRevisionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromQaScorecardRevisionName', () => { + const result = + client.matchLocationFromQaScorecardRevisionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.qaScorecardRevisionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchQaScorecardFromQaScorecardRevisionName', () => { + const result = + client.matchQaScorecardFromQaScorecardRevisionName(fakePath); + assert.strictEqual(result, 'qaScorecardValue'); + assert( + ( + client.pathTemplates.qaScorecardRevisionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRevisionFromQaScorecardRevisionName', () => { + const result = + client.matchRevisionFromQaScorecardRevisionName(fakePath); + assert.strictEqual(result, 'revisionValue'); + assert( + ( + client.pathTemplates.qaScorecardRevisionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('settings', () => { const fakePath = '/rendered/path/settings'; const expectedParameters = {