diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/.gitignore b/owl-bot-staging/google-cloud-contact_center_insights-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-contact_center_insights-v1/.repo-metadata.json new file mode 100644 index 000000000000..4a3ff56455aa --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "contactcenterinsights.googleapis.com", + "api_shortname": "contactcenterinsights", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-contact_center_insights-v1/latest", + "distribution_name": "google-cloud-contact_center_insights-v1", + "is_cloud": true, + "language": "ruby", + "name": "contactcenterinsights", + "name_pretty": "Contact Center AI Insights V1 API", + "product_documentation": "https://cloud.google.com/contact-center/insights/docs", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Contact Center AI Insights helps users detect and visualize patterns in their contact center data. Understanding conversational data drives business value, improves operational efficiency, and provides a voice for customer feedback. Note that google-cloud-contact_center_insights-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-contact_center_insights instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/contact-center/insights/docs", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/.rubocop.yml b/owl-bot-staging/google-cloud-contact_center_insights-v1/.rubocop.yml new file mode 100644 index 000000000000..f08be6fc8a2e --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-contact_center_insights-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-contact_center_insights-v1.rb" diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/.toys.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/.toys.rb new file mode 100644 index 000000000000..23434bdd5d5b --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/.yardopts b/owl-bot-staging/google-cloud-contact_center_insights-v1/.yardopts new file mode 100644 index 000000000000..ee8cea258f8f --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Contact Center AI Insights V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-contact_center_insights-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..eedd08195af8 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-contact_center_insights-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-contact_center_insights-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/contact_center_insights/v1" + +client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/contact_center_insights/v1" + +::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-contact_center_insights-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/contact_center_insights/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-contact_center_insights-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/Gemfile b/owl-bot-staging/google-cloud-contact_center_insights-v1/Gemfile new file mode 100644 index 000000000000..95163a6d11f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.27.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/LICENSE.md b/owl-bot-staging/google-cloud-contact_center_insights-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/README.md b/owl-bot-staging/google-cloud-contact_center_insights-v1/README.md new file mode 100644 index 000000000000..30c5df0ee3df --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/README.md @@ -0,0 +1,144 @@ +# Ruby Client for the Contact Center AI Insights V1 API + +API Client library for the Contact Center AI Insights V1 API + +Contact Center AI Insights helps users detect and visualize patterns in their contact center data. Understanding conversational data drives business value, improves operational efficiency, and provides a voice for customer feedback. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Contact Center AI Insights V1 API. Most users should consider using +the main client gem, +[google-cloud-contact_center_insights](https://rubygems.org/gems/google-cloud-contact_center_insights). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-contact_center_insights-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/contactcenterinsights.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/contact_center_insights/v1" + +client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new +request = ::Google::Cloud::ContactCenterInsights::V1::CreateConversationRequest.new # (request fields as keyword arguments...) +response = client.create_conversation request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-contact_center_insights-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/contact-center/insights/docs) +for general usage information. + +## Enabling Logging + +To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library. +The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below, +or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest) +that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb) +and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information. + +Configuring a Ruby stdlib logger: + +```ruby +require "logger" + +module MyLogger + LOGGER = Logger.new $stderr, level: Logger::WARN + def logger + LOGGER + end +end + +# Define a gRPC module-level logger method before grpc/logconfig.rb loads. +module GRPC + extend MyLogger +end +``` + + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 2.7+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-contact_center_insights`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-contact_center_insights-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-contact_center_insights`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-contact_center_insights-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/Rakefile b/owl-bot-staging/google-cloud-contact_center_insights-v1/Rakefile new file mode 100644 index 000000000000..ebed7b39584e --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-contact_center_insights-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/contact_center_insights/v1/contact_center_insights/credentials" + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-contact_center_insights-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-contact_center_insights-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-contact_center_insights-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-contact_center_insights-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-contact_center_insights-v1" + header "google-cloud-contact_center_insights-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-contact_center_insights-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-contact_center_insights-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-contact_center_insights-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-contact_center_insights-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-contact_center_insights-v1/gapic_metadata.json new file mode 100644 index 000000000000..d7cb94cf9752 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/gapic_metadata.json @@ -0,0 +1,233 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.contactcenterinsights.v1", + "libraryPackage": "::Google::Cloud::ContactCenterInsights::V1", + "services": { + "ContactCenterInsights": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client", + "rpcs": { + "CreateConversation": { + "methods": [ + "create_conversation" + ] + }, + "UploadConversation": { + "methods": [ + "upload_conversation" + ] + }, + "UpdateConversation": { + "methods": [ + "update_conversation" + ] + }, + "GetConversation": { + "methods": [ + "get_conversation" + ] + }, + "ListConversations": { + "methods": [ + "list_conversations" + ] + }, + "DeleteConversation": { + "methods": [ + "delete_conversation" + ] + }, + "CreateAnalysis": { + "methods": [ + "create_analysis" + ] + }, + "GetAnalysis": { + "methods": [ + "get_analysis" + ] + }, + "ListAnalyses": { + "methods": [ + "list_analyses" + ] + }, + "DeleteAnalysis": { + "methods": [ + "delete_analysis" + ] + }, + "BulkAnalyzeConversations": { + "methods": [ + "bulk_analyze_conversations" + ] + }, + "BulkDeleteConversations": { + "methods": [ + "bulk_delete_conversations" + ] + }, + "IngestConversations": { + "methods": [ + "ingest_conversations" + ] + }, + "ExportInsightsData": { + "methods": [ + "export_insights_data" + ] + }, + "CreateIssueModel": { + "methods": [ + "create_issue_model" + ] + }, + "UpdateIssueModel": { + "methods": [ + "update_issue_model" + ] + }, + "GetIssueModel": { + "methods": [ + "get_issue_model" + ] + }, + "ListIssueModels": { + "methods": [ + "list_issue_models" + ] + }, + "DeleteIssueModel": { + "methods": [ + "delete_issue_model" + ] + }, + "DeployIssueModel": { + "methods": [ + "deploy_issue_model" + ] + }, + "UndeployIssueModel": { + "methods": [ + "undeploy_issue_model" + ] + }, + "ExportIssueModel": { + "methods": [ + "export_issue_model" + ] + }, + "ImportIssueModel": { + "methods": [ + "import_issue_model" + ] + }, + "GetIssue": { + "methods": [ + "get_issue" + ] + }, + "ListIssues": { + "methods": [ + "list_issues" + ] + }, + "UpdateIssue": { + "methods": [ + "update_issue" + ] + }, + "DeleteIssue": { + "methods": [ + "delete_issue" + ] + }, + "CalculateIssueModelStats": { + "methods": [ + "calculate_issue_model_stats" + ] + }, + "CreatePhraseMatcher": { + "methods": [ + "create_phrase_matcher" + ] + }, + "GetPhraseMatcher": { + "methods": [ + "get_phrase_matcher" + ] + }, + "ListPhraseMatchers": { + "methods": [ + "list_phrase_matchers" + ] + }, + "DeletePhraseMatcher": { + "methods": [ + "delete_phrase_matcher" + ] + }, + "UpdatePhraseMatcher": { + "methods": [ + "update_phrase_matcher" + ] + }, + "CalculateStats": { + "methods": [ + "calculate_stats" + ] + }, + "GetSettings": { + "methods": [ + "get_settings" + ] + }, + "UpdateSettings": { + "methods": [ + "update_settings" + ] + }, + "GetEncryptionSpec": { + "methods": [ + "get_encryption_spec" + ] + }, + "InitializeEncryptionSpec": { + "methods": [ + "initialize_encryption_spec" + ] + }, + "CreateView": { + "methods": [ + "create_view" + ] + }, + "GetView": { + "methods": [ + "get_view" + ] + }, + "ListViews": { + "methods": [ + "list_views" + ] + }, + "UpdateView": { + "methods": [ + "update_view" + ] + }, + "DeleteView": { + "methods": [ + "delete_view" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/google-cloud-contact_center_insights-v1.gemspec b/owl-bot-staging/google-cloud-contact_center_insights-v1/google-cloud-contact_center_insights-v1.gemspec new file mode 100644 index 000000000000..775644ce7008 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/google-cloud-contact_center_insights-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/contact_center_insights/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-contact_center_insights-v1" + gem.version = Google::Cloud::ContactCenterInsights::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Contact Center AI Insights helps users detect and visualize patterns in their contact center data. Understanding conversational data drives business value, improves operational efficiency, and provides a voice for customer feedback. Note that google-cloud-contact_center_insights-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-contact_center_insights instead. See the readme for more details." + gem.summary = "API Client library for the Contact Center AI Insights V1 API" + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 2.7" + + gem.add_dependency "gapic-common", ">= 0.21.1", "< 2.a" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google-cloud-contact_center_insights-v1.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google-cloud-contact_center_insights-v1.rb new file mode 100644 index 000000000000..67bda655bc7c --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google-cloud-contact_center_insights-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/contact_center_insights/v1" diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contact_center_insights/v1.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contact_center_insights/v1.rb new file mode 100644 index 000000000000..78f1c0d16596 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contact_center_insights/v1.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/contact_center_insights/v1/contact_center_insights" +require "google/cloud/contact_center_insights/v1/version" + +module Google + module Cloud + module ContactCenterInsights + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/contact_center_insights/v1" + # client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/contact_center_insights/v1" + # client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/contact_center_insights/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contact_center_insights/v1/contact_center_insights.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contact_center_insights/v1/contact_center_insights.rb new file mode 100644 index 000000000000..7129051620cc --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contact_center_insights/v1/contact_center_insights.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/contact_center_insights/v1/version" + +require "google/cloud/contact_center_insights/v1/contact_center_insights/credentials" +require "google/cloud/contact_center_insights/v1/contact_center_insights/paths" +require "google/cloud/contact_center_insights/v1/contact_center_insights/operations" +require "google/cloud/contact_center_insights/v1/contact_center_insights/client" +require "google/cloud/contact_center_insights/v1/contact_center_insights/rest" + +module Google + module Cloud + module ContactCenterInsights + module V1 + ## + # An API that lets users analyze and explore their business conversation data. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/contact_center_insights/v1/contact_center_insights" + # client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/contact_center_insights/v1/contact_center_insights/rest" + # client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + module ContactCenterInsights + end + end + end + end +end + +helper_path = ::File.join __dir__, "contact_center_insights", "helpers.rb" +require "google/cloud/contact_center_insights/v1/contact_center_insights/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb new file mode 100644 index 000000000000..319b0e19800d --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb @@ -0,0 +1,4679 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/contactcenterinsights/v1/contact_center_insights_pb" + +module Google + module Cloud + module ContactCenterInsights + module V1 + module ContactCenterInsights + ## + # Client for the ContactCenterInsights service. + # + # An API that lets users analyze and explore their business conversation data. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "contactcenterinsights.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :contact_center_insights_stub + + ## + # Configure the ContactCenterInsights Client class. + # + # See {::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ContactCenterInsights clients + # ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "ContactCenterInsights", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ContactCenterInsights Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @contact_center_insights_stub.universe_domain + end + + ## + # Create a new ContactCenterInsights client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ContactCenterInsights client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/contactcenterinsights/v1/contact_center_insights_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @contact_center_insights_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Operations] + # + attr_reader :operations_client + + # Service calls + + ## + # Creates a conversation. + # Note that this method does not support audio transcription or redaction. + # Use `conversations.upload` instead. + # + # @overload create_conversation(request, options = nil) + # Pass arguments to `create_conversation` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::CreateConversationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::CreateConversationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_conversation(parent: nil, conversation: nil, conversation_id: nil) + # Pass arguments to `create_conversation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource of the conversation. + # @param conversation [::Google::Cloud::ContactCenterInsights::V1::Conversation, ::Hash] + # Required. The conversation resource to create. + # @param conversation_id [::String] + # 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 `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::Conversation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::Conversation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::CreateConversationRequest.new + # + # # Call the create_conversation method. + # result = client.create_conversation request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Conversation. + # p result + # + def create_conversation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreateConversationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_conversation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_conversation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_conversation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :create_conversation, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a long-running conversation upload operation. This method differs + # from `CreateConversation` by allowing audio transcription and optional DLP + # redaction. + # + # @overload upload_conversation(request, options = nil) + # Pass arguments to `upload_conversation` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::UploadConversationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::UploadConversationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload upload_conversation(parent: nil, conversation: nil, conversation_id: nil, redaction_config: nil, speech_config: nil) + # Pass arguments to `upload_conversation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource of the conversation. + # @param conversation [::Google::Cloud::ContactCenterInsights::V1::Conversation, ::Hash] + # Required. The conversation resource to create. + # @param conversation_id [::String] + # 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 `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-` + # @param redaction_config [::Google::Cloud::ContactCenterInsights::V1::RedactionConfig, ::Hash] + # Optional. DLP settings for transcript redaction. Will default to the config + # specified in Settings. + # @param speech_config [::Google::Cloud::ContactCenterInsights::V1::SpeechConfig, ::Hash] + # Optional. Speech-to-Text configuration. Will default to the config + # specified in Settings. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::UploadConversationRequest.new + # + # # Call the upload_conversation method. + # result = client.upload_conversation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def upload_conversation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UploadConversationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.upload_conversation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.upload_conversation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.upload_conversation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :upload_conversation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a conversation. + # + # @overload update_conversation(request, options = nil) + # Pass arguments to `update_conversation` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::UpdateConversationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::UpdateConversationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_conversation(conversation: nil, update_mask: nil) + # Pass arguments to `update_conversation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param conversation [::Google::Cloud::ContactCenterInsights::V1::Conversation, ::Hash] + # Required. The new values for the conversation. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # 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: + # + # * `agent_id` + # * `language_code` + # * `labels` + # * `metadata` + # * `quality_metadata` + # * `call_metadata` + # * `start_time` + # * `expire_time` or `ttl` + # * `data_source.gcs_source.audio_uri` or + # `data_source.dialogflow_source.audio_uri` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::Conversation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::Conversation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::UpdateConversationRequest.new + # + # # Call the update_conversation method. + # result = client.update_conversation request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Conversation. + # p result + # + def update_conversation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateConversationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_conversation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.conversation&.name + header_params["conversation.name"] = request.conversation.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_conversation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_conversation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :update_conversation, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a conversation. + # + # @overload get_conversation(request, options = nil) + # Pass arguments to `get_conversation` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::GetConversationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::GetConversationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_conversation(name: nil, view: nil) + # Pass arguments to `get_conversation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the conversation to get. + # @param view [::Google::Cloud::ContactCenterInsights::V1::ConversationView] + # The level of details of the conversation. Default is `FULL`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::Conversation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::Conversation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::GetConversationRequest.new + # + # # Call the get_conversation method. + # result = client.get_conversation request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Conversation. + # p result + # + def get_conversation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetConversationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_conversation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_conversation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_conversation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :get_conversation, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists conversations. + # + # @overload list_conversations(request, options = nil) + # Pass arguments to `list_conversations` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::ListConversationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::ListConversationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_conversations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) + # Pass arguments to `list_conversations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource of the conversation. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # A filter to reduce results to a specific subset. Useful for querying + # conversations with specific properties. + # @param order_by [::String] + # 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 view [::Google::Cloud::ContactCenterInsights::V1::ConversationView] + # The level of details of the conversation. Default is `BASIC`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::Conversation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::Conversation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::ListConversationsRequest.new + # + # # Call the list_conversations method. + # result = client.list_conversations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ContactCenterInsights::V1::Conversation. + # p item + # end + # + def list_conversations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListConversationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_conversations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_conversations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_conversations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :list_conversations, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @contact_center_insights_stub, :list_conversations, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a conversation. + # + # @overload delete_conversation(request, options = nil) + # Pass arguments to `delete_conversation` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::DeleteConversationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::DeleteConversationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_conversation(name: nil, force: nil) + # Pass arguments to `delete_conversation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the conversation to delete. + # @param force [::Boolean] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::DeleteConversationRequest.new + # + # # Call the delete_conversation method. + # result = client.delete_conversation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_conversation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteConversationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_conversation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_conversation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_conversation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :delete_conversation, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an analysis. The long running operation is done when the analysis + # has completed. + # + # @overload create_analysis(request, options = nil) + # Pass arguments to `create_analysis` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_analysis(parent: nil, analysis: nil) + # Pass arguments to `create_analysis` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource of the analysis. + # @param analysis [::Google::Cloud::ContactCenterInsights::V1::Analysis, ::Hash] + # Required. The analysis to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRequest.new + # + # # Call the create_analysis method. + # result = client.create_analysis request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_analysis request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_analysis.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_analysis.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_analysis.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :create_analysis, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an analysis. + # + # @overload get_analysis(request, options = nil) + # Pass arguments to `get_analysis` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::GetAnalysisRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::GetAnalysisRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_analysis(name: nil) + # Pass arguments to `get_analysis` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the analysis to get. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::Analysis] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::Analysis] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::GetAnalysisRequest.new + # + # # Call the get_analysis method. + # result = client.get_analysis request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Analysis. + # p result + # + def get_analysis request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetAnalysisRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_analysis.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_analysis.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_analysis.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :get_analysis, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists analyses. + # + # @overload list_analyses(request, options = nil) + # Pass arguments to `list_analyses` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::ListAnalysesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::ListAnalysesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_analyses(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_analyses` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource of the analyses. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # A filter to reduce results to a specific subset. Useful for querying + # conversations with specific properties. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::Analysis>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::Analysis>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::ListAnalysesRequest.new + # + # # Call the list_analyses method. + # result = client.list_analyses request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ContactCenterInsights::V1::Analysis. + # p item + # end + # + def list_analyses request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListAnalysesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_analyses.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_analyses.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_analyses.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :list_analyses, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @contact_center_insights_stub, :list_analyses, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an analysis. + # + # @overload delete_analysis(request, options = nil) + # Pass arguments to `delete_analysis` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_analysis(name: nil) + # Pass arguments to `delete_analysis` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the analysis to delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRequest.new + # + # # Call the delete_analysis method. + # result = client.delete_analysis request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_analysis request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_analysis.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_analysis.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_analysis.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :delete_analysis, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Analyzes multiple conversations in a single request. + # + # @overload bulk_analyze_conversations(request, options = nil) + # Pass arguments to `bulk_analyze_conversations` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::BulkAnalyzeConversationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::BulkAnalyzeConversationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload bulk_analyze_conversations(parent: nil, filter: nil, analysis_percentage: nil, annotator_selector: nil) + # Pass arguments to `bulk_analyze_conversations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource to create analyses in. + # @param filter [::String] + # Required. Filter used to select the subset of conversations to analyze. + # @param analysis_percentage [::Float] + # Required. Percentage of selected conversation to analyze, between + # [0, 100]. + # @param annotator_selector [::Google::Cloud::ContactCenterInsights::V1::AnnotatorSelector, ::Hash] + # To select the annotators to run and the phrase matchers to use + # (if any). If not specified, all annotators will be run. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::BulkAnalyzeConversationsRequest.new + # + # # Call the bulk_analyze_conversations method. + # result = client.bulk_analyze_conversations request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def bulk_analyze_conversations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::BulkAnalyzeConversationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.bulk_analyze_conversations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.bulk_analyze_conversations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.bulk_analyze_conversations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :bulk_analyze_conversations, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes multiple conversations in a single request. + # + # @overload bulk_delete_conversations(request, options = nil) + # Pass arguments to `bulk_delete_conversations` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::BulkDeleteConversationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::BulkDeleteConversationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload bulk_delete_conversations(parent: nil, filter: nil, max_delete_count: nil, force: nil) + # Pass arguments to `bulk_delete_conversations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource to delete conversations from. + # Format: + # projects/\\{project}/locations/\\{location} + # @param filter [::String] + # Filter used to select the subset of conversations to delete. + # @param max_delete_count [::Integer] + # Maximum number of conversations to delete. + # @param force [::Boolean] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::BulkDeleteConversationsRequest.new + # + # # Call the bulk_delete_conversations method. + # result = client.bulk_delete_conversations request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def bulk_delete_conversations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::BulkDeleteConversationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.bulk_delete_conversations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.bulk_delete_conversations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.bulk_delete_conversations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :bulk_delete_conversations, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Imports conversations and processes them according to the user's + # configuration. + # + # @overload ingest_conversations(request, options = nil) + # Pass arguments to `ingest_conversations` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload ingest_conversations(gcs_source: nil, transcript_object_config: nil, parent: nil, conversation_config: nil, redaction_config: nil, speech_config: nil, sample_size: nil) + # Pass arguments to `ingest_conversations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param gcs_source [::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest::GcsSource, ::Hash] + # A cloud storage bucket source. Note that any previously ingested objects + # from the source will be skipped to avoid duplication. + # @param transcript_object_config [::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest::TranscriptObjectConfig, ::Hash] + # Configuration for when `source` contains conversation transcripts. + # @param parent [::String] + # Required. The parent resource for new conversations. + # @param conversation_config [::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest::ConversationConfig, ::Hash] + # Configuration that applies to all conversations. + # @param redaction_config [::Google::Cloud::ContactCenterInsights::V1::RedactionConfig, ::Hash] + # Optional. DLP settings for transcript redaction. Optional, will default to + # the config specified in Settings. + # @param speech_config [::Google::Cloud::ContactCenterInsights::V1::SpeechConfig, ::Hash] + # Optional. Default Speech-to-Text configuration. Optional, will default to + # the config specified in Settings. + # @param sample_size [::Integer] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest.new + # + # # Call the ingest_conversations method. + # result = client.ingest_conversations request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def ingest_conversations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.ingest_conversations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.ingest_conversations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.ingest_conversations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :ingest_conversations, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Export insights data to a destination defined in the request body. + # + # @overload export_insights_data(request, options = nil) + # Pass arguments to `export_insights_data` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload export_insights_data(big_query_destination: nil, parent: nil, filter: nil, kms_key: nil, write_disposition: nil) + # Pass arguments to `export_insights_data` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param big_query_destination [::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest::BigQueryDestination, ::Hash] + # Specified if sink is a BigQuery table. + # @param parent [::String] + # Required. The parent resource to export data from. + # @param filter [::String] + # A filter to reduce results to a specific subset. Useful for exporting + # conversations with specific properties. + # @param kms_key [::String] + # A fully qualified KMS key name for BigQuery tables protected by CMEK. + # Format: + # projects/\\{project}/locations/\\{location}/keyRings/\\{keyring}/cryptoKeys/\\{key}/cryptoKeyVersions/\\{version} + # @param write_disposition [::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest::WriteDisposition] + # Options for what to do if the destination table already exists. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest.new + # + # # Call the export_insights_data method. + # result = client.export_insights_data request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_insights_data request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.export_insights_data.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.export_insights_data.timeout, + metadata: metadata, + retry_policy: @config.rpcs.export_insights_data.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :export_insights_data, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an issue model. + # + # @overload create_issue_model(request, options = nil) + # Pass arguments to `create_issue_model` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::CreateIssueModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::CreateIssueModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_issue_model(parent: nil, issue_model: nil) + # Pass arguments to `create_issue_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource of the issue model. + # @param issue_model [::Google::Cloud::ContactCenterInsights::V1::IssueModel, ::Hash] + # Required. The issue model to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::CreateIssueModelRequest.new + # + # # Call the create_issue_model method. + # result = client.create_issue_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_issue_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreateIssueModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_issue_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_issue_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_issue_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :create_issue_model, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an issue model. + # + # @overload update_issue_model(request, options = nil) + # Pass arguments to `update_issue_model` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::UpdateIssueModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::UpdateIssueModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_issue_model(issue_model: nil, update_mask: nil) + # Pass arguments to `update_issue_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param issue_model [::Google::Cloud::ContactCenterInsights::V1::IssueModel, ::Hash] + # Required. The new values for the issue model. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::IssueModel] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::IssueModel] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::UpdateIssueModelRequest.new + # + # # Call the update_issue_model method. + # result = client.update_issue_model request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::IssueModel. + # p result + # + def update_issue_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateIssueModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_issue_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.issue_model&.name + header_params["issue_model.name"] = request.issue_model.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_issue_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_issue_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :update_issue_model, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an issue model. + # + # @overload get_issue_model(request, options = nil) + # Pass arguments to `get_issue_model` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::GetIssueModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::GetIssueModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_issue_model(name: nil) + # Pass arguments to `get_issue_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the issue model to get. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::IssueModel] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::IssueModel] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::GetIssueModelRequest.new + # + # # Call the get_issue_model method. + # result = client.get_issue_model request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::IssueModel. + # p result + # + def get_issue_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetIssueModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_issue_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_issue_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_issue_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :get_issue_model, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists issue models. + # + # @overload list_issue_models(request, options = nil) + # Pass arguments to `list_issue_models` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_issue_models(parent: nil) + # Pass arguments to `list_issue_models` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource of the issue model. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::ListIssueModelsRequest.new + # + # # Call the list_issue_models method. + # result = client.list_issue_models request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::ListIssueModelsResponse. + # p result + # + def list_issue_models request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_issue_models.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_issue_models.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_issue_models.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :list_issue_models, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an issue model. + # + # @overload delete_issue_model(request, options = nil) + # Pass arguments to `delete_issue_model` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::DeleteIssueModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::DeleteIssueModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_issue_model(name: nil) + # Pass arguments to `delete_issue_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the issue model to delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::DeleteIssueModelRequest.new + # + # # Call the delete_issue_model method. + # result = client.delete_issue_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_issue_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteIssueModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_issue_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_issue_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_issue_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :delete_issue_model, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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. + # + # @overload deploy_issue_model(request, options = nil) + # Pass arguments to `deploy_issue_model` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::DeployIssueModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::DeployIssueModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload deploy_issue_model(name: nil) + # Pass arguments to `deploy_issue_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The issue model to deploy. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::DeployIssueModelRequest.new + # + # # Call the deploy_issue_model method. + # result = client.deploy_issue_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def deploy_issue_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeployIssueModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.deploy_issue_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.deploy_issue_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.deploy_issue_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :deploy_issue_model, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Undeploys an issue model. + # An issue model can not be used in analysis after it has been undeployed. + # + # @overload undeploy_issue_model(request, options = nil) + # Pass arguments to `undeploy_issue_model` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::UndeployIssueModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::UndeployIssueModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload undeploy_issue_model(name: nil) + # Pass arguments to `undeploy_issue_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The issue model to undeploy. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::UndeployIssueModelRequest.new + # + # # Call the undeploy_issue_model method. + # result = client.undeploy_issue_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def undeploy_issue_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UndeployIssueModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.undeploy_issue_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.undeploy_issue_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.undeploy_issue_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :undeploy_issue_model, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Exports an issue model to the provided destination. + # + # @overload export_issue_model(request, options = nil) + # Pass arguments to `export_issue_model` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::ExportIssueModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::ExportIssueModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload export_issue_model(gcs_destination: nil, name: nil) + # Pass arguments to `export_issue_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param gcs_destination [::Google::Cloud::ContactCenterInsights::V1::ExportIssueModelRequest::GcsDestination, ::Hash] + # Google Cloud Storage URI to export the issue model to. + # @param name [::String] + # Required. The issue model to export. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::ExportIssueModelRequest.new + # + # # Call the export_issue_model method. + # result = client.export_issue_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_issue_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ExportIssueModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.export_issue_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.export_issue_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.export_issue_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :export_issue_model, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Imports an issue model from a Cloud Storage bucket. + # + # @overload import_issue_model(request, options = nil) + # Pass arguments to `import_issue_model` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::ImportIssueModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::ImportIssueModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload import_issue_model(gcs_source: nil, parent: nil, create_new_model: nil) + # Pass arguments to `import_issue_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param gcs_source [::Google::Cloud::ContactCenterInsights::V1::ImportIssueModelRequest::GcsSource, ::Hash] + # Google Cloud Storage source message. + # @param parent [::String] + # Required. The parent resource of the issue model. + # @param create_new_model [::Boolean] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::ImportIssueModelRequest.new + # + # # Call the import_issue_model method. + # result = client.import_issue_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def import_issue_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ImportIssueModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.import_issue_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.import_issue_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.import_issue_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :import_issue_model, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an issue. + # + # @overload get_issue(request, options = nil) + # Pass arguments to `get_issue` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::GetIssueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::GetIssueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_issue(name: nil) + # Pass arguments to `get_issue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the issue to get. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::Issue] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::Issue] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::GetIssueRequest.new + # + # # Call the get_issue method. + # result = client.get_issue request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Issue. + # p result + # + def get_issue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetIssueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_issue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_issue.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_issue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :get_issue, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists issues. + # + # @overload list_issues(request, options = nil) + # Pass arguments to `list_issues` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::ListIssuesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::ListIssuesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_issues(parent: nil) + # Pass arguments to `list_issues` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource of the issue. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::ListIssuesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::ListIssuesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::ListIssuesRequest.new + # + # # Call the list_issues method. + # result = client.list_issues request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::ListIssuesResponse. + # p result + # + def list_issues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListIssuesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_issues.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_issues.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_issues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :list_issues, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an issue. + # + # @overload update_issue(request, options = nil) + # Pass arguments to `update_issue` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::UpdateIssueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::UpdateIssueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_issue(issue: nil, update_mask: nil) + # Pass arguments to `update_issue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param issue [::Google::Cloud::ContactCenterInsights::V1::Issue, ::Hash] + # Required. The new values for the issue. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::Issue] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::Issue] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::UpdateIssueRequest.new + # + # # Call the update_issue method. + # result = client.update_issue request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Issue. + # p result + # + def update_issue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateIssueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_issue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.issue&.name + header_params["issue.name"] = request.issue.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_issue.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_issue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :update_issue, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an issue. + # + # @overload delete_issue(request, options = nil) + # Pass arguments to `delete_issue` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::DeleteIssueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::DeleteIssueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_issue(name: nil) + # Pass arguments to `delete_issue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the issue to delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::DeleteIssueRequest.new + # + # # Call the delete_issue method. + # result = client.delete_issue request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_issue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteIssueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_issue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_issue.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_issue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :delete_issue, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an issue model's statistics. + # + # @overload calculate_issue_model_stats(request, options = nil) + # Pass arguments to `calculate_issue_model_stats` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload calculate_issue_model_stats(issue_model: nil) + # Pass arguments to `calculate_issue_model_stats` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param issue_model [::String] + # Required. The resource name of the issue model to query against. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsRequest.new + # + # # Call the calculate_issue_model_stats method. + # result = client.calculate_issue_model_stats request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsResponse. + # p result + # + def calculate_issue_model_stats request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.calculate_issue_model_stats.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.issue_model + header_params["issue_model"] = request.issue_model + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.calculate_issue_model_stats.timeout, + metadata: metadata, + retry_policy: @config.rpcs.calculate_issue_model_stats.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :calculate_issue_model_stats, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a phrase matcher. + # + # @overload create_phrase_matcher(request, options = nil) + # Pass arguments to `create_phrase_matcher` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::CreatePhraseMatcherRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::CreatePhraseMatcherRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_phrase_matcher(parent: nil, phrase_matcher: nil) + # Pass arguments to `create_phrase_matcher` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource of the phrase matcher. Required. The location + # to create a phrase matcher for. Format: `projects//locations/` or `projects//locations/` + # @param phrase_matcher [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher, ::Hash] + # Required. The phrase matcher resource to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::CreatePhraseMatcherRequest.new + # + # # Call the create_phrase_matcher method. + # result = client.create_phrase_matcher request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::PhraseMatcher. + # p result + # + def create_phrase_matcher request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreatePhraseMatcherRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_phrase_matcher.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_phrase_matcher.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_phrase_matcher.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :create_phrase_matcher, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a phrase matcher. + # + # @overload get_phrase_matcher(request, options = nil) + # Pass arguments to `get_phrase_matcher` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::GetPhraseMatcherRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::GetPhraseMatcherRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_phrase_matcher(name: nil) + # Pass arguments to `get_phrase_matcher` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the phrase matcher to get. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::GetPhraseMatcherRequest.new + # + # # Call the get_phrase_matcher method. + # result = client.get_phrase_matcher request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::PhraseMatcher. + # p result + # + def get_phrase_matcher request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetPhraseMatcherRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_phrase_matcher.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_phrase_matcher.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_phrase_matcher.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :get_phrase_matcher, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists phrase matchers. + # + # @overload list_phrase_matchers(request, options = nil) + # Pass arguments to `list_phrase_matchers` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_phrase_matchers(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_phrase_matchers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource of the phrase matcher. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # A filter to reduce results to a specific subset. Useful for querying + # phrase matchers with specific properties. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersRequest.new + # + # # Call the list_phrase_matchers method. + # result = client.list_phrase_matchers request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher. + # p item + # end + # + def list_phrase_matchers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_phrase_matchers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_phrase_matchers.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_phrase_matchers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :list_phrase_matchers, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @contact_center_insights_stub, :list_phrase_matchers, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a phrase matcher. + # + # @overload delete_phrase_matcher(request, options = nil) + # Pass arguments to `delete_phrase_matcher` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::DeletePhraseMatcherRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::DeletePhraseMatcherRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_phrase_matcher(name: nil) + # Pass arguments to `delete_phrase_matcher` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the phrase matcher to delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::DeletePhraseMatcherRequest.new + # + # # Call the delete_phrase_matcher method. + # result = client.delete_phrase_matcher request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_phrase_matcher request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeletePhraseMatcherRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_phrase_matcher.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_phrase_matcher.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_phrase_matcher.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :delete_phrase_matcher, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a phrase matcher. + # + # @overload update_phrase_matcher(request, options = nil) + # Pass arguments to `update_phrase_matcher` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::UpdatePhraseMatcherRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::UpdatePhraseMatcherRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_phrase_matcher(phrase_matcher: nil, update_mask: nil) + # Pass arguments to `update_phrase_matcher` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param phrase_matcher [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher, ::Hash] + # Required. The new values for the phrase matcher. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::UpdatePhraseMatcherRequest.new + # + # # Call the update_phrase_matcher method. + # result = client.update_phrase_matcher request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::PhraseMatcher. + # p result + # + def update_phrase_matcher request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdatePhraseMatcherRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_phrase_matcher.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.phrase_matcher&.name + header_params["phrase_matcher.name"] = request.phrase_matcher.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_phrase_matcher.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_phrase_matcher.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :update_phrase_matcher, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets conversation statistics. + # + # @overload calculate_stats(request, options = nil) + # Pass arguments to `calculate_stats` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::CalculateStatsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::CalculateStatsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload calculate_stats(location: nil, filter: nil) + # Pass arguments to `calculate_stats` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param location [::String] + # Required. The location of the conversations. + # @param filter [::String] + # A filter to reduce results to a specific subset. This field is useful for + # getting statistics about conversations with specific properties. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::CalculateStatsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::CalculateStatsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::CalculateStatsRequest.new + # + # # Call the calculate_stats method. + # result = client.calculate_stats request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::CalculateStatsResponse. + # p result + # + def calculate_stats request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CalculateStatsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.calculate_stats.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.location + header_params["location"] = request.location + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.calculate_stats.timeout, + metadata: metadata, + retry_policy: @config.rpcs.calculate_stats.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :calculate_stats, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets project-level settings. + # + # @overload get_settings(request, options = nil) + # Pass arguments to `get_settings` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::GetSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::GetSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_settings(name: nil) + # Pass arguments to `get_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the settings resource to get. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::Settings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::Settings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::GetSettingsRequest.new + # + # # Call the get_settings method. + # result = client.get_settings request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Settings. + # p result + # + def get_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :get_settings, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates project-level settings. + # + # @overload update_settings(request, options = nil) + # Pass arguments to `update_settings` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::UpdateSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::UpdateSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_settings(settings: nil, update_mask: nil) + # Pass arguments to `update_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param settings [::Google::Cloud::ContactCenterInsights::V1::Settings, ::Hash] + # Required. The new settings values. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::Settings] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::Settings] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::UpdateSettingsRequest.new + # + # # Call the update_settings method. + # result = client.update_settings request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Settings. + # p result + # + def update_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.settings&.name + header_params["settings.name"] = request.settings.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :update_settings, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets location-level encryption key specification. + # + # @overload get_encryption_spec(request, options = nil) + # Pass arguments to `get_encryption_spec` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::GetEncryptionSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::GetEncryptionSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_encryption_spec(name: nil) + # Pass arguments to `get_encryption_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the encryption spec resource to get. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::EncryptionSpec] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::EncryptionSpec] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::GetEncryptionSpecRequest.new + # + # # Call the get_encryption_spec method. + # result = client.get_encryption_spec request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::EncryptionSpec. + # p result + # + def get_encryption_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetEncryptionSpecRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_encryption_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_encryption_spec.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_encryption_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :get_encryption_spec, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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. + # + # @overload initialize_encryption_spec(request, options = nil) + # Pass arguments to `initialize_encryption_spec` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::InitializeEncryptionSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::InitializeEncryptionSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload initialize_encryption_spec(encryption_spec: nil) + # Pass arguments to `initialize_encryption_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param encryption_spec [::Google::Cloud::ContactCenterInsights::V1::EncryptionSpec, ::Hash] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::InitializeEncryptionSpecRequest.new + # + # # Call the initialize_encryption_spec method. + # result = client.initialize_encryption_spec request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def initialize_encryption_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::InitializeEncryptionSpecRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.initialize_encryption_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.encryption_spec&.name + header_params["encryption_spec.name"] = request.encryption_spec.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.initialize_encryption_spec.timeout, + metadata: metadata, + retry_policy: @config.rpcs.initialize_encryption_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :initialize_encryption_spec, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a view. + # + # @overload create_view(request, options = nil) + # Pass arguments to `create_view` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::CreateViewRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::CreateViewRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_view(parent: nil, view: nil) + # Pass arguments to `create_view` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource of the view. Required. The location to create + # a view for. + # Format: `projects//locations/` or + # `projects//locations/` + # @param view [::Google::Cloud::ContactCenterInsights::V1::View, ::Hash] + # Required. The view resource to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::View] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::View] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::CreateViewRequest.new + # + # # Call the create_view method. + # result = client.create_view request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::View. + # p result + # + def create_view request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreateViewRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_view.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_view.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_view.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :create_view, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a view. + # + # @overload get_view(request, options = nil) + # Pass arguments to `get_view` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::GetViewRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::GetViewRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_view(name: nil) + # Pass arguments to `get_view` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the view to get. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::View] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::View] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::GetViewRequest.new + # + # # Call the get_view method. + # result = client.get_view request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::View. + # p result + # + def get_view request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetViewRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_view.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_view.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_view.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :get_view, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists views. + # + # @overload list_views(request, options = nil) + # Pass arguments to `list_views` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::ListViewsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::ListViewsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_views(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_views` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource of the views. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::View>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::View>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::ListViewsRequest.new + # + # # Call the list_views method. + # result = client.list_views request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ContactCenterInsights::V1::View. + # p item + # end + # + def list_views request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListViewsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_views.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_views.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_views.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :list_views, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @contact_center_insights_stub, :list_views, request, response, operation, options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a view. + # + # @overload update_view(request, options = nil) + # Pass arguments to `update_view` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::UpdateViewRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::UpdateViewRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_view(view: nil, update_mask: nil) + # Pass arguments to `update_view` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param view [::Google::Cloud::ContactCenterInsights::V1::View, ::Hash] + # Required. The new view. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::View] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::View] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::UpdateViewRequest.new + # + # # Call the update_view method. + # result = client.update_view request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::View. + # p result + # + def update_view request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateViewRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_view.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.view&.name + header_params["view.name"] = request.view.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_view.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_view.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :update_view, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a view. + # + # @overload delete_view(request, options = nil) + # Pass arguments to `delete_view` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::DeleteViewRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::DeleteViewRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_view(name: nil) + # Pass arguments to `delete_view` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the view to delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::DeleteViewRequest.new + # + # # Call the delete_view method. + # result = client.delete_view request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_view request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteViewRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_view.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_view.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_view.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.call_rpc :delete_view, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ContactCenterInsights API. + # + # This class represents the configuration for ContactCenterInsights, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_conversation to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_conversation.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_conversation.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "contactcenterinsights.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ContactCenterInsights API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_conversation` + # @return [::Gapic::Config::Method] + # + attr_reader :create_conversation + ## + # RPC-specific configuration for `upload_conversation` + # @return [::Gapic::Config::Method] + # + attr_reader :upload_conversation + ## + # RPC-specific configuration for `update_conversation` + # @return [::Gapic::Config::Method] + # + attr_reader :update_conversation + ## + # RPC-specific configuration for `get_conversation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_conversation + ## + # RPC-specific configuration for `list_conversations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_conversations + ## + # RPC-specific configuration for `delete_conversation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_conversation + ## + # RPC-specific configuration for `create_analysis` + # @return [::Gapic::Config::Method] + # + attr_reader :create_analysis + ## + # RPC-specific configuration for `get_analysis` + # @return [::Gapic::Config::Method] + # + attr_reader :get_analysis + ## + # RPC-specific configuration for `list_analyses` + # @return [::Gapic::Config::Method] + # + attr_reader :list_analyses + ## + # RPC-specific configuration for `delete_analysis` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_analysis + ## + # RPC-specific configuration for `bulk_analyze_conversations` + # @return [::Gapic::Config::Method] + # + attr_reader :bulk_analyze_conversations + ## + # RPC-specific configuration for `bulk_delete_conversations` + # @return [::Gapic::Config::Method] + # + attr_reader :bulk_delete_conversations + ## + # RPC-specific configuration for `ingest_conversations` + # @return [::Gapic::Config::Method] + # + attr_reader :ingest_conversations + ## + # RPC-specific configuration for `export_insights_data` + # @return [::Gapic::Config::Method] + # + attr_reader :export_insights_data + ## + # RPC-specific configuration for `create_issue_model` + # @return [::Gapic::Config::Method] + # + attr_reader :create_issue_model + ## + # RPC-specific configuration for `update_issue_model` + # @return [::Gapic::Config::Method] + # + attr_reader :update_issue_model + ## + # RPC-specific configuration for `get_issue_model` + # @return [::Gapic::Config::Method] + # + attr_reader :get_issue_model + ## + # RPC-specific configuration for `list_issue_models` + # @return [::Gapic::Config::Method] + # + attr_reader :list_issue_models + ## + # RPC-specific configuration for `delete_issue_model` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_issue_model + ## + # RPC-specific configuration for `deploy_issue_model` + # @return [::Gapic::Config::Method] + # + attr_reader :deploy_issue_model + ## + # RPC-specific configuration for `undeploy_issue_model` + # @return [::Gapic::Config::Method] + # + attr_reader :undeploy_issue_model + ## + # RPC-specific configuration for `export_issue_model` + # @return [::Gapic::Config::Method] + # + attr_reader :export_issue_model + ## + # RPC-specific configuration for `import_issue_model` + # @return [::Gapic::Config::Method] + # + attr_reader :import_issue_model + ## + # RPC-specific configuration for `get_issue` + # @return [::Gapic::Config::Method] + # + attr_reader :get_issue + ## + # RPC-specific configuration for `list_issues` + # @return [::Gapic::Config::Method] + # + attr_reader :list_issues + ## + # RPC-specific configuration for `update_issue` + # @return [::Gapic::Config::Method] + # + attr_reader :update_issue + ## + # RPC-specific configuration for `delete_issue` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_issue + ## + # RPC-specific configuration for `calculate_issue_model_stats` + # @return [::Gapic::Config::Method] + # + attr_reader :calculate_issue_model_stats + ## + # RPC-specific configuration for `create_phrase_matcher` + # @return [::Gapic::Config::Method] + # + attr_reader :create_phrase_matcher + ## + # RPC-specific configuration for `get_phrase_matcher` + # @return [::Gapic::Config::Method] + # + attr_reader :get_phrase_matcher + ## + # RPC-specific configuration for `list_phrase_matchers` + # @return [::Gapic::Config::Method] + # + attr_reader :list_phrase_matchers + ## + # RPC-specific configuration for `delete_phrase_matcher` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_phrase_matcher + ## + # RPC-specific configuration for `update_phrase_matcher` + # @return [::Gapic::Config::Method] + # + attr_reader :update_phrase_matcher + ## + # RPC-specific configuration for `calculate_stats` + # @return [::Gapic::Config::Method] + # + attr_reader :calculate_stats + ## + # RPC-specific configuration for `get_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_settings + ## + # RPC-specific configuration for `update_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :update_settings + ## + # RPC-specific configuration for `get_encryption_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :get_encryption_spec + ## + # RPC-specific configuration for `initialize_encryption_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :initialize_encryption_spec + ## + # RPC-specific configuration for `create_view` + # @return [::Gapic::Config::Method] + # + attr_reader :create_view + ## + # RPC-specific configuration for `get_view` + # @return [::Gapic::Config::Method] + # + attr_reader :get_view + ## + # RPC-specific configuration for `list_views` + # @return [::Gapic::Config::Method] + # + attr_reader :list_views + ## + # RPC-specific configuration for `update_view` + # @return [::Gapic::Config::Method] + # + attr_reader :update_view + ## + # RPC-specific configuration for `delete_view` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_view + + # @private + def initialize parent_rpcs = nil + create_conversation_config = parent_rpcs.create_conversation if parent_rpcs.respond_to? :create_conversation + @create_conversation = ::Gapic::Config::Method.new create_conversation_config + upload_conversation_config = parent_rpcs.upload_conversation if parent_rpcs.respond_to? :upload_conversation + @upload_conversation = ::Gapic::Config::Method.new upload_conversation_config + update_conversation_config = parent_rpcs.update_conversation if parent_rpcs.respond_to? :update_conversation + @update_conversation = ::Gapic::Config::Method.new update_conversation_config + get_conversation_config = parent_rpcs.get_conversation if parent_rpcs.respond_to? :get_conversation + @get_conversation = ::Gapic::Config::Method.new get_conversation_config + list_conversations_config = parent_rpcs.list_conversations if parent_rpcs.respond_to? :list_conversations + @list_conversations = ::Gapic::Config::Method.new list_conversations_config + delete_conversation_config = parent_rpcs.delete_conversation if parent_rpcs.respond_to? :delete_conversation + @delete_conversation = ::Gapic::Config::Method.new delete_conversation_config + create_analysis_config = parent_rpcs.create_analysis if parent_rpcs.respond_to? :create_analysis + @create_analysis = ::Gapic::Config::Method.new create_analysis_config + get_analysis_config = parent_rpcs.get_analysis if parent_rpcs.respond_to? :get_analysis + @get_analysis = ::Gapic::Config::Method.new get_analysis_config + list_analyses_config = parent_rpcs.list_analyses if parent_rpcs.respond_to? :list_analyses + @list_analyses = ::Gapic::Config::Method.new list_analyses_config + delete_analysis_config = parent_rpcs.delete_analysis if parent_rpcs.respond_to? :delete_analysis + @delete_analysis = ::Gapic::Config::Method.new delete_analysis_config + bulk_analyze_conversations_config = parent_rpcs.bulk_analyze_conversations if parent_rpcs.respond_to? :bulk_analyze_conversations + @bulk_analyze_conversations = ::Gapic::Config::Method.new bulk_analyze_conversations_config + bulk_delete_conversations_config = parent_rpcs.bulk_delete_conversations if parent_rpcs.respond_to? :bulk_delete_conversations + @bulk_delete_conversations = ::Gapic::Config::Method.new bulk_delete_conversations_config + ingest_conversations_config = parent_rpcs.ingest_conversations if parent_rpcs.respond_to? :ingest_conversations + @ingest_conversations = ::Gapic::Config::Method.new ingest_conversations_config + export_insights_data_config = parent_rpcs.export_insights_data if parent_rpcs.respond_to? :export_insights_data + @export_insights_data = ::Gapic::Config::Method.new export_insights_data_config + create_issue_model_config = parent_rpcs.create_issue_model if parent_rpcs.respond_to? :create_issue_model + @create_issue_model = ::Gapic::Config::Method.new create_issue_model_config + update_issue_model_config = parent_rpcs.update_issue_model if parent_rpcs.respond_to? :update_issue_model + @update_issue_model = ::Gapic::Config::Method.new update_issue_model_config + get_issue_model_config = parent_rpcs.get_issue_model if parent_rpcs.respond_to? :get_issue_model + @get_issue_model = ::Gapic::Config::Method.new get_issue_model_config + list_issue_models_config = parent_rpcs.list_issue_models if parent_rpcs.respond_to? :list_issue_models + @list_issue_models = ::Gapic::Config::Method.new list_issue_models_config + delete_issue_model_config = parent_rpcs.delete_issue_model if parent_rpcs.respond_to? :delete_issue_model + @delete_issue_model = ::Gapic::Config::Method.new delete_issue_model_config + deploy_issue_model_config = parent_rpcs.deploy_issue_model if parent_rpcs.respond_to? :deploy_issue_model + @deploy_issue_model = ::Gapic::Config::Method.new deploy_issue_model_config + undeploy_issue_model_config = parent_rpcs.undeploy_issue_model if parent_rpcs.respond_to? :undeploy_issue_model + @undeploy_issue_model = ::Gapic::Config::Method.new undeploy_issue_model_config + export_issue_model_config = parent_rpcs.export_issue_model if parent_rpcs.respond_to? :export_issue_model + @export_issue_model = ::Gapic::Config::Method.new export_issue_model_config + import_issue_model_config = parent_rpcs.import_issue_model if parent_rpcs.respond_to? :import_issue_model + @import_issue_model = ::Gapic::Config::Method.new import_issue_model_config + get_issue_config = parent_rpcs.get_issue if parent_rpcs.respond_to? :get_issue + @get_issue = ::Gapic::Config::Method.new get_issue_config + list_issues_config = parent_rpcs.list_issues if parent_rpcs.respond_to? :list_issues + @list_issues = ::Gapic::Config::Method.new list_issues_config + update_issue_config = parent_rpcs.update_issue if parent_rpcs.respond_to? :update_issue + @update_issue = ::Gapic::Config::Method.new update_issue_config + delete_issue_config = parent_rpcs.delete_issue if parent_rpcs.respond_to? :delete_issue + @delete_issue = ::Gapic::Config::Method.new delete_issue_config + calculate_issue_model_stats_config = parent_rpcs.calculate_issue_model_stats if parent_rpcs.respond_to? :calculate_issue_model_stats + @calculate_issue_model_stats = ::Gapic::Config::Method.new calculate_issue_model_stats_config + create_phrase_matcher_config = parent_rpcs.create_phrase_matcher if parent_rpcs.respond_to? :create_phrase_matcher + @create_phrase_matcher = ::Gapic::Config::Method.new create_phrase_matcher_config + get_phrase_matcher_config = parent_rpcs.get_phrase_matcher if parent_rpcs.respond_to? :get_phrase_matcher + @get_phrase_matcher = ::Gapic::Config::Method.new get_phrase_matcher_config + list_phrase_matchers_config = parent_rpcs.list_phrase_matchers if parent_rpcs.respond_to? :list_phrase_matchers + @list_phrase_matchers = ::Gapic::Config::Method.new list_phrase_matchers_config + delete_phrase_matcher_config = parent_rpcs.delete_phrase_matcher if parent_rpcs.respond_to? :delete_phrase_matcher + @delete_phrase_matcher = ::Gapic::Config::Method.new delete_phrase_matcher_config + update_phrase_matcher_config = parent_rpcs.update_phrase_matcher if parent_rpcs.respond_to? :update_phrase_matcher + @update_phrase_matcher = ::Gapic::Config::Method.new update_phrase_matcher_config + calculate_stats_config = parent_rpcs.calculate_stats if parent_rpcs.respond_to? :calculate_stats + @calculate_stats = ::Gapic::Config::Method.new calculate_stats_config + get_settings_config = parent_rpcs.get_settings if parent_rpcs.respond_to? :get_settings + @get_settings = ::Gapic::Config::Method.new get_settings_config + update_settings_config = parent_rpcs.update_settings if parent_rpcs.respond_to? :update_settings + @update_settings = ::Gapic::Config::Method.new update_settings_config + get_encryption_spec_config = parent_rpcs.get_encryption_spec if parent_rpcs.respond_to? :get_encryption_spec + @get_encryption_spec = ::Gapic::Config::Method.new get_encryption_spec_config + initialize_encryption_spec_config = parent_rpcs.initialize_encryption_spec if parent_rpcs.respond_to? :initialize_encryption_spec + @initialize_encryption_spec = ::Gapic::Config::Method.new initialize_encryption_spec_config + create_view_config = parent_rpcs.create_view if parent_rpcs.respond_to? :create_view + @create_view = ::Gapic::Config::Method.new create_view_config + get_view_config = parent_rpcs.get_view if parent_rpcs.respond_to? :get_view + @get_view = ::Gapic::Config::Method.new get_view_config + list_views_config = parent_rpcs.list_views if parent_rpcs.respond_to? :list_views + @list_views = ::Gapic::Config::Method.new list_views_config + update_view_config = parent_rpcs.update_view if parent_rpcs.respond_to? :update_view + @update_view = ::Gapic::Config::Method.new update_view_config + delete_view_config = parent_rpcs.delete_view if parent_rpcs.respond_to? :delete_view + @delete_view = ::Gapic::Config::Method.new delete_view_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contact_center_insights/v1/contact_center_insights/credentials.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contact_center_insights/v1/contact_center_insights/credentials.rb new file mode 100644 index 000000000000..05c6e15b29b5 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contact_center_insights/v1/contact_center_insights/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module ContactCenterInsights + module V1 + module ContactCenterInsights + # Credentials for the ContactCenterInsights API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contact_center_insights/v1/contact_center_insights/operations.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contact_center_insights/v1/contact_center_insights/operations.rb new file mode 100644 index 000000000000..cdb099212172 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contact_center_insights/v1/contact_center_insights/operations.rb @@ -0,0 +1,809 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module ContactCenterInsights + module V1 + module ContactCenterInsights + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "contactcenterinsights.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the ContactCenterInsights Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the ContactCenterInsights Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # NOTE: the `name` binding allows API services to override the binding + # to use different resource name schemes, such as `users/*/operations`. To + # override the binding, API services can add a binding such as + # `"/v1/{name=users/*}/operations"` to their service configuration. + # For backwards compatibility, the default name includes the operations + # collection id, however overriding users must ensure the name binding + # is the parent resource, without the operations collection id. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, + # corresponding to `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + return response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "contactcenterinsights.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contact_center_insights/v1/contact_center_insights/paths.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contact_center_insights/v1/contact_center_insights/paths.rb new file mode 100644 index 000000000000..83a5322f114d --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contact_center_insights/v1/contact_center_insights/paths.rb @@ -0,0 +1,285 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ContactCenterInsights + module V1 + module ContactCenterInsights + # Path helper methods for the ContactCenterInsights API. + module Paths + ## + # Create a fully-qualified Analysis resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/conversations/{conversation}/analyses/{analysis}` + # + # @param project [String] + # @param location [String] + # @param conversation [String] + # @param analysis [String] + # + # @return [::String] + def analysis_path project:, location:, conversation:, analysis: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "conversation cannot contain /" if conversation.to_s.include? "/" + + "projects/#{project}/locations/#{location}/conversations/#{conversation}/analyses/#{analysis}" + end + + ## + # Create a fully-qualified Conversation resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/conversations/{conversation}` + # + # @param project [String] + # @param location [String] + # @param conversation [String] + # + # @return [::String] + def conversation_path project:, location:, conversation: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/conversations/#{conversation}" + end + + ## + # Create a fully-qualified ConversationProfile resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/conversationProfiles/{conversation_profile}` + # + # @param project [String] + # @param location [String] + # @param conversation_profile [String] + # + # @return [::String] + def conversation_profile_path project:, location:, conversation_profile: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/conversationProfiles/#{conversation_profile}" + end + + ## + # Create a fully-qualified EncryptionSpec resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/encryptionSpec` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def encryption_spec_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}/encryptionSpec" + end + + ## + # Create a fully-qualified Issue resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue}` + # + # @param project [String] + # @param location [String] + # @param issue_model [String] + # @param issue [String] + # + # @return [::String] + def issue_path project:, location:, issue_model:, issue: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "issue_model cannot contain /" if issue_model.to_s.include? "/" + + "projects/#{project}/locations/#{location}/issueModels/#{issue_model}/issues/#{issue}" + end + + ## + # Create a fully-qualified IssueModel resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/issueModels/{issue_model}` + # + # @param project [String] + # @param location [String] + # @param issue_model [String] + # + # @return [::String] + def issue_model_path project:, location:, issue_model: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/issueModels/#{issue_model}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified Participant resource string. + # + # @overload participant_path(project:, conversation:, participant:) + # The resource will be in the following format: + # + # `projects/{project}/conversations/{conversation}/participants/{participant}` + # + # @param project [String] + # @param conversation [String] + # @param participant [String] + # + # @overload participant_path(project:, location:, conversation:, participant:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant}` + # + # @param project [String] + # @param location [String] + # @param conversation [String] + # @param participant [String] + # + # @return [::String] + def participant_path **args + resources = { + "conversation:participant:project" => (proc do |project:, conversation:, participant:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "conversation cannot contain /" if conversation.to_s.include? "/" + + "projects/#{project}/conversations/#{conversation}/participants/#{participant}" + end), + "conversation:location:participant:project" => (proc do |project:, location:, conversation:, participant:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "conversation cannot contain /" if conversation.to_s.include? "/" + + "projects/#{project}/locations/#{location}/conversations/#{conversation}/participants/#{participant}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified PhraseMatcher resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher}` + # + # @param project [String] + # @param location [String] + # @param phrase_matcher [String] + # + # @return [::String] + def phrase_matcher_path project:, location:, phrase_matcher: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/phraseMatchers/#{phrase_matcher}" + end + + ## + # Create a fully-qualified Recognizer resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/recognizers/{recognizer}` + # + # @param project [String] + # @param location [String] + # @param recognizer [String] + # + # @return [::String] + def recognizer_path project:, location:, recognizer: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/recognizers/#{recognizer}" + end + + ## + # Create a fully-qualified Settings resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/settings` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def settings_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}/settings" + end + + ## + # Create a fully-qualified View resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/views/{view}` + # + # @param project [String] + # @param location [String] + # @param view [String] + # + # @return [::String] + def view_path project:, location:, view: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/views/#{view}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest.rb new file mode 100644 index 000000000000..121a3fb47b30 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/contact_center_insights/v1/version" + +require "google/cloud/contact_center_insights/v1/contact_center_insights/credentials" +require "google/cloud/contact_center_insights/v1/contact_center_insights/paths" +require "google/cloud/contact_center_insights/v1/contact_center_insights/rest/operations" +require "google/cloud/contact_center_insights/v1/contact_center_insights/rest/client" + +module Google + module Cloud + module ContactCenterInsights + module V1 + ## + # An API that lets users analyze and explore their business conversation data. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/contact_center_insights/v1/contact_center_insights/rest" + # client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + module ContactCenterInsights + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/contact_center_insights/v1/contact_center_insights/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb new file mode 100644 index 000000000000..1b96e9cee7c1 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb @@ -0,0 +1,4352 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/contactcenterinsights/v1/contact_center_insights_pb" +require "google/cloud/contact_center_insights/v1/contact_center_insights/rest/service_stub" + +module Google + module Cloud + module ContactCenterInsights + module V1 + module ContactCenterInsights + module Rest + ## + # REST client for the ContactCenterInsights service. + # + # An API that lets users analyze and explore their business conversation data. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "contactcenterinsights.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :contact_center_insights_stub + + ## + # Configure the ContactCenterInsights Client class. + # + # See {::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ContactCenterInsights clients + # ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "ContactCenterInsights", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ContactCenterInsights Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @contact_center_insights_stub.universe_domain + end + + ## + # Create a new ContactCenterInsights REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ContactCenterInsights client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @contact_center_insights_stub = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Operations] + # + attr_reader :operations_client + + # Service calls + + ## + # Creates a conversation. + # Note that this method does not support audio transcription or redaction. + # Use `conversations.upload` instead. + # + # @overload create_conversation(request, options = nil) + # Pass arguments to `create_conversation` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::CreateConversationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::CreateConversationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_conversation(parent: nil, conversation: nil, conversation_id: nil) + # Pass arguments to `create_conversation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource of the conversation. + # @param conversation [::Google::Cloud::ContactCenterInsights::V1::Conversation, ::Hash] + # Required. The conversation resource to create. + # @param conversation_id [::String] + # 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 `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::Conversation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::Conversation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::CreateConversationRequest.new + # + # # Call the create_conversation method. + # result = client.create_conversation request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Conversation. + # p result + # + def create_conversation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreateConversationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_conversation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_conversation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_conversation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.create_conversation request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Create a long-running conversation upload operation. This method differs + # from `CreateConversation` by allowing audio transcription and optional DLP + # redaction. + # + # @overload upload_conversation(request, options = nil) + # Pass arguments to `upload_conversation` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::UploadConversationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::UploadConversationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload upload_conversation(parent: nil, conversation: nil, conversation_id: nil, redaction_config: nil, speech_config: nil) + # Pass arguments to `upload_conversation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource of the conversation. + # @param conversation [::Google::Cloud::ContactCenterInsights::V1::Conversation, ::Hash] + # Required. The conversation resource to create. + # @param conversation_id [::String] + # 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 `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-` + # @param redaction_config [::Google::Cloud::ContactCenterInsights::V1::RedactionConfig, ::Hash] + # Optional. DLP settings for transcript redaction. Will default to the config + # specified in Settings. + # @param speech_config [::Google::Cloud::ContactCenterInsights::V1::SpeechConfig, ::Hash] + # Optional. Speech-to-Text configuration. Will default to the config + # specified in Settings. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::UploadConversationRequest.new + # + # # Call the upload_conversation method. + # result = client.upload_conversation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def upload_conversation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UploadConversationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.upload_conversation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.upload_conversation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.upload_conversation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.upload_conversation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a conversation. + # + # @overload update_conversation(request, options = nil) + # Pass arguments to `update_conversation` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::UpdateConversationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::UpdateConversationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_conversation(conversation: nil, update_mask: nil) + # Pass arguments to `update_conversation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param conversation [::Google::Cloud::ContactCenterInsights::V1::Conversation, ::Hash] + # Required. The new values for the conversation. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # 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: + # + # * `agent_id` + # * `language_code` + # * `labels` + # * `metadata` + # * `quality_metadata` + # * `call_metadata` + # * `start_time` + # * `expire_time` or `ttl` + # * `data_source.gcs_source.audio_uri` or + # `data_source.dialogflow_source.audio_uri` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::Conversation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::Conversation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::UpdateConversationRequest.new + # + # # Call the update_conversation method. + # result = client.update_conversation request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Conversation. + # p result + # + def update_conversation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateConversationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_conversation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_conversation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_conversation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.update_conversation request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a conversation. + # + # @overload get_conversation(request, options = nil) + # Pass arguments to `get_conversation` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::GetConversationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::GetConversationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_conversation(name: nil, view: nil) + # Pass arguments to `get_conversation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the conversation to get. + # @param view [::Google::Cloud::ContactCenterInsights::V1::ConversationView] + # The level of details of the conversation. Default is `FULL`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::Conversation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::Conversation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::GetConversationRequest.new + # + # # Call the get_conversation method. + # result = client.get_conversation request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Conversation. + # p result + # + def get_conversation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetConversationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_conversation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_conversation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_conversation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.get_conversation request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists conversations. + # + # @overload list_conversations(request, options = nil) + # Pass arguments to `list_conversations` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::ListConversationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::ListConversationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_conversations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) + # Pass arguments to `list_conversations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource of the conversation. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # A filter to reduce results to a specific subset. Useful for querying + # conversations with specific properties. + # @param order_by [::String] + # 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 view [::Google::Cloud::ContactCenterInsights::V1::ConversationView] + # The level of details of the conversation. Default is `BASIC`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::Conversation>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::Conversation>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::ListConversationsRequest.new + # + # # Call the list_conversations method. + # result = client.list_conversations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ContactCenterInsights::V1::Conversation. + # p item + # end + # + def list_conversations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListConversationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_conversations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_conversations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_conversations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.list_conversations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @contact_center_insights_stub, :list_conversations, "conversations", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a conversation. + # + # @overload delete_conversation(request, options = nil) + # Pass arguments to `delete_conversation` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::DeleteConversationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::DeleteConversationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_conversation(name: nil, force: nil) + # Pass arguments to `delete_conversation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the conversation to delete. + # @param force [::Boolean] + # 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. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::DeleteConversationRequest.new + # + # # Call the delete_conversation method. + # result = client.delete_conversation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_conversation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteConversationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_conversation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_conversation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_conversation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.delete_conversation request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an analysis. The long running operation is done when the analysis + # has completed. + # + # @overload create_analysis(request, options = nil) + # Pass arguments to `create_analysis` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_analysis(parent: nil, analysis: nil) + # Pass arguments to `create_analysis` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource of the analysis. + # @param analysis [::Google::Cloud::ContactCenterInsights::V1::Analysis, ::Hash] + # Required. The analysis to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRequest.new + # + # # Call the create_analysis method. + # result = client.create_analysis request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_analysis request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_analysis.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_analysis.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_analysis.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.create_analysis request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an analysis. + # + # @overload get_analysis(request, options = nil) + # Pass arguments to `get_analysis` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::GetAnalysisRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::GetAnalysisRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_analysis(name: nil) + # Pass arguments to `get_analysis` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the analysis to get. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::Analysis] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::Analysis] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::GetAnalysisRequest.new + # + # # Call the get_analysis method. + # result = client.get_analysis request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Analysis. + # p result + # + def get_analysis request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetAnalysisRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_analysis.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_analysis.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_analysis.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.get_analysis request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists analyses. + # + # @overload list_analyses(request, options = nil) + # Pass arguments to `list_analyses` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::ListAnalysesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::ListAnalysesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_analyses(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_analyses` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource of the analyses. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # A filter to reduce results to a specific subset. Useful for querying + # conversations with specific properties. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::Analysis>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::Analysis>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::ListAnalysesRequest.new + # + # # Call the list_analyses method. + # result = client.list_analyses request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ContactCenterInsights::V1::Analysis. + # p item + # end + # + def list_analyses request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListAnalysesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_analyses.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_analyses.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_analyses.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.list_analyses request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @contact_center_insights_stub, :list_analyses, "analyses", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an analysis. + # + # @overload delete_analysis(request, options = nil) + # Pass arguments to `delete_analysis` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_analysis(name: nil) + # Pass arguments to `delete_analysis` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the analysis to delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRequest.new + # + # # Call the delete_analysis method. + # result = client.delete_analysis request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_analysis request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_analysis.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_analysis.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_analysis.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.delete_analysis request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Analyzes multiple conversations in a single request. + # + # @overload bulk_analyze_conversations(request, options = nil) + # Pass arguments to `bulk_analyze_conversations` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::BulkAnalyzeConversationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::BulkAnalyzeConversationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload bulk_analyze_conversations(parent: nil, filter: nil, analysis_percentage: nil, annotator_selector: nil) + # Pass arguments to `bulk_analyze_conversations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource to create analyses in. + # @param filter [::String] + # Required. Filter used to select the subset of conversations to analyze. + # @param analysis_percentage [::Float] + # Required. Percentage of selected conversation to analyze, between + # [0, 100]. + # @param annotator_selector [::Google::Cloud::ContactCenterInsights::V1::AnnotatorSelector, ::Hash] + # To select the annotators to run and the phrase matchers to use + # (if any). If not specified, all annotators will be run. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::BulkAnalyzeConversationsRequest.new + # + # # Call the bulk_analyze_conversations method. + # result = client.bulk_analyze_conversations request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def bulk_analyze_conversations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::BulkAnalyzeConversationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.bulk_analyze_conversations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.bulk_analyze_conversations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.bulk_analyze_conversations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.bulk_analyze_conversations request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes multiple conversations in a single request. + # + # @overload bulk_delete_conversations(request, options = nil) + # Pass arguments to `bulk_delete_conversations` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::BulkDeleteConversationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::BulkDeleteConversationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload bulk_delete_conversations(parent: nil, filter: nil, max_delete_count: nil, force: nil) + # Pass arguments to `bulk_delete_conversations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource to delete conversations from. + # Format: + # projects/\\{project}/locations/\\{location} + # @param filter [::String] + # Filter used to select the subset of conversations to delete. + # @param max_delete_count [::Integer] + # Maximum number of conversations to delete. + # @param force [::Boolean] + # 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. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::BulkDeleteConversationsRequest.new + # + # # Call the bulk_delete_conversations method. + # result = client.bulk_delete_conversations request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def bulk_delete_conversations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::BulkDeleteConversationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.bulk_delete_conversations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.bulk_delete_conversations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.bulk_delete_conversations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.bulk_delete_conversations request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Imports conversations and processes them according to the user's + # configuration. + # + # @overload ingest_conversations(request, options = nil) + # Pass arguments to `ingest_conversations` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload ingest_conversations(gcs_source: nil, transcript_object_config: nil, parent: nil, conversation_config: nil, redaction_config: nil, speech_config: nil, sample_size: nil) + # Pass arguments to `ingest_conversations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param gcs_source [::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest::GcsSource, ::Hash] + # A cloud storage bucket source. Note that any previously ingested objects + # from the source will be skipped to avoid duplication. + # @param transcript_object_config [::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest::TranscriptObjectConfig, ::Hash] + # Configuration for when `source` contains conversation transcripts. + # @param parent [::String] + # Required. The parent resource for new conversations. + # @param conversation_config [::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest::ConversationConfig, ::Hash] + # Configuration that applies to all conversations. + # @param redaction_config [::Google::Cloud::ContactCenterInsights::V1::RedactionConfig, ::Hash] + # Optional. DLP settings for transcript redaction. Optional, will default to + # the config specified in Settings. + # @param speech_config [::Google::Cloud::ContactCenterInsights::V1::SpeechConfig, ::Hash] + # Optional. Default Speech-to-Text configuration. Optional, will default to + # the config specified in Settings. + # @param sample_size [::Integer] + # 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. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest.new + # + # # Call the ingest_conversations method. + # result = client.ingest_conversations request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def ingest_conversations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.ingest_conversations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.ingest_conversations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.ingest_conversations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.ingest_conversations request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Export insights data to a destination defined in the request body. + # + # @overload export_insights_data(request, options = nil) + # Pass arguments to `export_insights_data` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload export_insights_data(big_query_destination: nil, parent: nil, filter: nil, kms_key: nil, write_disposition: nil) + # Pass arguments to `export_insights_data` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param big_query_destination [::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest::BigQueryDestination, ::Hash] + # Specified if sink is a BigQuery table. + # @param parent [::String] + # Required. The parent resource to export data from. + # @param filter [::String] + # A filter to reduce results to a specific subset. Useful for exporting + # conversations with specific properties. + # @param kms_key [::String] + # A fully qualified KMS key name for BigQuery tables protected by CMEK. + # Format: + # projects/\\{project}/locations/\\{location}/keyRings/\\{keyring}/cryptoKeys/\\{key}/cryptoKeyVersions/\\{version} + # @param write_disposition [::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest::WriteDisposition] + # Options for what to do if the destination table already exists. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest.new + # + # # Call the export_insights_data method. + # result = client.export_insights_data request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_insights_data request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.export_insights_data.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.export_insights_data.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.export_insights_data.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.export_insights_data request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an issue model. + # + # @overload create_issue_model(request, options = nil) + # Pass arguments to `create_issue_model` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::CreateIssueModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::CreateIssueModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_issue_model(parent: nil, issue_model: nil) + # Pass arguments to `create_issue_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource of the issue model. + # @param issue_model [::Google::Cloud::ContactCenterInsights::V1::IssueModel, ::Hash] + # Required. The issue model to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::CreateIssueModelRequest.new + # + # # Call the create_issue_model method. + # result = client.create_issue_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_issue_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreateIssueModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_issue_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_issue_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_issue_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.create_issue_model request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an issue model. + # + # @overload update_issue_model(request, options = nil) + # Pass arguments to `update_issue_model` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::UpdateIssueModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::UpdateIssueModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_issue_model(issue_model: nil, update_mask: nil) + # Pass arguments to `update_issue_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param issue_model [::Google::Cloud::ContactCenterInsights::V1::IssueModel, ::Hash] + # Required. The new values for the issue model. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::IssueModel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::IssueModel] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::UpdateIssueModelRequest.new + # + # # Call the update_issue_model method. + # result = client.update_issue_model request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::IssueModel. + # p result + # + def update_issue_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateIssueModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_issue_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_issue_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_issue_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.update_issue_model request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an issue model. + # + # @overload get_issue_model(request, options = nil) + # Pass arguments to `get_issue_model` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::GetIssueModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::GetIssueModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_issue_model(name: nil) + # Pass arguments to `get_issue_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the issue model to get. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::IssueModel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::IssueModel] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::GetIssueModelRequest.new + # + # # Call the get_issue_model method. + # result = client.get_issue_model request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::IssueModel. + # p result + # + def get_issue_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetIssueModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_issue_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_issue_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_issue_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.get_issue_model request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists issue models. + # + # @overload list_issue_models(request, options = nil) + # Pass arguments to `list_issue_models` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_issue_models(parent: nil) + # Pass arguments to `list_issue_models` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource of the issue model. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::ListIssueModelsRequest.new + # + # # Call the list_issue_models method. + # result = client.list_issue_models request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::ListIssueModelsResponse. + # p result + # + def list_issue_models request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_issue_models.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_issue_models.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_issue_models.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.list_issue_models request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an issue model. + # + # @overload delete_issue_model(request, options = nil) + # Pass arguments to `delete_issue_model` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::DeleteIssueModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::DeleteIssueModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_issue_model(name: nil) + # Pass arguments to `delete_issue_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the issue model to delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::DeleteIssueModelRequest.new + # + # # Call the delete_issue_model method. + # result = client.delete_issue_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_issue_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteIssueModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_issue_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_issue_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_issue_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.delete_issue_model request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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. + # + # @overload deploy_issue_model(request, options = nil) + # Pass arguments to `deploy_issue_model` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::DeployIssueModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::DeployIssueModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload deploy_issue_model(name: nil) + # Pass arguments to `deploy_issue_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The issue model to deploy. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::DeployIssueModelRequest.new + # + # # Call the deploy_issue_model method. + # result = client.deploy_issue_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def deploy_issue_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeployIssueModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.deploy_issue_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.deploy_issue_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.deploy_issue_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.deploy_issue_model request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Undeploys an issue model. + # An issue model can not be used in analysis after it has been undeployed. + # + # @overload undeploy_issue_model(request, options = nil) + # Pass arguments to `undeploy_issue_model` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::UndeployIssueModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::UndeployIssueModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload undeploy_issue_model(name: nil) + # Pass arguments to `undeploy_issue_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The issue model to undeploy. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::UndeployIssueModelRequest.new + # + # # Call the undeploy_issue_model method. + # result = client.undeploy_issue_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def undeploy_issue_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UndeployIssueModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.undeploy_issue_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.undeploy_issue_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.undeploy_issue_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.undeploy_issue_model request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Exports an issue model to the provided destination. + # + # @overload export_issue_model(request, options = nil) + # Pass arguments to `export_issue_model` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::ExportIssueModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::ExportIssueModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload export_issue_model(gcs_destination: nil, name: nil) + # Pass arguments to `export_issue_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param gcs_destination [::Google::Cloud::ContactCenterInsights::V1::ExportIssueModelRequest::GcsDestination, ::Hash] + # Google Cloud Storage URI to export the issue model to. + # @param name [::String] + # Required. The issue model to export. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::ExportIssueModelRequest.new + # + # # Call the export_issue_model method. + # result = client.export_issue_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_issue_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ExportIssueModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.export_issue_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.export_issue_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.export_issue_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.export_issue_model request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Imports an issue model from a Cloud Storage bucket. + # + # @overload import_issue_model(request, options = nil) + # Pass arguments to `import_issue_model` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::ImportIssueModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::ImportIssueModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload import_issue_model(gcs_source: nil, parent: nil, create_new_model: nil) + # Pass arguments to `import_issue_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param gcs_source [::Google::Cloud::ContactCenterInsights::V1::ImportIssueModelRequest::GcsSource, ::Hash] + # Google Cloud Storage source message. + # @param parent [::String] + # Required. The parent resource of the issue model. + # @param create_new_model [::Boolean] + # 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. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::ImportIssueModelRequest.new + # + # # Call the import_issue_model method. + # result = client.import_issue_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def import_issue_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ImportIssueModelRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.import_issue_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.import_issue_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.import_issue_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.import_issue_model request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an issue. + # + # @overload get_issue(request, options = nil) + # Pass arguments to `get_issue` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::GetIssueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::GetIssueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_issue(name: nil) + # Pass arguments to `get_issue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the issue to get. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::Issue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::Issue] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::GetIssueRequest.new + # + # # Call the get_issue method. + # result = client.get_issue request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Issue. + # p result + # + def get_issue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetIssueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_issue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_issue.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_issue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.get_issue request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists issues. + # + # @overload list_issues(request, options = nil) + # Pass arguments to `list_issues` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::ListIssuesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::ListIssuesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_issues(parent: nil) + # Pass arguments to `list_issues` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource of the issue. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::ListIssuesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::ListIssuesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::ListIssuesRequest.new + # + # # Call the list_issues method. + # result = client.list_issues request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::ListIssuesResponse. + # p result + # + def list_issues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListIssuesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_issues.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_issues.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_issues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.list_issues request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an issue. + # + # @overload update_issue(request, options = nil) + # Pass arguments to `update_issue` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::UpdateIssueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::UpdateIssueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_issue(issue: nil, update_mask: nil) + # Pass arguments to `update_issue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param issue [::Google::Cloud::ContactCenterInsights::V1::Issue, ::Hash] + # Required. The new values for the issue. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::Issue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::Issue] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::UpdateIssueRequest.new + # + # # Call the update_issue method. + # result = client.update_issue request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Issue. + # p result + # + def update_issue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateIssueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_issue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_issue.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_issue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.update_issue request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an issue. + # + # @overload delete_issue(request, options = nil) + # Pass arguments to `delete_issue` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::DeleteIssueRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::DeleteIssueRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_issue(name: nil) + # Pass arguments to `delete_issue` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the issue to delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::DeleteIssueRequest.new + # + # # Call the delete_issue method. + # result = client.delete_issue request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_issue request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteIssueRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_issue.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_issue.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_issue.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.delete_issue request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an issue model's statistics. + # + # @overload calculate_issue_model_stats(request, options = nil) + # Pass arguments to `calculate_issue_model_stats` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload calculate_issue_model_stats(issue_model: nil) + # Pass arguments to `calculate_issue_model_stats` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param issue_model [::String] + # Required. The resource name of the issue model to query against. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsRequest.new + # + # # Call the calculate_issue_model_stats method. + # result = client.calculate_issue_model_stats request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsResponse. + # p result + # + def calculate_issue_model_stats request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.calculate_issue_model_stats.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.calculate_issue_model_stats.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.calculate_issue_model_stats.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.calculate_issue_model_stats request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a phrase matcher. + # + # @overload create_phrase_matcher(request, options = nil) + # Pass arguments to `create_phrase_matcher` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::CreatePhraseMatcherRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::CreatePhraseMatcherRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_phrase_matcher(parent: nil, phrase_matcher: nil) + # Pass arguments to `create_phrase_matcher` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource of the phrase matcher. Required. The location + # to create a phrase matcher for. Format: `projects//locations/` or `projects//locations/` + # @param phrase_matcher [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher, ::Hash] + # Required. The phrase matcher resource to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::CreatePhraseMatcherRequest.new + # + # # Call the create_phrase_matcher method. + # result = client.create_phrase_matcher request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::PhraseMatcher. + # p result + # + def create_phrase_matcher request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreatePhraseMatcherRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_phrase_matcher.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_phrase_matcher.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_phrase_matcher.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.create_phrase_matcher request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a phrase matcher. + # + # @overload get_phrase_matcher(request, options = nil) + # Pass arguments to `get_phrase_matcher` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::GetPhraseMatcherRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::GetPhraseMatcherRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_phrase_matcher(name: nil) + # Pass arguments to `get_phrase_matcher` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the phrase matcher to get. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::GetPhraseMatcherRequest.new + # + # # Call the get_phrase_matcher method. + # result = client.get_phrase_matcher request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::PhraseMatcher. + # p result + # + def get_phrase_matcher request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetPhraseMatcherRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_phrase_matcher.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_phrase_matcher.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_phrase_matcher.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.get_phrase_matcher request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists phrase matchers. + # + # @overload list_phrase_matchers(request, options = nil) + # Pass arguments to `list_phrase_matchers` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_phrase_matchers(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_phrase_matchers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource of the phrase matcher. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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 filter [::String] + # A filter to reduce results to a specific subset. Useful for querying + # phrase matchers with specific properties. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersRequest.new + # + # # Call the list_phrase_matchers method. + # result = client.list_phrase_matchers request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher. + # p item + # end + # + def list_phrase_matchers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_phrase_matchers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_phrase_matchers.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_phrase_matchers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.list_phrase_matchers request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @contact_center_insights_stub, :list_phrase_matchers, "phrase_matchers", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a phrase matcher. + # + # @overload delete_phrase_matcher(request, options = nil) + # Pass arguments to `delete_phrase_matcher` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::DeletePhraseMatcherRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::DeletePhraseMatcherRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_phrase_matcher(name: nil) + # Pass arguments to `delete_phrase_matcher` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the phrase matcher to delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::DeletePhraseMatcherRequest.new + # + # # Call the delete_phrase_matcher method. + # result = client.delete_phrase_matcher request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_phrase_matcher request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeletePhraseMatcherRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_phrase_matcher.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_phrase_matcher.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_phrase_matcher.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.delete_phrase_matcher request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a phrase matcher. + # + # @overload update_phrase_matcher(request, options = nil) + # Pass arguments to `update_phrase_matcher` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::UpdatePhraseMatcherRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::UpdatePhraseMatcherRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_phrase_matcher(phrase_matcher: nil, update_mask: nil) + # Pass arguments to `update_phrase_matcher` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param phrase_matcher [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher, ::Hash] + # Required. The new values for the phrase matcher. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::UpdatePhraseMatcherRequest.new + # + # # Call the update_phrase_matcher method. + # result = client.update_phrase_matcher request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::PhraseMatcher. + # p result + # + def update_phrase_matcher request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdatePhraseMatcherRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_phrase_matcher.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_phrase_matcher.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_phrase_matcher.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.update_phrase_matcher request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets conversation statistics. + # + # @overload calculate_stats(request, options = nil) + # Pass arguments to `calculate_stats` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::CalculateStatsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::CalculateStatsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload calculate_stats(location: nil, filter: nil) + # Pass arguments to `calculate_stats` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param location [::String] + # Required. The location of the conversations. + # @param filter [::String] + # A filter to reduce results to a specific subset. This field is useful for + # getting statistics about conversations with specific properties. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::CalculateStatsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::CalculateStatsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::CalculateStatsRequest.new + # + # # Call the calculate_stats method. + # result = client.calculate_stats request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::CalculateStatsResponse. + # p result + # + def calculate_stats request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CalculateStatsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.calculate_stats.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.calculate_stats.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.calculate_stats.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.calculate_stats request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets project-level settings. + # + # @overload get_settings(request, options = nil) + # Pass arguments to `get_settings` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::GetSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::GetSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_settings(name: nil) + # Pass arguments to `get_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the settings resource to get. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::Settings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::Settings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::GetSettingsRequest.new + # + # # Call the get_settings method. + # result = client.get_settings request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Settings. + # p result + # + def get_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.get_settings request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates project-level settings. + # + # @overload update_settings(request, options = nil) + # Pass arguments to `update_settings` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::UpdateSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::UpdateSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_settings(settings: nil, update_mask: nil) + # Pass arguments to `update_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param settings [::Google::Cloud::ContactCenterInsights::V1::Settings, ::Hash] + # Required. The new settings values. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::Settings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::Settings] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::UpdateSettingsRequest.new + # + # # Call the update_settings method. + # result = client.update_settings request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Settings. + # p result + # + def update_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_settings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.update_settings request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets location-level encryption key specification. + # + # @overload get_encryption_spec(request, options = nil) + # Pass arguments to `get_encryption_spec` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::GetEncryptionSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::GetEncryptionSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_encryption_spec(name: nil) + # Pass arguments to `get_encryption_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the encryption spec resource to get. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::EncryptionSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::EncryptionSpec] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::GetEncryptionSpecRequest.new + # + # # Call the get_encryption_spec method. + # result = client.get_encryption_spec request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::EncryptionSpec. + # p result + # + def get_encryption_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetEncryptionSpecRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_encryption_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_encryption_spec.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_encryption_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.get_encryption_spec request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # 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. + # + # @overload initialize_encryption_spec(request, options = nil) + # Pass arguments to `initialize_encryption_spec` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::InitializeEncryptionSpecRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::InitializeEncryptionSpecRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload initialize_encryption_spec(encryption_spec: nil) + # Pass arguments to `initialize_encryption_spec` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param encryption_spec [::Google::Cloud::ContactCenterInsights::V1::EncryptionSpec, ::Hash] + # 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. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::InitializeEncryptionSpecRequest.new + # + # # Call the initialize_encryption_spec method. + # result = client.initialize_encryption_spec request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def initialize_encryption_spec request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::InitializeEncryptionSpecRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.initialize_encryption_spec.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.initialize_encryption_spec.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.initialize_encryption_spec.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.initialize_encryption_spec request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a view. + # + # @overload create_view(request, options = nil) + # Pass arguments to `create_view` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::CreateViewRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::CreateViewRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_view(parent: nil, view: nil) + # Pass arguments to `create_view` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource of the view. Required. The location to create + # a view for. + # Format: `projects//locations/` or + # `projects//locations/` + # @param view [::Google::Cloud::ContactCenterInsights::V1::View, ::Hash] + # Required. The view resource to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::View] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::View] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::CreateViewRequest.new + # + # # Call the create_view method. + # result = client.create_view request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::View. + # p result + # + def create_view request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreateViewRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_view.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_view.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_view.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.create_view request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a view. + # + # @overload get_view(request, options = nil) + # Pass arguments to `get_view` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::GetViewRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::GetViewRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_view(name: nil) + # Pass arguments to `get_view` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the view to get. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::View] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::View] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::GetViewRequest.new + # + # # Call the get_view method. + # result = client.get_view request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::View. + # p result + # + def get_view request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetViewRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_view.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_view.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_view.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.get_view request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists views. + # + # @overload list_views(request, options = nil) + # Pass arguments to `list_views` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::ListViewsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::ListViewsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_views(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_views` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource of the views. + # @param page_size [::Integer] + # 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 page_token [::String] + # 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. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::View>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::View>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::ListViewsRequest.new + # + # # Call the list_views method. + # result = client.list_views request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::ContactCenterInsights::V1::View. + # p item + # end + # + def list_views request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListViewsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_views.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_views.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_views.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.list_views request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @contact_center_insights_stub, :list_views, "views", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a view. + # + # @overload update_view(request, options = nil) + # Pass arguments to `update_view` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::UpdateViewRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::UpdateViewRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_view(view: nil, update_mask: nil) + # Pass arguments to `update_view` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param view [::Google::Cloud::ContactCenterInsights::V1::View, ::Hash] + # Required. The new view. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::View] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::View] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::UpdateViewRequest.new + # + # # Call the update_view method. + # result = client.update_view request + # + # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::View. + # p result + # + def update_view request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateViewRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_view.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_view.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_view.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.update_view request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a view. + # + # @overload delete_view(request, options = nil) + # Pass arguments to `delete_view` via a request object, either of type + # {::Google::Cloud::ContactCenterInsights::V1::DeleteViewRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ContactCenterInsights::V1::DeleteViewRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_view(name: nil) + # Pass arguments to `delete_view` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the view to delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/contact_center_insights/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ContactCenterInsights::V1::DeleteViewRequest.new + # + # # Call the delete_view method. + # result = client.delete_view request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_view request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteViewRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_view.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_view.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_view.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @contact_center_insights_stub.delete_view request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ContactCenterInsights REST API. + # + # This class represents the configuration for ContactCenterInsights REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_conversation to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_conversation.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_conversation.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "contactcenterinsights.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the ContactCenterInsights API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_conversation` + # @return [::Gapic::Config::Method] + # + attr_reader :create_conversation + ## + # RPC-specific configuration for `upload_conversation` + # @return [::Gapic::Config::Method] + # + attr_reader :upload_conversation + ## + # RPC-specific configuration for `update_conversation` + # @return [::Gapic::Config::Method] + # + attr_reader :update_conversation + ## + # RPC-specific configuration for `get_conversation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_conversation + ## + # RPC-specific configuration for `list_conversations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_conversations + ## + # RPC-specific configuration for `delete_conversation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_conversation + ## + # RPC-specific configuration for `create_analysis` + # @return [::Gapic::Config::Method] + # + attr_reader :create_analysis + ## + # RPC-specific configuration for `get_analysis` + # @return [::Gapic::Config::Method] + # + attr_reader :get_analysis + ## + # RPC-specific configuration for `list_analyses` + # @return [::Gapic::Config::Method] + # + attr_reader :list_analyses + ## + # RPC-specific configuration for `delete_analysis` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_analysis + ## + # RPC-specific configuration for `bulk_analyze_conversations` + # @return [::Gapic::Config::Method] + # + attr_reader :bulk_analyze_conversations + ## + # RPC-specific configuration for `bulk_delete_conversations` + # @return [::Gapic::Config::Method] + # + attr_reader :bulk_delete_conversations + ## + # RPC-specific configuration for `ingest_conversations` + # @return [::Gapic::Config::Method] + # + attr_reader :ingest_conversations + ## + # RPC-specific configuration for `export_insights_data` + # @return [::Gapic::Config::Method] + # + attr_reader :export_insights_data + ## + # RPC-specific configuration for `create_issue_model` + # @return [::Gapic::Config::Method] + # + attr_reader :create_issue_model + ## + # RPC-specific configuration for `update_issue_model` + # @return [::Gapic::Config::Method] + # + attr_reader :update_issue_model + ## + # RPC-specific configuration for `get_issue_model` + # @return [::Gapic::Config::Method] + # + attr_reader :get_issue_model + ## + # RPC-specific configuration for `list_issue_models` + # @return [::Gapic::Config::Method] + # + attr_reader :list_issue_models + ## + # RPC-specific configuration for `delete_issue_model` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_issue_model + ## + # RPC-specific configuration for `deploy_issue_model` + # @return [::Gapic::Config::Method] + # + attr_reader :deploy_issue_model + ## + # RPC-specific configuration for `undeploy_issue_model` + # @return [::Gapic::Config::Method] + # + attr_reader :undeploy_issue_model + ## + # RPC-specific configuration for `export_issue_model` + # @return [::Gapic::Config::Method] + # + attr_reader :export_issue_model + ## + # RPC-specific configuration for `import_issue_model` + # @return [::Gapic::Config::Method] + # + attr_reader :import_issue_model + ## + # RPC-specific configuration for `get_issue` + # @return [::Gapic::Config::Method] + # + attr_reader :get_issue + ## + # RPC-specific configuration for `list_issues` + # @return [::Gapic::Config::Method] + # + attr_reader :list_issues + ## + # RPC-specific configuration for `update_issue` + # @return [::Gapic::Config::Method] + # + attr_reader :update_issue + ## + # RPC-specific configuration for `delete_issue` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_issue + ## + # RPC-specific configuration for `calculate_issue_model_stats` + # @return [::Gapic::Config::Method] + # + attr_reader :calculate_issue_model_stats + ## + # RPC-specific configuration for `create_phrase_matcher` + # @return [::Gapic::Config::Method] + # + attr_reader :create_phrase_matcher + ## + # RPC-specific configuration for `get_phrase_matcher` + # @return [::Gapic::Config::Method] + # + attr_reader :get_phrase_matcher + ## + # RPC-specific configuration for `list_phrase_matchers` + # @return [::Gapic::Config::Method] + # + attr_reader :list_phrase_matchers + ## + # RPC-specific configuration for `delete_phrase_matcher` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_phrase_matcher + ## + # RPC-specific configuration for `update_phrase_matcher` + # @return [::Gapic::Config::Method] + # + attr_reader :update_phrase_matcher + ## + # RPC-specific configuration for `calculate_stats` + # @return [::Gapic::Config::Method] + # + attr_reader :calculate_stats + ## + # RPC-specific configuration for `get_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :get_settings + ## + # RPC-specific configuration for `update_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :update_settings + ## + # RPC-specific configuration for `get_encryption_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :get_encryption_spec + ## + # RPC-specific configuration for `initialize_encryption_spec` + # @return [::Gapic::Config::Method] + # + attr_reader :initialize_encryption_spec + ## + # RPC-specific configuration for `create_view` + # @return [::Gapic::Config::Method] + # + attr_reader :create_view + ## + # RPC-specific configuration for `get_view` + # @return [::Gapic::Config::Method] + # + attr_reader :get_view + ## + # RPC-specific configuration for `list_views` + # @return [::Gapic::Config::Method] + # + attr_reader :list_views + ## + # RPC-specific configuration for `update_view` + # @return [::Gapic::Config::Method] + # + attr_reader :update_view + ## + # RPC-specific configuration for `delete_view` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_view + + # @private + def initialize parent_rpcs = nil + create_conversation_config = parent_rpcs.create_conversation if parent_rpcs.respond_to? :create_conversation + @create_conversation = ::Gapic::Config::Method.new create_conversation_config + upload_conversation_config = parent_rpcs.upload_conversation if parent_rpcs.respond_to? :upload_conversation + @upload_conversation = ::Gapic::Config::Method.new upload_conversation_config + update_conversation_config = parent_rpcs.update_conversation if parent_rpcs.respond_to? :update_conversation + @update_conversation = ::Gapic::Config::Method.new update_conversation_config + get_conversation_config = parent_rpcs.get_conversation if parent_rpcs.respond_to? :get_conversation + @get_conversation = ::Gapic::Config::Method.new get_conversation_config + list_conversations_config = parent_rpcs.list_conversations if parent_rpcs.respond_to? :list_conversations + @list_conversations = ::Gapic::Config::Method.new list_conversations_config + delete_conversation_config = parent_rpcs.delete_conversation if parent_rpcs.respond_to? :delete_conversation + @delete_conversation = ::Gapic::Config::Method.new delete_conversation_config + create_analysis_config = parent_rpcs.create_analysis if parent_rpcs.respond_to? :create_analysis + @create_analysis = ::Gapic::Config::Method.new create_analysis_config + get_analysis_config = parent_rpcs.get_analysis if parent_rpcs.respond_to? :get_analysis + @get_analysis = ::Gapic::Config::Method.new get_analysis_config + list_analyses_config = parent_rpcs.list_analyses if parent_rpcs.respond_to? :list_analyses + @list_analyses = ::Gapic::Config::Method.new list_analyses_config + delete_analysis_config = parent_rpcs.delete_analysis if parent_rpcs.respond_to? :delete_analysis + @delete_analysis = ::Gapic::Config::Method.new delete_analysis_config + bulk_analyze_conversations_config = parent_rpcs.bulk_analyze_conversations if parent_rpcs.respond_to? :bulk_analyze_conversations + @bulk_analyze_conversations = ::Gapic::Config::Method.new bulk_analyze_conversations_config + bulk_delete_conversations_config = parent_rpcs.bulk_delete_conversations if parent_rpcs.respond_to? :bulk_delete_conversations + @bulk_delete_conversations = ::Gapic::Config::Method.new bulk_delete_conversations_config + ingest_conversations_config = parent_rpcs.ingest_conversations if parent_rpcs.respond_to? :ingest_conversations + @ingest_conversations = ::Gapic::Config::Method.new ingest_conversations_config + export_insights_data_config = parent_rpcs.export_insights_data if parent_rpcs.respond_to? :export_insights_data + @export_insights_data = ::Gapic::Config::Method.new export_insights_data_config + create_issue_model_config = parent_rpcs.create_issue_model if parent_rpcs.respond_to? :create_issue_model + @create_issue_model = ::Gapic::Config::Method.new create_issue_model_config + update_issue_model_config = parent_rpcs.update_issue_model if parent_rpcs.respond_to? :update_issue_model + @update_issue_model = ::Gapic::Config::Method.new update_issue_model_config + get_issue_model_config = parent_rpcs.get_issue_model if parent_rpcs.respond_to? :get_issue_model + @get_issue_model = ::Gapic::Config::Method.new get_issue_model_config + list_issue_models_config = parent_rpcs.list_issue_models if parent_rpcs.respond_to? :list_issue_models + @list_issue_models = ::Gapic::Config::Method.new list_issue_models_config + delete_issue_model_config = parent_rpcs.delete_issue_model if parent_rpcs.respond_to? :delete_issue_model + @delete_issue_model = ::Gapic::Config::Method.new delete_issue_model_config + deploy_issue_model_config = parent_rpcs.deploy_issue_model if parent_rpcs.respond_to? :deploy_issue_model + @deploy_issue_model = ::Gapic::Config::Method.new deploy_issue_model_config + undeploy_issue_model_config = parent_rpcs.undeploy_issue_model if parent_rpcs.respond_to? :undeploy_issue_model + @undeploy_issue_model = ::Gapic::Config::Method.new undeploy_issue_model_config + export_issue_model_config = parent_rpcs.export_issue_model if parent_rpcs.respond_to? :export_issue_model + @export_issue_model = ::Gapic::Config::Method.new export_issue_model_config + import_issue_model_config = parent_rpcs.import_issue_model if parent_rpcs.respond_to? :import_issue_model + @import_issue_model = ::Gapic::Config::Method.new import_issue_model_config + get_issue_config = parent_rpcs.get_issue if parent_rpcs.respond_to? :get_issue + @get_issue = ::Gapic::Config::Method.new get_issue_config + list_issues_config = parent_rpcs.list_issues if parent_rpcs.respond_to? :list_issues + @list_issues = ::Gapic::Config::Method.new list_issues_config + update_issue_config = parent_rpcs.update_issue if parent_rpcs.respond_to? :update_issue + @update_issue = ::Gapic::Config::Method.new update_issue_config + delete_issue_config = parent_rpcs.delete_issue if parent_rpcs.respond_to? :delete_issue + @delete_issue = ::Gapic::Config::Method.new delete_issue_config + calculate_issue_model_stats_config = parent_rpcs.calculate_issue_model_stats if parent_rpcs.respond_to? :calculate_issue_model_stats + @calculate_issue_model_stats = ::Gapic::Config::Method.new calculate_issue_model_stats_config + create_phrase_matcher_config = parent_rpcs.create_phrase_matcher if parent_rpcs.respond_to? :create_phrase_matcher + @create_phrase_matcher = ::Gapic::Config::Method.new create_phrase_matcher_config + get_phrase_matcher_config = parent_rpcs.get_phrase_matcher if parent_rpcs.respond_to? :get_phrase_matcher + @get_phrase_matcher = ::Gapic::Config::Method.new get_phrase_matcher_config + list_phrase_matchers_config = parent_rpcs.list_phrase_matchers if parent_rpcs.respond_to? :list_phrase_matchers + @list_phrase_matchers = ::Gapic::Config::Method.new list_phrase_matchers_config + delete_phrase_matcher_config = parent_rpcs.delete_phrase_matcher if parent_rpcs.respond_to? :delete_phrase_matcher + @delete_phrase_matcher = ::Gapic::Config::Method.new delete_phrase_matcher_config + update_phrase_matcher_config = parent_rpcs.update_phrase_matcher if parent_rpcs.respond_to? :update_phrase_matcher + @update_phrase_matcher = ::Gapic::Config::Method.new update_phrase_matcher_config + calculate_stats_config = parent_rpcs.calculate_stats if parent_rpcs.respond_to? :calculate_stats + @calculate_stats = ::Gapic::Config::Method.new calculate_stats_config + get_settings_config = parent_rpcs.get_settings if parent_rpcs.respond_to? :get_settings + @get_settings = ::Gapic::Config::Method.new get_settings_config + update_settings_config = parent_rpcs.update_settings if parent_rpcs.respond_to? :update_settings + @update_settings = ::Gapic::Config::Method.new update_settings_config + get_encryption_spec_config = parent_rpcs.get_encryption_spec if parent_rpcs.respond_to? :get_encryption_spec + @get_encryption_spec = ::Gapic::Config::Method.new get_encryption_spec_config + initialize_encryption_spec_config = parent_rpcs.initialize_encryption_spec if parent_rpcs.respond_to? :initialize_encryption_spec + @initialize_encryption_spec = ::Gapic::Config::Method.new initialize_encryption_spec_config + create_view_config = parent_rpcs.create_view if parent_rpcs.respond_to? :create_view + @create_view = ::Gapic::Config::Method.new create_view_config + get_view_config = parent_rpcs.get_view if parent_rpcs.respond_to? :get_view + @get_view = ::Gapic::Config::Method.new get_view_config + list_views_config = parent_rpcs.list_views if parent_rpcs.respond_to? :list_views + @list_views = ::Gapic::Config::Method.new list_views_config + update_view_config = parent_rpcs.update_view if parent_rpcs.respond_to? :update_view + @update_view = ::Gapic::Config::Method.new update_view_config + delete_view_config = parent_rpcs.delete_view if parent_rpcs.respond_to? :delete_view + @delete_view = ::Gapic::Config::Method.new delete_view_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/operations.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/operations.rb new file mode 100644 index 000000000000..4ccd00150123 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/operations.rb @@ -0,0 +1,901 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module ContactCenterInsights + module V1 + module ContactCenterInsights + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "contactcenterinsights.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the ContactCenterInsights Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the ContactCenterInsights Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # NOTE: the `name` binding allows API services to override the binding + # to use different resource name schemes, such as `users/*/operations`. To + # override the binding, API services can add a binding such as + # `"/v1/{name=users/*}/operations"` to their service configuration. + # For backwards compatibility, the default name includes the operations + # collection id, however overriding users must ensure the name binding + # is the parent resource, without the operations collection id. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, + # corresponding to `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + return result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "contactcenterinsights.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/service_stub.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/service_stub.rb new file mode 100644 index 000000000000..703373c991df --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/service_stub.rb @@ -0,0 +1,2627 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/contactcenterinsights/v1/contact_center_insights_pb" + +module Google + module Cloud + module ContactCenterInsights + module V1 + module ContactCenterInsights + module Rest + ## + # REST service stub for the ContactCenterInsights service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + raise_faraday_errors: false + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # Baseline implementation for the create_conversation REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::CreateConversationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::Conversation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::Conversation] + # A result object deserialized from the server's reply + def create_conversation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_conversation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ContactCenterInsights::V1::Conversation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the upload_conversation REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::UploadConversationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def upload_conversation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_upload_conversation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_conversation REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::UpdateConversationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::Conversation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::Conversation] + # A result object deserialized from the server's reply + def update_conversation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_conversation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ContactCenterInsights::V1::Conversation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_conversation REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::GetConversationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::Conversation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::Conversation] + # A result object deserialized from the server's reply + def get_conversation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_conversation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ContactCenterInsights::V1::Conversation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_conversations REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::ListConversationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::ListConversationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::ListConversationsResponse] + # A result object deserialized from the server's reply + def list_conversations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_conversations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ContactCenterInsights::V1::ListConversationsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_conversation REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::DeleteConversationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_conversation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_conversation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the create_analysis REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_analysis request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_analysis_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_analysis REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::GetAnalysisRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::Analysis] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::Analysis] + # A result object deserialized from the server's reply + def get_analysis request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_analysis_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ContactCenterInsights::V1::Analysis.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_analyses REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::ListAnalysesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::ListAnalysesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::ListAnalysesResponse] + # A result object deserialized from the server's reply + def list_analyses request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_analyses_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ContactCenterInsights::V1::ListAnalysesResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_analysis REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_analysis request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_analysis_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the bulk_analyze_conversations REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::BulkAnalyzeConversationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def bulk_analyze_conversations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_bulk_analyze_conversations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the bulk_delete_conversations REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::BulkDeleteConversationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def bulk_delete_conversations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_bulk_delete_conversations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the ingest_conversations REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def ingest_conversations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_ingest_conversations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the export_insights_data REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def export_insights_data request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_export_insights_data_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the create_issue_model REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::CreateIssueModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_issue_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_issue_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_issue_model REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::UpdateIssueModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::IssueModel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::IssueModel] + # A result object deserialized from the server's reply + def update_issue_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_issue_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ContactCenterInsights::V1::IssueModel.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_issue_model REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::GetIssueModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::IssueModel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::IssueModel] + # A result object deserialized from the server's reply + def get_issue_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_issue_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ContactCenterInsights::V1::IssueModel.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_issue_models REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsResponse] + # A result object deserialized from the server's reply + def list_issue_models request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_issue_models_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_issue_model REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::DeleteIssueModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_issue_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_issue_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the deploy_issue_model REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::DeployIssueModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def deploy_issue_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_deploy_issue_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the undeploy_issue_model REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::UndeployIssueModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def undeploy_issue_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_undeploy_issue_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the export_issue_model REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::ExportIssueModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def export_issue_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_export_issue_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the import_issue_model REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::ImportIssueModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def import_issue_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_import_issue_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_issue REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::GetIssueRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::Issue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::Issue] + # A result object deserialized from the server's reply + def get_issue request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_issue_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ContactCenterInsights::V1::Issue.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_issues REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::ListIssuesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::ListIssuesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::ListIssuesResponse] + # A result object deserialized from the server's reply + def list_issues request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_issues_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ContactCenterInsights::V1::ListIssuesResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_issue REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::UpdateIssueRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::Issue] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::Issue] + # A result object deserialized from the server's reply + def update_issue request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_issue_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ContactCenterInsights::V1::Issue.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_issue REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::DeleteIssueRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_issue request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_issue_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the calculate_issue_model_stats REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsResponse] + # A result object deserialized from the server's reply + def calculate_issue_model_stats request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_calculate_issue_model_stats_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the create_phrase_matcher REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::CreatePhraseMatcherRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher] + # A result object deserialized from the server's reply + def create_phrase_matcher request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_phrase_matcher_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_phrase_matcher REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::GetPhraseMatcherRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher] + # A result object deserialized from the server's reply + def get_phrase_matcher request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_phrase_matcher_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_phrase_matchers REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersResponse] + # A result object deserialized from the server's reply + def list_phrase_matchers request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_phrase_matchers_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_phrase_matcher REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::DeletePhraseMatcherRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_phrase_matcher request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_phrase_matcher_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_phrase_matcher REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::UpdatePhraseMatcherRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher] + # A result object deserialized from the server's reply + def update_phrase_matcher request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_phrase_matcher_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the calculate_stats REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::CalculateStatsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::CalculateStatsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::CalculateStatsResponse] + # A result object deserialized from the server's reply + def calculate_stats request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_calculate_stats_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ContactCenterInsights::V1::CalculateStatsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_settings REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::GetSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::Settings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::Settings] + # A result object deserialized from the server's reply + def get_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ContactCenterInsights::V1::Settings.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_settings REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::UpdateSettingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::Settings] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::Settings] + # A result object deserialized from the server's reply + def update_settings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_settings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ContactCenterInsights::V1::Settings.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_encryption_spec REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::GetEncryptionSpecRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::EncryptionSpec] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::EncryptionSpec] + # A result object deserialized from the server's reply + def get_encryption_spec request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_encryption_spec_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ContactCenterInsights::V1::EncryptionSpec.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the initialize_encryption_spec REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::InitializeEncryptionSpecRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def initialize_encryption_spec request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_initialize_encryption_spec_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the create_view REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::CreateViewRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::View] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::View] + # A result object deserialized from the server's reply + def create_view request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_view_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ContactCenterInsights::V1::View.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_view REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::GetViewRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::View] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::View] + # A result object deserialized from the server's reply + def get_view request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_view_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ContactCenterInsights::V1::View.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_views REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::ListViewsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::ListViewsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::ListViewsResponse] + # A result object deserialized from the server's reply + def list_views request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_views_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ContactCenterInsights::V1::ListViewsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_view REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::UpdateViewRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ContactCenterInsights::V1::View] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ContactCenterInsights::V1::View] + # A result object deserialized from the server's reply + def update_view request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_view_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ContactCenterInsights::V1::View.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_view REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::DeleteViewRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_view request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_view_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # @private + # + # GRPC transcoding helper method for the create_conversation REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::CreateConversationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_conversation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/conversations", + body: "conversation", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the upload_conversation REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::UploadConversationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_upload_conversation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/conversations:upload", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_conversation REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::UpdateConversationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_conversation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{conversation.name}", + body: "conversation", + matches: [ + ["conversation.name", %r{^projects/[^/]+/locations/[^/]+/conversations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_conversation REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::GetConversationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_conversation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/conversations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_conversations REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::ListConversationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_conversations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/conversations", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_conversation REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::DeleteConversationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_conversation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/conversations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_analysis REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_analysis_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/analyses", + body: "analysis", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/conversations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_analysis REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::GetAnalysisRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_analysis_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/conversations/[^/]+/analyses/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_analyses REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::ListAnalysesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_analyses_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/analyses", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/conversations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_analysis REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_analysis_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/conversations/[^/]+/analyses/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the bulk_analyze_conversations REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::BulkAnalyzeConversationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_bulk_analyze_conversations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/conversations:bulkAnalyze", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the bulk_delete_conversations REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::BulkDeleteConversationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_bulk_delete_conversations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/conversations:bulkDelete", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the ingest_conversations REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_ingest_conversations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/conversations:ingest", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the export_insights_data REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_export_insights_data_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/insightsdata:export", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_issue_model REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::CreateIssueModelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_issue_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/issueModels", + body: "issue_model", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_issue_model REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::UpdateIssueModelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_issue_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{issue_model.name}", + body: "issue_model", + matches: [ + ["issue_model.name", %r{^projects/[^/]+/locations/[^/]+/issueModels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_issue_model REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::GetIssueModelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_issue_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/issueModels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_issue_models REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_issue_models_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/issueModels", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_issue_model REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::DeleteIssueModelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_issue_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/issueModels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the deploy_issue_model REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::DeployIssueModelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_deploy_issue_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:deploy", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/issueModels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the undeploy_issue_model REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::UndeployIssueModelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_undeploy_issue_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:undeploy", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/issueModels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the export_issue_model REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::ExportIssueModelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_export_issue_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:export", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/issueModels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the import_issue_model REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::ImportIssueModelRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_import_issue_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/issueModels:import", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_issue REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::GetIssueRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_issue_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/issueModels/[^/]+/issues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_issues REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::ListIssuesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_issues_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/issues", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/issueModels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_issue REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::UpdateIssueRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_issue_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{issue.name}", + body: "issue", + matches: [ + ["issue.name", %r{^projects/[^/]+/locations/[^/]+/issueModels/[^/]+/issues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_issue REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::DeleteIssueRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_issue_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/issueModels/[^/]+/issues/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the calculate_issue_model_stats REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_calculate_issue_model_stats_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{issue_model}:calculateIssueModelStats", + matches: [ + ["issue_model", %r{^projects/[^/]+/locations/[^/]+/issueModels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_phrase_matcher REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::CreatePhraseMatcherRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_phrase_matcher_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/phraseMatchers", + body: "phrase_matcher", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_phrase_matcher REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::GetPhraseMatcherRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_phrase_matcher_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/phraseMatchers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_phrase_matchers REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_phrase_matchers_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/phraseMatchers", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_phrase_matcher REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::DeletePhraseMatcherRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_phrase_matcher_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/phraseMatchers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_phrase_matcher REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::UpdatePhraseMatcherRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_phrase_matcher_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{phrase_matcher.name}", + body: "phrase_matcher", + matches: [ + ["phrase_matcher.name", %r{^projects/[^/]+/locations/[^/]+/phraseMatchers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the calculate_stats REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::CalculateStatsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_calculate_stats_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{location}/conversations:calculateStats", + matches: [ + ["location", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_settings REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::GetSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/settings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_settings REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::UpdateSettingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_settings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{settings.name}", + body: "settings", + matches: [ + ["settings.name", %r{^projects/[^/]+/locations/[^/]+/settings/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_encryption_spec REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::GetEncryptionSpecRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_encryption_spec_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/encryptionSpec/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the initialize_encryption_spec REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::InitializeEncryptionSpecRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_initialize_encryption_spec_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{encryption_spec.name}:initialize", + body: "*", + matches: [ + ["encryption_spec.name", %r{^projects/[^/]+/locations/[^/]+/encryptionSpec/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_view REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::CreateViewRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_view_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/views", + body: "view", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_view REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::GetViewRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_view_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/views/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_views REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::ListViewsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_views_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/views", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_view REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::UpdateViewRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_view_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{view.name}", + body: "view", + matches: [ + ["view.name", %r{^projects/[^/]+/locations/[^/]+/views/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_view REST call + # + # @param request_pb [::Google::Cloud::ContactCenterInsights::V1::DeleteViewRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_view_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/views/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contact_center_insights/v1/rest.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contact_center_insights/v1/rest.rb new file mode 100644 index 000000000000..c96162331fef --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contact_center_insights/v1/rest.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/contact_center_insights/v1/contact_center_insights/rest" +require "google/cloud/contact_center_insights/v1/version" + +module Google + module Cloud + module ContactCenterInsights + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/contact_center_insights/v1/rest" + # client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contact_center_insights/v1/version.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contact_center_insights/v1/version.rb new file mode 100644 index 000000000000..89a1118305c2 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contact_center_insights/v1/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ContactCenterInsights + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contactcenterinsights/v1/contact_center_insights_pb.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contactcenterinsights/v1/contact_center_insights_pb.rb new file mode 100644 index 000000000000..06a4fab82e2e --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contactcenterinsights/v1/contact_center_insights_pb.rb @@ -0,0 +1,143 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/contactcenterinsights/v1/contact_center_insights.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/contactcenterinsights/v1/resources_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nCgoogle/cloud/contactcenterinsights/v1/contact_center_insights.proto\x12%google.cloud.contactcenterinsights.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x35google/cloud/contactcenterinsights/v1/resources.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"d\n\x15\x43\x61lculateStatsRequest\x12;\n\x08location\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\"\x8f\n\n\x16\x43\x61lculateStatsResponse\x12\x33\n\x10\x61verage_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1a\n\x12\x61verage_turn_count\x18\x02 \x01(\x05\x12\x1a\n\x12\x63onversation_count\x18\x03 \x01(\x05\x12}\n\x19smart_highlighter_matches\x18\x04 \x03(\x0b\x32Z.google.cloud.contactcenterinsights.v1.CalculateStatsResponse.SmartHighlighterMatchesEntry\x12\x7f\n\x1a\x63ustom_highlighter_matches\x18\x05 \x03(\x0b\x32[.google.cloud.contactcenterinsights.v1.CalculateStatsResponse.CustomHighlighterMatchesEntry\x12j\n\rissue_matches\x18\x06 \x03(\x0b\x32O.google.cloud.contactcenterinsights.v1.CalculateStatsResponse.IssueMatchesEntryB\x02\x18\x01\x12q\n\x13issue_matches_stats\x18\x08 \x03(\x0b\x32T.google.cloud.contactcenterinsights.v1.CalculateStatsResponse.IssueMatchesStatsEntry\x12p\n\x1e\x63onversation_count_time_series\x18\x07 \x01(\x0b\x32H.google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries\x1a\xfd\x01\n\nTimeSeries\x12\x34\n\x11interval_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x61\n\x06points\x18\x02 \x03(\x0b\x32Q.google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval\x1aV\n\x08Interval\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1a\n\x12\x63onversation_count\x18\x02 \x01(\x05\x1a>\n\x1cSmartHighlighterMatchesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a?\n\x1d\x43ustomHighlighterMatchesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a\x33\n\x11IssueMatchesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a\x80\x01\n\x16IssueMatchesStatsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12U\n\x05value\x18\x02 \x01(\x0b\x32\x46.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats:\x02\x38\x01\"\xb6\x02\n\x1f\x43reateAnalysisOperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12O\n\x0c\x63onversation\x18\x03 \x01(\tB9\xe0\x41\x03\xfa\x41\x33\n1contactcenterinsights.googleapis.com/Conversation\x12Y\n\x12\x61nnotator_selector\x18\x04 \x01(\x0b\x32\x38.google.cloud.contactcenterinsights.v1.AnnotatorSelectorB\x03\xe0\x41\x03\"\xbf\x01\n\x19\x43reateConversationRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12N\n\x0c\x63onversation\x18\x02 \x01(\x0b\x32\x33.google.cloud.contactcenterinsights.v1.ConversationB\x03\xe0\x41\x02\x12\x17\n\x0f\x63onversation_id\x18\x03 \x01(\t\"\xec\x02\n\x19UploadConversationRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12N\n\x0c\x63onversation\x18\x02 \x01(\x0b\x32\x33.google.cloud.contactcenterinsights.v1.ConversationB\x03\xe0\x41\x02\x12\x1c\n\x0f\x63onversation_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12U\n\x10redaction_config\x18\x04 \x01(\x0b\x32\x36.google.cloud.contactcenterinsights.v1.RedactionConfigB\x03\xe0\x41\x01\x12O\n\rspeech_config\x18\x0b \x01(\x0b\x32\x33.google.cloud.contactcenterinsights.v1.SpeechConfigB\x03\xe0\x41\x01\"\xdd\x02\n\x1aUploadConversationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12V\n\x07request\x18\x03 \x01(\x0b\x32@.google.cloud.contactcenterinsights.v1.UploadConversationRequestB\x03\xe0\x41\x03\x12\x1f\n\x12\x61nalysis_operation\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12]\n\x18\x61pplied_redaction_config\x18\x05 \x01(\x0b\x32\x36.google.cloud.contactcenterinsights.v1.RedactionConfigB\x03\xe0\x41\x03\"\xea\x01\n\x18ListConversationsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x15\n\x08order_by\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x04view\x18\x05 \x01(\x0e\x32\x37.google.cloud.contactcenterinsights.v1.ConversationView\"\x80\x01\n\x19ListConversationsResponse\x12J\n\rconversations\x18\x01 \x03(\x0b\x32\x33.google.cloud.contactcenterinsights.v1.Conversation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa8\x01\n\x16GetConversationRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1contactcenterinsights.googleapis.com/Conversation\x12\x45\n\x04view\x18\x02 \x01(\x0e\x32\x37.google.cloud.contactcenterinsights.v1.ConversationView\"\x9c\x01\n\x19UpdateConversationRequest\x12N\n\x0c\x63onversation\x18\x01 \x01(\x0b\x32\x33.google.cloud.contactcenterinsights.v1.ConversationB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"s\n\x19\x44\x65leteConversationRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1contactcenterinsights.googleapis.com/Conversation\x12\r\n\x05\x66orce\x18\x02 \x01(\x08\"\xcb\t\n\x1aIngestConversationsRequest\x12\x61\n\ngcs_source\x18\x02 \x01(\x0b\x32K.google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSourceH\x00\x12|\n\x18transcript_object_config\x18\x03 \x01(\x0b\x32X.google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfigH\x01\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12q\n\x13\x63onversation_config\x18\x04 \x01(\x0b\x32T.google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig\x12U\n\x10redaction_config\x18\x05 \x01(\x0b\x32\x36.google.cloud.contactcenterinsights.v1.RedactionConfigB\x03\xe0\x41\x01\x12O\n\rspeech_config\x18\x06 \x01(\x0b\x32\x33.google.cloud.contactcenterinsights.v1.SpeechConfigB\x03\xe0\x41\x01\x12\x1d\n\x0bsample_size\x18\x07 \x01(\x05\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x1a\xd8\x02\n\tGcsSource\x12\x17\n\nbucket_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12}\n\x12\x62ucket_object_type\x18\x02 \x01(\x0e\x32\\.google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource.BucketObjectTypeB\x03\xe0\x41\x01\x12%\n\x13metadata_bucket_uri\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12!\n\x14\x63ustom_metadata_keys\x18\x0c \x03(\tB\x03\xe0\x41\x01\"Q\n\x10\x42ucketObjectType\x12\"\n\x1e\x42UCKET_OBJECT_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nTRANSCRIPT\x10\x01\x12\t\n\x05\x41UDIO\x10\x02\x42\x16\n\x14_metadata_bucket_uri\x1ai\n\x16TranscriptObjectConfig\x12O\n\x06medium\x18\x01 \x01(\x0e\x32:.google.cloud.contactcenterinsights.v1.Conversation.MediumB\x03\xe0\x41\x02\x1a\x66\n\x12\x43onversationConfig\x12\x15\n\x08\x61gent_id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\ragent_channel\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1d\n\x10\x63ustomer_channel\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x42\x08\n\x06sourceB\x0f\n\robject_configB\x0e\n\x0c_sample_size\"\xc8\x04\n\x1bIngestConversationsMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12W\n\x07request\x18\x03 \x01(\x0b\x32\x41.google.cloud.contactcenterinsights.v1.IngestConversationsRequestB\x03\xe0\x41\x03\x12/\n\x0epartial_errors\x18\x04 \x03(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x84\x01\n\x1aingest_conversations_stats\x18\x05 \x01(\x0b\x32[.google.cloud.contactcenterinsights.v1.IngestConversationsMetadata.IngestConversationsStatsB\x03\xe0\x41\x03\x1a\xae\x01\n\x18IngestConversationsStats\x12#\n\x16processed_object_count\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12%\n\x18\x64uplicates_skipped_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12$\n\x17successful_ingest_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x12 \n\x13\x66\x61iled_ingest_count\x18\x04 \x01(\x05\x42\x03\xe0\x41\x03\"\x1d\n\x1bIngestConversationsResponse\"\xaa\x01\n\x15\x43reateAnalysisRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1contactcenterinsights.googleapis.com/Conversation\x12\x46\n\x08\x61nalysis\x18\x02 \x01(\x0b\x32/.google.cloud.contactcenterinsights.v1.AnalysisB\x03\xe0\x41\x02\"\x97\x01\n\x13ListAnalysesRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1contactcenterinsights.googleapis.com/Conversation\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"r\n\x14ListAnalysesResponse\x12\x41\n\x08\x61nalyses\x18\x01 \x03(\x0b\x32/.google.cloud.contactcenterinsights.v1.Analysis\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"Y\n\x12GetAnalysisRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-contactcenterinsights.googleapis.com/Analysis\"\\\n\x15\x44\x65leteAnalysisRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-contactcenterinsights.googleapis.com/Analysis\"\xe9\x01\n\x1f\x42ulkAnalyzeConversationsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12 \n\x13\x61nalysis_percentage\x18\x03 \x01(\x02\x42\x03\xe0\x41\x02\x12T\n\x12\x61nnotator_selector\x18\x08 \x01(\x0b\x32\x38.google.cloud.contactcenterinsights.v1.AnnotatorSelector\"\xf4\x02\n BulkAnalyzeConversationsMetadata\x12/\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12W\n\x07request\x18\x03 \x01(\x0b\x32\x46.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest\x12 \n\x18\x63ompleted_analyses_count\x18\x04 \x01(\x05\x12\x1d\n\x15\x66\x61iled_analyses_count\x18\x05 \x01(\x05\x12&\n\x1etotal_requested_analyses_count\x18\x06 \x01(\x05\x12/\n\x0epartial_errors\x18\x07 \x03(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\"d\n BulkAnalyzeConversationsResponse\x12!\n\x19successful_analysis_count\x18\x01 \x01(\x05\x12\x1d\n\x15\x66\x61iled_analysis_count\x18\x02 \x01(\x05\"\x94\x01\n\x1e\x42ulkDeleteConversationsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x18\n\x10max_delete_count\x18\x03 \x01(\x05\x12\r\n\x05\x66orce\x18\x04 \x01(\x08\"\x84\x02\n\x1f\x42ulkDeleteConversationsMetadata\x12/\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12V\n\x07request\x18\x03 \x01(\x0b\x32\x45.google.cloud.contactcenterinsights.v1.BulkDeleteConversationsRequest\x12*\n\x0epartial_errors\x18\x04 \x03(\x0b\x32\x12.google.rpc.Status\"!\n\x1f\x42ulkDeleteConversationsResponse\"\x98\x04\n\x19\x45xportInsightsDataRequest\x12u\n\x15\x62ig_query_destination\x18\x02 \x01(\x0b\x32T.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestinationH\x00\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\x12\x0f\n\x07kms_key\x18\x04 \x01(\t\x12l\n\x11write_disposition\x18\x05 \x01(\x0e\x32Q.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.WriteDisposition\x1aN\n\x13\x42igQueryDestination\x12\x12\n\nproject_id\x18\x03 \x01(\t\x12\x14\n\x07\x64\x61taset\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\r\n\x05table\x18\x02 \x01(\t\"[\n\x10WriteDisposition\x12!\n\x1dWRITE_DISPOSITION_UNSPECIFIED\x10\x00\x12\x12\n\x0eWRITE_TRUNCATE\x10\x01\x12\x10\n\x0cWRITE_APPEND\x10\x02\x42\r\n\x0b\x64\x65stination\"\x84\x02\n\x1a\x45xportInsightsDataMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Q\n\x07request\x18\x03 \x01(\x0b\x32@.google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest\x12*\n\x0epartial_errors\x18\x04 \x03(\x0b\x32\x12.google.rpc.Status\"\x1c\n\x1a\x45xportInsightsDataResponse\"\xa1\x01\n\x17\x43reateIssueModelRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12K\n\x0bissue_model\x18\x02 \x01(\x0b\x32\x31.google.cloud.contactcenterinsights.v1.IssueModelB\x03\xe0\x41\x02\"\xd4\x01\n\x18\x43reateIssueModelMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12O\n\x07request\x18\x03 \x01(\x0b\x32>.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest\"\x97\x01\n\x17UpdateIssueModelRequest\x12K\n\x0bissue_model\x18\x01 \x01(\x0b\x32\x31.google.cloud.contactcenterinsights.v1.IssueModelB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"S\n\x16ListIssueModelsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\"b\n\x17ListIssueModelsResponse\x12G\n\x0cissue_models\x18\x01 \x03(\x0b\x32\x31.google.cloud.contactcenterinsights.v1.IssueModel\"]\n\x14GetIssueModelRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/contactcenterinsights.googleapis.com/IssueModel\"`\n\x17\x44\x65leteIssueModelRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/contactcenterinsights.googleapis.com/IssueModel\"\xd4\x01\n\x18\x44\x65leteIssueModelMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12O\n\x07request\x18\x03 \x01(\x0b\x32>.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest\"`\n\x17\x44\x65ployIssueModelRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/contactcenterinsights.googleapis.com/IssueModel\"\x1a\n\x18\x44\x65ployIssueModelResponse\"\xd4\x01\n\x18\x44\x65ployIssueModelMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12O\n\x07request\x18\x03 \x01(\x0b\x32>.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest\"b\n\x19UndeployIssueModelRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/contactcenterinsights.googleapis.com/IssueModel\"\x1c\n\x1aUndeployIssueModelResponse\"\xd8\x01\n\x1aUndeployIssueModelMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Q\n\x07request\x18\x03 \x01(\x0b\x32@.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest\"\x84\x02\n\x17\x45xportIssueModelRequest\x12h\n\x0fgcs_destination\x18\x02 \x01(\x0b\x32M.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestinationH\x00\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/contactcenterinsights.googleapis.com/IssueModel\x1a)\n\x0eGcsDestination\x12\x17\n\nobject_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\r\n\x0b\x44\x65stination\"\x1a\n\x18\x45xportIssueModelResponse\"\xca\x01\n\x18\x45xportIssueModelMetadata\x12/\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12O\n\x07request\x18\x03 \x01(\x0b\x32>.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest\"\x83\x02\n\x17ImportIssueModelRequest\x12^\n\ngcs_source\x18\x02 \x01(\x0b\x32H.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSourceH\x00\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1d\n\x10\x63reate_new_model\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x1a$\n\tGcsSource\x12\x17\n\nobject_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\x08\n\x06Source\"\x1a\n\x18ImportIssueModelResponse\"\xca\x01\n\x18ImportIssueModelMetadata\x12/\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12O\n\x07request\x18\x03 \x01(\x0b\x32>.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest\"S\n\x0fGetIssueRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*contactcenterinsights.googleapis.com/Issue\"\\\n\x11ListIssuesRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/contactcenterinsights.googleapis.com/IssueModel\"R\n\x12ListIssuesResponse\x12<\n\x06issues\x18\x01 \x03(\x0b\x32,.google.cloud.contactcenterinsights.v1.Issue\"\x87\x01\n\x12UpdateIssueRequest\x12@\n\x05issue\x18\x01 \x01(\x0b\x32,.google.cloud.contactcenterinsights.v1.IssueB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"V\n\x12\x44\x65leteIssueRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*contactcenterinsights.googleapis.com/Issue\"o\n\x1f\x43\x61lculateIssueModelStatsRequest\x12L\n\x0bissue_model\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/contactcenterinsights.googleapis.com/IssueModel\"v\n CalculateIssueModelStatsResponse\x12R\n\rcurrent_stats\x18\x04 \x01(\x0b\x32;.google.cloud.contactcenterinsights.v1.IssueModelLabelStats\"\xaa\x01\n\x1a\x43reatePhraseMatcherRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12Q\n\x0ephrase_matcher\x18\x02 \x01(\x0b\x32\x34.google.cloud.contactcenterinsights.v1.PhraseMatcherB\x03\xe0\x41\x02\"\x8d\x01\n\x19ListPhraseMatchersRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"\x84\x01\n\x1aListPhraseMatchersResponse\x12M\n\x0fphrase_matchers\x18\x01 \x03(\x0b\x32\x34.google.cloud.contactcenterinsights.v1.PhraseMatcher\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"c\n\x17GetPhraseMatcherRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2contactcenterinsights.googleapis.com/PhraseMatcher\"f\n\x1a\x44\x65letePhraseMatcherRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2contactcenterinsights.googleapis.com/PhraseMatcher\"\xa0\x01\n\x1aUpdatePhraseMatcherRequest\x12Q\n\x0ephrase_matcher\x18\x01 \x01(\x0b\x32\x34.google.cloud.contactcenterinsights.v1.PhraseMatcherB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"Y\n\x12GetSettingsRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-contactcenterinsights.googleapis.com/Settings\"\x95\x01\n\x15UpdateSettingsRequest\x12\x46\n\x08settings\x18\x01 \x01(\x0b\x32/.google.cloud.contactcenterinsights.v1.SettingsB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"e\n\x18GetEncryptionSpecRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3contactcenterinsights.googleapis.com/EncryptionSpec\"v\n\x1fInitializeEncryptionSpecRequest\x12S\n\x0f\x65ncryption_spec\x18\x01 \x01(\x0b\x32\x35.google.cloud.contactcenterinsights.v1.EncryptionSpecB\x03\xe0\x41\x02\"\"\n InitializeEncryptionSpecResponse\"\x95\x02\n InitializeEncryptionSpecMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\\\n\x07request\x18\x03 \x01(\x0b\x32\x46.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequestB\x03\xe0\x41\x03\x12*\n\x0epartial_errors\x18\x04 \x03(\x0b\x32\x12.google.rpc.Status\"\x8e\x01\n\x11\x43reateViewRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12>\n\x04view\x18\x02 \x01(\x0b\x32+.google.cloud.contactcenterinsights.v1.ViewB\x03\xe0\x41\x02\"Q\n\x0eGetViewRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)contactcenterinsights.googleapis.com/View\"t\n\x10ListViewsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"h\n\x11ListViewsResponse\x12:\n\x05views\x18\x01 \x03(\x0b\x32+.google.cloud.contactcenterinsights.v1.View\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x84\x01\n\x11UpdateViewRequest\x12>\n\x04view\x18\x01 \x01(\x0b\x32+.google.cloud.contactcenterinsights.v1.ViewB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"T\n\x11\x44\x65leteViewRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)contactcenterinsights.googleapis.com/View*J\n\x10\x43onversationView\x12!\n\x1d\x43ONVERSATION_VIEW_UNSPECIFIED\x10\x00\x12\x08\n\x04\x46ULL\x10\x02\x12\t\n\x05\x42\x41SIC\x10\x01\x32\xceL\n\x15\x43ontactCenterInsights\x12\xfa\x01\n\x12\x43reateConversation\x12@.google.cloud.contactcenterinsights.v1.CreateConversationRequest\x1a\x33.google.cloud.contactcenterinsights.v1.Conversation\"m\xda\x41#parent,conversation,conversation_id\x82\xd3\xe4\x93\x02\x41\"1/v1/{parent=projects/*/locations/*}/conversations:\x0c\x63onversation\x12\xe7\x01\n\x12UploadConversation\x12@.google.cloud.contactcenterinsights.v1.UploadConversationRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41*\n\x0c\x43onversation\x12\x1aUploadConversationMetadata\x82\xd3\xe4\x93\x02=\"8/v1/{parent=projects/*/locations/*}/conversations:upload:\x01*\x12\xfc\x01\n\x12UpdateConversation\x12@.google.cloud.contactcenterinsights.v1.UpdateConversationRequest\x1a\x33.google.cloud.contactcenterinsights.v1.Conversation\"o\xda\x41\x18\x63onversation,update_mask\x82\xd3\xe4\x93\x02N2>/v1/{conversation.name=projects/*/locations/*/conversations/*}:\x0c\x63onversation\x12\xc7\x01\n\x0fGetConversation\x12=.google.cloud.contactcenterinsights.v1.GetConversationRequest\x1a\x33.google.cloud.contactcenterinsights.v1.Conversation\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{name=projects/*/locations/*/conversations/*}\x12\xda\x01\n\x11ListConversations\x12?.google.cloud.contactcenterinsights.v1.ListConversationsRequest\x1a@.google.cloud.contactcenterinsights.v1.ListConversationsResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v1/{parent=projects/*/locations/*}/conversations\x12\xb0\x01\n\x12\x44\x65leteConversation\x12@.google.cloud.contactcenterinsights.v1.DeleteConversationRequest\x1a\x16.google.protobuf.Empty\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33*1/v1/{name=projects/*/locations/*/conversations/*}\x12\xfe\x01\n\x0e\x43reateAnalysis\x12<.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest\x1a\x1d.google.longrunning.Operation\"\x8e\x01\xca\x41+\n\x08\x41nalysis\x12\x1f\x43reateAnalysisOperationMetadata\xda\x41\x0fparent,analysis\x82\xd3\xe4\x93\x02H\"\x12\x12*.google.cloud.contactcenterinsights.v1.CreateIssueModelRequest\x1a\x1d.google.longrunning.Operation\"\x82\x01\xca\x41&\n\nIssueModel\x12\x18\x43reateIssueModelMetadata\xda\x41\x12parent,issue_model\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/issueModels:\x0bissue_model\x12\xf1\x01\n\x10UpdateIssueModel\x12>.google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest\x1a\x31.google.cloud.contactcenterinsights.v1.IssueModel\"j\xda\x41\x17issue_model,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{issue_model.name=projects/*/locations/*/issueModels/*}:\x0bissue_model\x12\xbf\x01\n\rGetIssueModel\x12;.google.cloud.contactcenterinsights.v1.GetIssueModelRequest\x1a\x31.google.cloud.contactcenterinsights.v1.IssueModel\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/issueModels/*}\x12\xd2\x01\n\x0fListIssueModels\x12=.google.cloud.contactcenterinsights.v1.ListIssueModelsRequest\x1a>.google.cloud.contactcenterinsights.v1.ListIssueModelsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/issueModels\x12\xe5\x01\n\x10\x44\x65leteIssueModel\x12>.google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest\x1a\x1d.google.longrunning.Operation\"r\xca\x41\x31\n\x15google.protobuf.Empty\x12\x18\x44\x65leteIssueModelMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/issueModels/*}\x12\xf2\x01\n\x10\x44\x65ployIssueModel\x12>.google.cloud.contactcenterinsights.v1.DeployIssueModelRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41\x34\n\x18\x44\x65ployIssueModelResponse\x12\x18\x44\x65ployIssueModelMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02;\"6/v1/{name=projects/*/locations/*/issueModels/*}:deploy:\x01*\x12\xfd\x01\n\x12UndeployIssueModel\x12@.google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest\x1a\x1d.google.longrunning.Operation\"\x85\x01\xca\x41\x38\n\x1aUndeployIssueModelResponse\x12\x1aUndeployIssueModelMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02=\"8/v1/{name=projects/*/locations/*/issueModels/*}:undeploy:\x01*\x12\xf2\x01\n\x10\x45xportIssueModel\x12>.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41\x34\n\x18\x45xportIssueModelResponse\x12\x18\x45xportIssueModelMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02;\"6/v1/{name=projects/*/locations/*/issueModels/*}:export:\x01*\x12\xf5\x01\n\x10ImportIssueModel\x12>.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest\x1a\x1d.google.longrunning.Operation\"\x81\x01\xca\x41\x34\n\x18ImportIssueModelResponse\x12\x18ImportIssueModelMetadata\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\"6/v1/{parent=projects/*/locations/*}/issueModels:import:\x01*\x12\xb9\x01\n\x08GetIssue\x12\x36.google.cloud.contactcenterinsights.v1.GetIssueRequest\x1a,.google.cloud.contactcenterinsights.v1.Issue\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/locations/*/issueModels/*/issues/*}\x12\xcc\x01\n\nListIssues\x12\x38.google.cloud.contactcenterinsights.v1.ListIssuesRequest\x1a\x39.google.cloud.contactcenterinsights.v1.ListIssuesResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*/issueModels/*}/issues\x12\xd9\x01\n\x0bUpdateIssue\x12\x39.google.cloud.contactcenterinsights.v1.UpdateIssueRequest\x1a,.google.cloud.contactcenterinsights.v1.Issue\"a\xda\x41\x11issue,update_mask\x82\xd3\xe4\x93\x02G2>/v1/{issue.name=projects/*/locations/*/issueModels/*/issues/*}:\x05issue\x12\xa9\x01\n\x0b\x44\x65leteIssue\x12\x39.google.cloud.contactcenterinsights.v1.DeleteIssueRequest\x1a\x16.google.protobuf.Empty\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:*8/v1/{name=projects/*/locations/*/issueModels/*/issues/*}\x12\x92\x02\n\x18\x43\x61lculateIssueModelStats\x12\x46.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest\x1aG.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse\"e\xda\x41\x0bissue_model\x82\xd3\xe4\x93\x02Q\x12O/v1/{issue_model=projects/*/locations/*/issueModels/*}:calculateIssueModelStats\x12\xf2\x01\n\x13\x43reatePhraseMatcher\x12\x41.google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest\x1a\x34.google.cloud.contactcenterinsights.v1.PhraseMatcher\"b\xda\x41\x15parent,phrase_matcher\x82\xd3\xe4\x93\x02\x44\"2/v1/{parent=projects/*/locations/*}/phraseMatchers:\x0ephrase_matcher\x12\xcb\x01\n\x10GetPhraseMatcher\x12>.google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest\x1a\x34.google.cloud.contactcenterinsights.v1.PhraseMatcher\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{name=projects/*/locations/*/phraseMatchers/*}\x12\xde\x01\n\x12ListPhraseMatchers\x12@.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest\x1a\x41.google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{parent=projects/*/locations/*}/phraseMatchers\x12\xb3\x01\n\x13\x44\x65letePhraseMatcher\x12\x41.google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest\x1a\x16.google.protobuf.Empty\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/v1/{name=projects/*/locations/*/phraseMatchers/*}\x12\x86\x02\n\x13UpdatePhraseMatcher\x12\x41.google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest\x1a\x34.google.cloud.contactcenterinsights.v1.PhraseMatcher\"v\xda\x41\x1aphrase_matcher,update_mask\x82\xd3\xe4\x93\x02S2A/v1/{phrase_matcher.name=projects/*/locations/*/phraseMatchers/*}:\x0ephrase_matcher\x12\xe4\x01\n\x0e\x43\x61lculateStats\x12<.google.cloud.contactcenterinsights.v1.CalculateStatsRequest\x1a=.google.cloud.contactcenterinsights.v1.CalculateStatsResponse\"U\xda\x41\x08location\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{location=projects/*/locations/*}/conversations:calculateStats\x12\xb4\x01\n\x0bGetSettings\x12\x39.google.cloud.contactcenterinsights.v1.GetSettingsRequest\x1a/.google.cloud.contactcenterinsights.v1.Settings\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=projects/*/locations/*/settings}\x12\xdd\x01\n\x0eUpdateSettings\x12<.google.cloud.contactcenterinsights.v1.UpdateSettingsRequest\x1a/.google.cloud.contactcenterinsights.v1.Settings\"\\\xda\x41\x14settings,update_mask\x82\xd3\xe4\x93\x02?23/v1/{settings.name=projects/*/locations/*/settings}:\x08settings\x12\xcc\x01\n\x11GetEncryptionSpec\x12?.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest\x1a\x35.google.cloud.contactcenterinsights.v1.EncryptionSpec\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/locations/*/encryptionSpec}\x12\xb3\x02\n\x18InitializeEncryptionSpec\x12\x46.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest\x1a\x1d.google.longrunning.Operation\"\xaf\x01\xca\x41\x44\n InitializeEncryptionSpecResponse\x12 InitializeEncryptionSpecMetadata\xda\x41\x0f\x65ncryption_spec\x82\xd3\xe4\x93\x02P\"K/v1/{encryption_spec.name=projects/*/locations/*/encryptionSpec}:initialize:\x01*\x12\xba\x01\n\nCreateView\x12\x38.google.cloud.contactcenterinsights.v1.CreateViewRequest\x1a+.google.cloud.contactcenterinsights.v1.View\"E\xda\x41\x0bparent,view\x82\xd3\xe4\x93\x02\x31\")/v1/{parent=projects/*/locations/*}/views:\x04view\x12\xa7\x01\n\x07GetView\x12\x35.google.cloud.contactcenterinsights.v1.GetViewRequest\x1a+.google.cloud.contactcenterinsights.v1.View\"8\xda\x41\x04name\x82\xd3\xe4\x93\x02+\x12)/v1/{name=projects/*/locations/*/views/*}\x12\xba\x01\n\tListViews\x12\x37.google.cloud.contactcenterinsights.v1.ListViewsRequest\x1a\x38.google.cloud.contactcenterinsights.v1.ListViewsResponse\":\xda\x41\x06parent\x82\xd3\xe4\x93\x02+\x12)/v1/{parent=projects/*/locations/*}/views\x12\xc4\x01\n\nUpdateView\x12\x38.google.cloud.contactcenterinsights.v1.UpdateViewRequest\x1a+.google.cloud.contactcenterinsights.v1.View\"O\xda\x41\x10view,update_mask\x82\xd3\xe4\x93\x02\x36\x32./v1/{view.name=projects/*/locations/*/views/*}:\x04view\x12\x98\x01\n\nDeleteView\x12\x38.google.cloud.contactcenterinsights.v1.DeleteViewRequest\x1a\x16.google.protobuf.Empty\"8\xda\x41\x04name\x82\xd3\xe4\x93\x02+*)/v1/{name=projects/*/locations/*/views/*}\x1aX\xca\x41$contactcenterinsights.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa5\x02\n)com.google.cloud.contactcenterinsights.v1B\x1a\x43ontactCenterInsightsProtoP\x01Z_cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb;contactcenterinsightspb\xaa\x02%Google.Cloud.ContactCenterInsights.V1\xca\x02%Google\\Cloud\\ContactCenterInsights\\V1\xea\x02(Google::Cloud::ContactCenterInsights::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Duration", "google/protobuf/duration.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats", "google/cloud/contactcenterinsights/v1/resources.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ["google.rpc.Status", "google/rpc/status.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module ContactCenterInsights + module V1 + CalculateStatsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.CalculateStatsRequest").msgclass + CalculateStatsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.CalculateStatsResponse").msgclass + CalculateStatsResponse::TimeSeries = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries").msgclass + CalculateStatsResponse::TimeSeries::Interval = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.CalculateStatsResponse.TimeSeries.Interval").msgclass + CreateAnalysisOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata").msgclass + CreateConversationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.CreateConversationRequest").msgclass + UploadConversationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.UploadConversationRequest").msgclass + UploadConversationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.UploadConversationMetadata").msgclass + ListConversationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.ListConversationsRequest").msgclass + ListConversationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.ListConversationsResponse").msgclass + GetConversationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.GetConversationRequest").msgclass + UpdateConversationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.UpdateConversationRequest").msgclass + DeleteConversationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.DeleteConversationRequest").msgclass + IngestConversationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.IngestConversationsRequest").msgclass + IngestConversationsRequest::GcsSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource").msgclass + IngestConversationsRequest::GcsSource::BucketObjectType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource.BucketObjectType").enummodule + IngestConversationsRequest::TranscriptObjectConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig").msgclass + IngestConversationsRequest::ConversationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig").msgclass + IngestConversationsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.IngestConversationsMetadata").msgclass + IngestConversationsMetadata::IngestConversationsStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.IngestConversationsMetadata.IngestConversationsStats").msgclass + IngestConversationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.IngestConversationsResponse").msgclass + CreateAnalysisRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.CreateAnalysisRequest").msgclass + ListAnalysesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.ListAnalysesRequest").msgclass + ListAnalysesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.ListAnalysesResponse").msgclass + GetAnalysisRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.GetAnalysisRequest").msgclass + DeleteAnalysisRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest").msgclass + BulkAnalyzeConversationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest").msgclass + BulkAnalyzeConversationsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata").msgclass + BulkAnalyzeConversationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse").msgclass + BulkDeleteConversationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.BulkDeleteConversationsRequest").msgclass + BulkDeleteConversationsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.BulkDeleteConversationsMetadata").msgclass + BulkDeleteConversationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.BulkDeleteConversationsResponse").msgclass + ExportInsightsDataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest").msgclass + ExportInsightsDataRequest::BigQueryDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.BigQueryDestination").msgclass + ExportInsightsDataRequest::WriteDisposition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.ExportInsightsDataRequest.WriteDisposition").enummodule + ExportInsightsDataMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.ExportInsightsDataMetadata").msgclass + ExportInsightsDataResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse").msgclass + CreateIssueModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.CreateIssueModelRequest").msgclass + CreateIssueModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.CreateIssueModelMetadata").msgclass + UpdateIssueModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.UpdateIssueModelRequest").msgclass + ListIssueModelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.ListIssueModelsRequest").msgclass + ListIssueModelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.ListIssueModelsResponse").msgclass + GetIssueModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.GetIssueModelRequest").msgclass + DeleteIssueModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.DeleteIssueModelRequest").msgclass + DeleteIssueModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.DeleteIssueModelMetadata").msgclass + DeployIssueModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.DeployIssueModelRequest").msgclass + DeployIssueModelResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.DeployIssueModelResponse").msgclass + DeployIssueModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.DeployIssueModelMetadata").msgclass + UndeployIssueModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.UndeployIssueModelRequest").msgclass + UndeployIssueModelResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.UndeployIssueModelResponse").msgclass + UndeployIssueModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata").msgclass + ExportIssueModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.ExportIssueModelRequest").msgclass + ExportIssueModelRequest::GcsDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination").msgclass + ExportIssueModelResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.ExportIssueModelResponse").msgclass + ExportIssueModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata").msgclass + ImportIssueModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.ImportIssueModelRequest").msgclass + ImportIssueModelRequest::GcsSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource").msgclass + ImportIssueModelResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.ImportIssueModelResponse").msgclass + ImportIssueModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata").msgclass + GetIssueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.GetIssueRequest").msgclass + ListIssuesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.ListIssuesRequest").msgclass + ListIssuesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.ListIssuesResponse").msgclass + UpdateIssueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.UpdateIssueRequest").msgclass + DeleteIssueRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.DeleteIssueRequest").msgclass + CalculateIssueModelStatsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest").msgclass + CalculateIssueModelStatsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse").msgclass + CreatePhraseMatcherRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest").msgclass + ListPhraseMatchersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest").msgclass + ListPhraseMatchersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse").msgclass + GetPhraseMatcherRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest").msgclass + DeletePhraseMatcherRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest").msgclass + UpdatePhraseMatcherRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest").msgclass + GetSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.GetSettingsRequest").msgclass + UpdateSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.UpdateSettingsRequest").msgclass + GetEncryptionSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest").msgclass + InitializeEncryptionSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest").msgclass + InitializeEncryptionSpecResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse").msgclass + InitializeEncryptionSpecMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata").msgclass + CreateViewRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.CreateViewRequest").msgclass + GetViewRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.GetViewRequest").msgclass + ListViewsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.ListViewsRequest").msgclass + ListViewsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.ListViewsResponse").msgclass + UpdateViewRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.UpdateViewRequest").msgclass + DeleteViewRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.DeleteViewRequest").msgclass + ConversationView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.ConversationView").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contactcenterinsights/v1/contact_center_insights_services_pb.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contactcenterinsights/v1/contact_center_insights_services_pb.rb new file mode 100644 index 000000000000..2a54ee795988 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contactcenterinsights/v1/contact_center_insights_services_pb.rb @@ -0,0 +1,141 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/contactcenterinsights/v1/contact_center_insights.proto for package 'Google.Cloud.ContactCenterInsights.V1' +# Original file comments: +# 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 +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/contactcenterinsights/v1/contact_center_insights_pb' + +module Google + module Cloud + module ContactCenterInsights + module V1 + module ContactCenterInsights + # An API that lets users analyze and explore their business conversation data. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.contactcenterinsights.v1.ContactCenterInsights' + + # Creates a conversation. + # Note that this method does not support audio transcription or redaction. + # Use `conversations.upload` instead. + rpc :CreateConversation, ::Google::Cloud::ContactCenterInsights::V1::CreateConversationRequest, ::Google::Cloud::ContactCenterInsights::V1::Conversation + # Create a long-running conversation upload operation. This method differs + # from `CreateConversation` by allowing audio transcription and optional DLP + # redaction. + rpc :UploadConversation, ::Google::Cloud::ContactCenterInsights::V1::UploadConversationRequest, ::Google::Longrunning::Operation + # Updates a conversation. + rpc :UpdateConversation, ::Google::Cloud::ContactCenterInsights::V1::UpdateConversationRequest, ::Google::Cloud::ContactCenterInsights::V1::Conversation + # Gets a conversation. + rpc :GetConversation, ::Google::Cloud::ContactCenterInsights::V1::GetConversationRequest, ::Google::Cloud::ContactCenterInsights::V1::Conversation + # Lists conversations. + rpc :ListConversations, ::Google::Cloud::ContactCenterInsights::V1::ListConversationsRequest, ::Google::Cloud::ContactCenterInsights::V1::ListConversationsResponse + # Deletes a conversation. + rpc :DeleteConversation, ::Google::Cloud::ContactCenterInsights::V1::DeleteConversationRequest, ::Google::Protobuf::Empty + # Creates an analysis. The long running operation is done when the analysis + # has completed. + rpc :CreateAnalysis, ::Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRequest, ::Google::Longrunning::Operation + # Gets an analysis. + rpc :GetAnalysis, ::Google::Cloud::ContactCenterInsights::V1::GetAnalysisRequest, ::Google::Cloud::ContactCenterInsights::V1::Analysis + # Lists analyses. + rpc :ListAnalyses, ::Google::Cloud::ContactCenterInsights::V1::ListAnalysesRequest, ::Google::Cloud::ContactCenterInsights::V1::ListAnalysesResponse + # Deletes an analysis. + rpc :DeleteAnalysis, ::Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRequest, ::Google::Protobuf::Empty + # Analyzes multiple conversations in a single request. + rpc :BulkAnalyzeConversations, ::Google::Cloud::ContactCenterInsights::V1::BulkAnalyzeConversationsRequest, ::Google::Longrunning::Operation + # Deletes multiple conversations in a single request. + rpc :BulkDeleteConversations, ::Google::Cloud::ContactCenterInsights::V1::BulkDeleteConversationsRequest, ::Google::Longrunning::Operation + # Imports conversations and processes them according to the user's + # configuration. + rpc :IngestConversations, ::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest, ::Google::Longrunning::Operation + # Export insights data to a destination defined in the request body. + rpc :ExportInsightsData, ::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest, ::Google::Longrunning::Operation + # Creates an issue model. + rpc :CreateIssueModel, ::Google::Cloud::ContactCenterInsights::V1::CreateIssueModelRequest, ::Google::Longrunning::Operation + # Updates an issue model. + rpc :UpdateIssueModel, ::Google::Cloud::ContactCenterInsights::V1::UpdateIssueModelRequest, ::Google::Cloud::ContactCenterInsights::V1::IssueModel + # Gets an issue model. + rpc :GetIssueModel, ::Google::Cloud::ContactCenterInsights::V1::GetIssueModelRequest, ::Google::Cloud::ContactCenterInsights::V1::IssueModel + # Lists issue models. + rpc :ListIssueModels, ::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsRequest, ::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsResponse + # Deletes an issue model. + rpc :DeleteIssueModel, ::Google::Cloud::ContactCenterInsights::V1::DeleteIssueModelRequest, ::Google::Longrunning::Operation + # 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. + rpc :DeployIssueModel, ::Google::Cloud::ContactCenterInsights::V1::DeployIssueModelRequest, ::Google::Longrunning::Operation + # Undeploys an issue model. + # An issue model can not be used in analysis after it has been undeployed. + rpc :UndeployIssueModel, ::Google::Cloud::ContactCenterInsights::V1::UndeployIssueModelRequest, ::Google::Longrunning::Operation + # Exports an issue model to the provided destination. + rpc :ExportIssueModel, ::Google::Cloud::ContactCenterInsights::V1::ExportIssueModelRequest, ::Google::Longrunning::Operation + # Imports an issue model from a Cloud Storage bucket. + rpc :ImportIssueModel, ::Google::Cloud::ContactCenterInsights::V1::ImportIssueModelRequest, ::Google::Longrunning::Operation + # Gets an issue. + rpc :GetIssue, ::Google::Cloud::ContactCenterInsights::V1::GetIssueRequest, ::Google::Cloud::ContactCenterInsights::V1::Issue + # Lists issues. + rpc :ListIssues, ::Google::Cloud::ContactCenterInsights::V1::ListIssuesRequest, ::Google::Cloud::ContactCenterInsights::V1::ListIssuesResponse + # Updates an issue. + rpc :UpdateIssue, ::Google::Cloud::ContactCenterInsights::V1::UpdateIssueRequest, ::Google::Cloud::ContactCenterInsights::V1::Issue + # Deletes an issue. + rpc :DeleteIssue, ::Google::Cloud::ContactCenterInsights::V1::DeleteIssueRequest, ::Google::Protobuf::Empty + # Gets an issue model's statistics. + rpc :CalculateIssueModelStats, ::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsRequest, ::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsResponse + # Creates a phrase matcher. + rpc :CreatePhraseMatcher, ::Google::Cloud::ContactCenterInsights::V1::CreatePhraseMatcherRequest, ::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher + # Gets a phrase matcher. + rpc :GetPhraseMatcher, ::Google::Cloud::ContactCenterInsights::V1::GetPhraseMatcherRequest, ::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher + # Lists phrase matchers. + rpc :ListPhraseMatchers, ::Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersRequest, ::Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersResponse + # Deletes a phrase matcher. + rpc :DeletePhraseMatcher, ::Google::Cloud::ContactCenterInsights::V1::DeletePhraseMatcherRequest, ::Google::Protobuf::Empty + # Updates a phrase matcher. + rpc :UpdatePhraseMatcher, ::Google::Cloud::ContactCenterInsights::V1::UpdatePhraseMatcherRequest, ::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher + # Gets conversation statistics. + rpc :CalculateStats, ::Google::Cloud::ContactCenterInsights::V1::CalculateStatsRequest, ::Google::Cloud::ContactCenterInsights::V1::CalculateStatsResponse + # Gets project-level settings. + rpc :GetSettings, ::Google::Cloud::ContactCenterInsights::V1::GetSettingsRequest, ::Google::Cloud::ContactCenterInsights::V1::Settings + # Updates project-level settings. + rpc :UpdateSettings, ::Google::Cloud::ContactCenterInsights::V1::UpdateSettingsRequest, ::Google::Cloud::ContactCenterInsights::V1::Settings + # Gets location-level encryption key specification. + rpc :GetEncryptionSpec, ::Google::Cloud::ContactCenterInsights::V1::GetEncryptionSpecRequest, ::Google::Cloud::ContactCenterInsights::V1::EncryptionSpec + # 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. + rpc :InitializeEncryptionSpec, ::Google::Cloud::ContactCenterInsights::V1::InitializeEncryptionSpecRequest, ::Google::Longrunning::Operation + # Creates a view. + rpc :CreateView, ::Google::Cloud::ContactCenterInsights::V1::CreateViewRequest, ::Google::Cloud::ContactCenterInsights::V1::View + # Gets a view. + rpc :GetView, ::Google::Cloud::ContactCenterInsights::V1::GetViewRequest, ::Google::Cloud::ContactCenterInsights::V1::View + # Lists views. + rpc :ListViews, ::Google::Cloud::ContactCenterInsights::V1::ListViewsRequest, ::Google::Cloud::ContactCenterInsights::V1::ListViewsResponse + # Updates a view. + rpc :UpdateView, ::Google::Cloud::ContactCenterInsights::V1::UpdateViewRequest, ::Google::Cloud::ContactCenterInsights::V1::View + # Deletes a view. + rpc :DeleteView, ::Google::Cloud::ContactCenterInsights::V1::DeleteViewRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contactcenterinsights/v1/resources_pb.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contactcenterinsights/v1/resources_pb.rb new file mode 100644 index 000000000000..4ef348a28826 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/lib/google/cloud/contactcenterinsights/v1/resources_pb.rb @@ -0,0 +1,118 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/contactcenterinsights/v1/resources.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n5google/cloud/contactcenterinsights/v1/resources.proto\x12%google.cloud.contactcenterinsights.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd8\x17\n\x0c\x43onversation\x12Y\n\rcall_metadata\x18\x07 \x01(\x0b\x32@.google.cloud.contactcenterinsights.v1.Conversation.CallMetadataH\x00\x12\x31\n\x0b\x65xpire_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x12-\n\x03ttl\x18\x10 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x04H\x01\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12R\n\x0b\x64\x61ta_source\x18\x02 \x01(\x0b\x32=.google.cloud.contactcenterinsights.v1.ConversationDataSource\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12.\n\nstart_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x15\n\rlanguage_code\x18\x0e \x01(\t\x12\x10\n\x08\x61gent_id\x18\x05 \x01(\t\x12O\n\x06labels\x18\x06 \x03(\x0b\x32?.google.cloud.contactcenterinsights.v1.Conversation.LabelsEntry\x12]\n\x10quality_metadata\x18\x18 \x01(\x0b\x32\x43.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata\x12\x1a\n\rmetadata_json\x18\x19 \x01(\tB\x03\xe0\x41\x04\x12W\n\ntranscript\x18\x08 \x01(\x0b\x32>.google.cloud.contactcenterinsights.v1.Conversation.TranscriptB\x03\xe0\x41\x03\x12O\n\x06medium\x18\t \x01(\x0e\x32:.google.cloud.contactcenterinsights.v1.Conversation.MediumB\x03\xe0\x41\x05\x12\x30\n\x08\x64uration\x18\n \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12\x17\n\nturn_count\x18\x0b \x01(\x05\x42\x03\xe0\x41\x03\x12M\n\x0flatest_analysis\x18\x0c \x01(\x0b\x32/.google.cloud.contactcenterinsights.v1.AnalysisB\x03\xe0\x41\x03\x12k\n\x0elatest_summary\x18\x14 \x01(\x0b\x32N.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionDataB\x03\xe0\x41\x03\x12Z\n\x13runtime_annotations\x18\r \x03(\x0b\x32\x38.google.cloud.contactcenterinsights.v1.RuntimeAnnotationB\x03\xe0\x41\x03\x12k\n\x12\x64ialogflow_intents\x18\x12 \x03(\x0b\x32J.google.cloud.contactcenterinsights.v1.Conversation.DialogflowIntentsEntryB\x03\xe0\x41\x03\x12\x1a\n\x12obfuscated_user_id\x18\x15 \x01(\t\x1a?\n\x0c\x43\x61llMetadata\x12\x18\n\x10\x63ustomer_channel\x18\x01 \x01(\x05\x12\x15\n\ragent_channel\x18\x02 \x01(\x05\x1a\xbc\x02\n\x0fQualityMetadata\x12$\n\x1c\x63ustomer_satisfaction_rating\x18\x01 \x01(\x05\x12\x30\n\rwait_duration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x11\n\tmenu_path\x18\x03 \x01(\t\x12\x61\n\nagent_info\x18\x04 \x03(\x0b\x32M.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo\x1a[\n\tAgentInfo\x12\x10\n\x08\x61gent_id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x0c\n\x04team\x18\x03 \x01(\t\x12\x18\n\x10\x64isposition_code\x18\x04 \x01(\t\x1a\x86\x07\n\nTranscript\x12m\n\x13transcript_segments\x18\x01 \x03(\x0b\x32P.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment\x1a\x88\x06\n\x11TranscriptSegment\x12\x30\n\x0cmessage_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04text\x18\x01 \x01(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x12h\n\x05words\x18\x03 \x03(\x0b\x32Y.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo\x12\x15\n\rlanguage_code\x18\x04 \x01(\t\x12\x13\n\x0b\x63hannel_tag\x18\x05 \x01(\x05\x12[\n\x13segment_participant\x18\t \x01(\x0b\x32>.google.cloud.contactcenterinsights.v1.ConversationParticipant\x12\x8f\x01\n\x1b\x64ialogflow_segment_metadata\x18\n \x01(\x0b\x32j.google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata\x12G\n\tsentiment\x18\x0b \x01(\x0b\x32\x34.google.cloud.contactcenterinsights.v1.SentimentData\x1a\x8c\x01\n\x08WordInfo\x12/\n\x0cstart_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12-\n\nend_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0c\n\x04word\x18\x03 \x01(\t\x12\x12\n\nconfidence\x18\x04 \x01(\x02\x1a\x42\n\x19\x44ialogflowSegmentMetadata\x12%\n\x1dsmart_reply_allowlist_covered\x18\x01 \x01(\x08\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aq\n\x16\x44ialogflowIntentsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.google.cloud.contactcenterinsights.v1.DialogflowIntent:\x02\x38\x01\":\n\x06Medium\x12\x16\n\x12MEDIUM_UNSPECIFIED\x10\x00\x12\x0e\n\nPHONE_CALL\x10\x01\x12\x08\n\x04\x43HAT\x10\x02:|\xea\x41y\n1contactcenterinsights.googleapis.com/Conversation\x12\x44projects/{project}/locations/{location}/conversations/{conversation}B\n\n\x08metadataB\x0c\n\nexpiration\"\xc5\x03\n\x08\x41nalysis\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x35\n\x0crequest_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12S\n\x0f\x61nalysis_result\x18\x07 \x01(\x0b\x32\x35.google.cloud.contactcenterinsights.v1.AnalysisResultB\x03\xe0\x41\x03\x12T\n\x12\x61nnotator_selector\x18\x08 \x01(\x0b\x32\x38.google.cloud.contactcenterinsights.v1.AnnotatorSelector:\x8d\x01\xea\x41\x89\x01\n-contactcenterinsights.googleapis.com/Analysis\x12Xprojects/{project}/locations/{location}/conversations/{conversation}/analyses/{analysis}\"\xc0\x01\n\x16\x43onversationDataSource\x12\x46\n\ngcs_source\x18\x01 \x01(\x0b\x32\x30.google.cloud.contactcenterinsights.v1.GcsSourceH\x00\x12T\n\x11\x64ialogflow_source\x18\x03 \x01(\x0b\x32\x37.google.cloud.contactcenterinsights.v1.DialogflowSourceH\x00\x42\x08\n\x06source\";\n\tGcsSource\x12\x11\n\taudio_uri\x18\x01 \x01(\t\x12\x1b\n\x0etranscript_uri\x18\x02 \x01(\tB\x03\xe0\x41\x05\"K\n\x10\x44ialogflowSource\x12$\n\x17\x64ialogflow_conversation\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\taudio_uri\x18\x03 \x01(\t\"\x98\t\n\x0e\x41nalysisResult\x12l\n\x16\x63\x61ll_analysis_metadata\x18\x02 \x01(\x0b\x32J.google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadataH\x00\x12,\n\x08\x65nd_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\xdd\x07\n\x14\x43\x61llAnalysisMetadata\x12J\n\x0b\x61nnotations\x18\x02 \x03(\x0b\x32\x35.google.cloud.contactcenterinsights.v1.CallAnnotation\x12j\n\x08\x65ntities\x18\x03 \x03(\x0b\x32X.google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.EntitiesEntry\x12U\n\nsentiments\x18\x04 \x03(\x0b\x32\x41.google.cloud.contactcenterinsights.v1.ConversationLevelSentiment\x12P\n\x07silence\x18\x0b \x01(\x0b\x32?.google.cloud.contactcenterinsights.v1.ConversationLevelSilence\x12h\n\x07intents\x18\x06 \x03(\x0b\x32W.google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.IntentsEntry\x12w\n\x0fphrase_matchers\x18\x07 \x03(\x0b\x32^.google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.PhraseMatchersEntry\x12S\n\x12issue_model_result\x18\x08 \x01(\x0b\x32\x37.google.cloud.contactcenterinsights.v1.IssueModelResult\x1a^\n\rEntitiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12<\n\x05value\x18\x02 \x01(\x0b\x32-.google.cloud.contactcenterinsights.v1.Entity:\x02\x38\x01\x1a]\n\x0cIntentsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12<\n\x05value\x18\x02 \x01(\x0b\x32-.google.cloud.contactcenterinsights.v1.Intent:\x02\x38\x01\x1am\n\x13PhraseMatchersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x45\n\x05value\x18\x02 \x01(\x0b\x32\x36.google.cloud.contactcenterinsights.v1.PhraseMatchData:\x02\x38\x01\x42\n\n\x08metadata\"\xa5\x01\n\x10IssueModelResult\x12I\n\x0bissue_model\x18\x01 \x01(\tB4\xfa\x41\x31\n/contactcenterinsights.googleapis.com/IssueModel\x12\x46\n\x06issues\x18\x02 \x03(\x0b\x32\x36.google.cloud.contactcenterinsights.v1.IssueAssignment\"\x7f\n\x1a\x43onversationLevelSentiment\x12\x13\n\x0b\x63hannel_tag\x18\x01 \x01(\x05\x12L\n\x0esentiment_data\x18\x02 \x01(\x0b\x32\x34.google.cloud.contactcenterinsights.v1.SentimentData\"k\n\x18\x43onversationLevelSilence\x12\x33\n\x10silence_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1a\n\x12silence_percentage\x18\x02 \x01(\x02\"J\n\x0fIssueAssignment\x12\r\n\x05issue\x18\x01 \x01(\t\x12\r\n\x05score\x18\x02 \x01(\x01\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x05\"\xf5\x06\n\x0e\x43\x61llAnnotation\x12T\n\x11interruption_data\x18\n \x01(\x0b\x32\x37.google.cloud.contactcenterinsights.v1.InterruptionDataH\x00\x12N\n\x0esentiment_data\x18\x0b \x01(\x0b\x32\x34.google.cloud.contactcenterinsights.v1.SentimentDataH\x00\x12J\n\x0csilence_data\x18\x0c \x01(\x0b\x32\x32.google.cloud.contactcenterinsights.v1.SilenceDataH\x00\x12\x44\n\thold_data\x18\r \x01(\x0b\x32/.google.cloud.contactcenterinsights.v1.HoldDataH\x00\x12W\n\x13\x65ntity_mention_data\x18\x0f \x01(\x0b\x32\x38.google.cloud.contactcenterinsights.v1.EntityMentionDataH\x00\x12S\n\x11intent_match_data\x18\x10 \x01(\x0b\x32\x36.google.cloud.contactcenterinsights.v1.IntentMatchDataH\x00\x12S\n\x11phrase_match_data\x18\x11 \x01(\x0b\x32\x36.google.cloud.contactcenterinsights.v1.PhraseMatchDataH\x00\x12Q\n\x10issue_match_data\x18\x12 \x01(\x0b\x32\x35.google.cloud.contactcenterinsights.v1.IssueMatchDataH\x00\x12\x13\n\x0b\x63hannel_tag\x18\x01 \x01(\x05\x12\\\n\x19\x61nnotation_start_boundary\x18\x04 \x01(\x0b\x32\x39.google.cloud.contactcenterinsights.v1.AnnotationBoundary\x12Z\n\x17\x61nnotation_end_boundary\x18\x05 \x01(\x0b\x32\x39.google.cloud.contactcenterinsights.v1.AnnotationBoundaryB\x06\n\x04\x64\x61ta\"Y\n\x12\x41nnotationBoundary\x12\x14\n\nword_index\x18\x03 \x01(\x05H\x00\x12\x18\n\x10transcript_index\x18\x01 \x01(\x05\x42\x13\n\x11\x64\x65tailed_boundary\"\x80\x04\n\x06\x45ntity\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12@\n\x04type\x18\x02 \x01(\x0e\x32\x32.google.cloud.contactcenterinsights.v1.Entity.Type\x12M\n\x08metadata\x18\x03 \x03(\x0b\x32;.google.cloud.contactcenterinsights.v1.Entity.MetadataEntry\x12\x10\n\x08salience\x18\x04 \x01(\x02\x12G\n\tsentiment\x18\x05 \x01(\x0b\x32\x34.google.cloud.contactcenterinsights.v1.SentimentData\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xc2\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06PERSON\x10\x01\x12\x0c\n\x08LOCATION\x10\x02\x12\x10\n\x0cORGANIZATION\x10\x03\x12\t\n\x05\x45VENT\x10\x04\x12\x0f\n\x0bWORK_OF_ART\x10\x05\x12\x11\n\rCONSUMER_GOOD\x10\x06\x12\t\n\x05OTHER\x10\x07\x12\x10\n\x0cPHONE_NUMBER\x10\t\x12\x0b\n\x07\x41\x44\x44RESS\x10\n\x12\x08\n\x04\x44\x41TE\x10\x0b\x12\n\n\x06NUMBER\x10\x0c\x12\t\n\x05PRICE\x10\r\"*\n\x06Intent\x12\n\n\x02id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\"?\n\x0fPhraseMatchData\x12\x16\n\x0ephrase_matcher\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\"(\n\x10\x44ialogflowIntent\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\"\x12\n\x10InterruptionData\"\r\n\x0bSilenceData\"\n\n\x08HoldData\"\x8f\x02\n\x11\x45ntityMentionData\x12\x18\n\x10\x65ntity_unique_id\x18\x01 \x01(\t\x12R\n\x04type\x18\x02 \x01(\x0e\x32\x44.google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType\x12G\n\tsentiment\x18\x03 \x01(\x0b\x32\x34.google.cloud.contactcenterinsights.v1.SentimentData\"C\n\x0bMentionType\x12\x1c\n\x18MENTION_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06PROPER\x10\x01\x12\n\n\x06\x43OMMON\x10\x02\"+\n\x0fIntentMatchData\x12\x18\n\x10intent_unique_id\x18\x01 \x01(\t\"1\n\rSentimentData\x12\x11\n\tmagnitude\x18\x01 \x01(\x02\x12\r\n\x05score\x18\x02 \x01(\x02\"b\n\x0eIssueMatchData\x12P\n\x10issue_assignment\x18\x01 \x01(\x0b\x32\x36.google.cloud.contactcenterinsights.v1.IssueAssignment\"\xf2\x07\n\nIssueModel\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0bissue_count\x18\x08 \x01(\x03\x42\x03\xe0\x41\x03\x12K\n\x05state\x18\x05 \x01(\x0e\x32\x37.google.cloud.contactcenterinsights.v1.IssueModel.StateB\x03\xe0\x41\x03\x12\\\n\x11input_data_config\x18\x06 \x01(\x0b\x32\x41.google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig\x12[\n\x0etraining_stats\x18\x07 \x01(\x0b\x32;.google.cloud.contactcenterinsights.v1.IssueModelLabelStatsB\x06\xe0\x41\x03\xe0\x41\x05\x12O\n\nmodel_type\x18\t \x01(\x0e\x32;.google.cloud.contactcenterinsights.v1.IssueModel.ModelType\x12\x15\n\rlanguage_code\x18\n \x01(\t\x1a\x9c\x01\n\x0fInputDataConfig\x12N\n\x06medium\x18\x01 \x01(\x0e\x32:.google.cloud.contactcenterinsights.v1.Conversation.MediumB\x02\x18\x01\x12)\n\x1ctraining_conversations_count\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\"j\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0e\n\nUNDEPLOYED\x10\x01\x12\r\n\tDEPLOYING\x10\x02\x12\x0c\n\x08\x44\x45PLOYED\x10\x03\x12\x0f\n\x0bUNDEPLOYING\x10\x04\x12\x0c\n\x08\x44\x45LETING\x10\x05\"A\n\tModelType\x12\x1a\n\x16MODEL_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07TYPE_V1\x10\x01\x12\x0b\n\x07TYPE_V2\x10\x02:w\xea\x41t\n/contactcenterinsights.googleapis.com/IssueModel\x12\x41projects/{project}/locations/{location}/issueModels/{issue_model}\"\xdd\x02\n\x05Issue\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1e\n\x11sample_utterances\x18\x06 \x03(\tB\x03\xe0\x41\x03\x12\x1b\n\x13\x64isplay_description\x18\x0e \x01(\t:\x81\x01\xea\x41~\n*contactcenterinsights.googleapis.com/Issue\x12Pprojects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue}\"\x9b\x03\n\x14IssueModelLabelStats\x12$\n\x1c\x61nalyzed_conversations_count\x18\x01 \x01(\x03\x12(\n unclassified_conversations_count\x18\x02 \x01(\x03\x12`\n\x0bissue_stats\x18\x03 \x03(\x0b\x32K.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStatsEntry\x1aV\n\nIssueStats\x12\r\n\x05issue\x18\x01 \x01(\t\x12#\n\x1blabeled_conversations_count\x18\x02 \x01(\x03\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x1ay\n\x0fIssueStatsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12U\n\x05value\x18\x02 \x01(\x0b\x32\x46.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats:\x02\x38\x01\"\x93\x06\n\rPhraseMatcher\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1b\n\x0brevision_id\x18\x02 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x03\x12\x13\n\x0bversion_tag\x18\x03 \x01(\t\x12=\n\x14revision_create_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x05 \x01(\t\x12Y\n\x04type\x18\x06 \x01(\x0e\x32\x46.google.cloud.contactcenterinsights.v1.PhraseMatcher.PhraseMatcherTypeB\x03\xe0\x41\x02\x12\x0e\n\x06\x61\x63tive\x18\x07 \x01(\x08\x12]\n\x18phrase_match_rule_groups\x18\x08 \x03(\x0b\x32;.google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup\x12?\n\x16\x61\x63tivation_update_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12W\n\nrole_match\x18\n \x01(\x0e\x32\x43.google.cloud.contactcenterinsights.v1.ConversationParticipant.Role\x12\x34\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"P\n\x11PhraseMatcherType\x12#\n\x1fPHRASE_MATCHER_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41LL_OF\x10\x01\x12\n\n\x06\x41NY_OF\x10\x02:\x80\x01\xea\x41}\n2contactcenterinsights.googleapis.com/PhraseMatcher\x12Gprojects/{project}/locations/{location}/phraseMatchers/{phrase_matcher}\"\xb5\x02\n\x14PhraseMatchRuleGroup\x12g\n\x04type\x18\x01 \x01(\x0e\x32T.google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupTypeB\x03\xe0\x41\x02\x12R\n\x12phrase_match_rules\x18\x02 \x03(\x0b\x32\x36.google.cloud.contactcenterinsights.v1.PhraseMatchRule\"`\n\x18PhraseMatchRuleGroupType\x12,\n(PHRASE_MATCH_RULE_GROUP_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41LL_OF\x10\x01\x12\n\n\x06\x41NY_OF\x10\x02\"\x84\x01\n\x0fPhraseMatchRule\x12\x12\n\x05query\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x07negated\x18\x02 \x01(\x08\x12L\n\x06\x63onfig\x18\x03 \x01(\x0b\x32<.google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig\"x\n\x15PhraseMatchRuleConfig\x12U\n\x12\x65xact_match_config\x18\x01 \x01(\x0b\x32\x37.google.cloud.contactcenterinsights.v1.ExactMatchConfigH\x00\x42\x08\n\x06\x63onfig\"*\n\x10\x45xactMatchConfig\x12\x16\n\x0e\x63\x61se_sensitive\x18\x01 \x01(\x08\"\xbc\x07\n\x08Settings\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x15\n\rlanguage_code\x18\x04 \x01(\t\x12\x33\n\x10\x63onversation_ttl\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12u\n\x1cpubsub_notification_settings\x18\x06 \x03(\x0b\x32O.google.cloud.contactcenterinsights.v1.Settings.PubsubNotificationSettingsEntry\x12W\n\x0f\x61nalysis_config\x18\x07 \x01(\x0b\x32>.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig\x12P\n\x10redaction_config\x18\n \x01(\x0b\x32\x36.google.cloud.contactcenterinsights.v1.RedactionConfig\x12O\n\rspeech_config\x18\x0b \x01(\x0b\x32\x33.google.cloud.contactcenterinsights.v1.SpeechConfigB\x03\xe0\x41\x01\x1a\xc8\x01\n\x0e\x41nalysisConfig\x12/\n\'runtime_integration_analysis_percentage\x18\x01 \x01(\x01\x12/\n\'upload_conversation_analysis_percentage\x18\x06 \x01(\x01\x12T\n\x12\x61nnotator_selector\x18\x05 \x01(\x0b\x32\x38.google.cloud.contactcenterinsights.v1.AnnotatorSelector\x1a\x41\n\x1fPubsubNotificationSettingsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:d\xea\x41\x61\n-contactcenterinsights.googleapis.com/Settings\x12\x30projects/{project}/locations/{location}/settings\"\xab\x01\n\x0e\x45ncryptionSpec\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x14\n\x07kms_key\x18\x02 \x01(\tB\x03\xe0\x41\x02:p\xea\x41m\n3contactcenterinsights.googleapis.com/EncryptionSpec\x12\x36projects/{project}/locations/{location}/encryptionSpec\"H\n\x0fRedactionConfig\x12\x1b\n\x13\x64\x65identify_template\x18\x01 \x01(\t\x12\x18\n\x10inspect_template\x18\x02 \x01(\t\"P\n\x0cSpeechConfig\x12@\n\x11speech_recognizer\x18\x01 \x01(\tB%\xfa\x41\"\n speech.googleapis.com/Recognizer\"\xdf\t\n\x11RuntimeAnnotation\x12Z\n\x12\x61rticle_suggestion\x18\x06 \x01(\x0b\x32<.google.cloud.contactcenterinsights.v1.ArticleSuggestionDataH\x00\x12J\n\nfaq_answer\x18\x07 \x01(\x0b\x32\x34.google.cloud.contactcenterinsights.v1.FaqAnswerDataH\x00\x12L\n\x0bsmart_reply\x18\x08 \x01(\x0b\x32\x35.google.cloud.contactcenterinsights.v1.SmartReplyDataH\x00\x12\x65\n\x18smart_compose_suggestion\x18\t \x01(\x0b\x32\x41.google.cloud.contactcenterinsights.v1.SmartComposeSuggestionDataH\x00\x12\x62\n\x16\x64ialogflow_interaction\x18\n \x01(\x0b\x32@.google.cloud.contactcenterinsights.v1.DialogflowInteractionDataH\x00\x12\x7f\n%conversation_summarization_suggestion\x18\x0c \x01(\x0b\x32N.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionDataH\x00\x12\x15\n\rannotation_id\x18\x01 \x01(\t\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12Q\n\x0estart_boundary\x18\x03 \x01(\x0b\x32\x39.google.cloud.contactcenterinsights.v1.AnnotationBoundary\x12O\n\x0c\x65nd_boundary\x18\x04 \x01(\x0b\x32\x39.google.cloud.contactcenterinsights.v1.AnnotationBoundary\x12N\n\x0f\x61nswer_feedback\x18\x05 \x01(\x0b\x32\x35.google.cloud.contactcenterinsights.v1.AnswerFeedback\x12V\n\nuser_input\x18\x10 \x01(\x0b\x32\x42.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput\x1a\xeb\x01\n\tUserInput\x12\r\n\x05query\x18\x01 \x01(\t\x12\x16\n\x0egenerator_name\x18\x02 \x01(\t\x12\x64\n\x0cquery_source\x18\x03 \x01(\x0e\x32N.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.QuerySource\"Q\n\x0bQuerySource\x12\x1c\n\x18QUERY_SOURCE_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x41GENT_QUERY\x10\x01\x12\x13\n\x0fSUGGESTED_QUERY\x10\x02\x42\x06\n\x04\x64\x61ta\"\x89\x02\n\x0e\x41nswerFeedback\x12\x61\n\x11\x63orrectness_level\x18\x01 \x01(\x0e\x32\x46.google.cloud.contactcenterinsights.v1.AnswerFeedback.CorrectnessLevel\x12\x0f\n\x07\x63licked\x18\x02 \x01(\x08\x12\x11\n\tdisplayed\x18\x03 \x01(\x08\"p\n\x10\x43orrectnessLevel\x12!\n\x1d\x43ORRECTNESS_LEVEL_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNOT_CORRECT\x10\x01\x12\x15\n\x11PARTIALLY_CORRECT\x10\x02\x12\x11\n\rFULLY_CORRECT\x10\x03\"\x82\x02\n\x15\x41rticleSuggestionData\x12\r\n\x05title\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x18\n\x10\x63onfidence_score\x18\x03 \x01(\x02\x12\\\n\x08metadata\x18\x04 \x03(\x0b\x32J.google.cloud.contactcenterinsights.v1.ArticleSuggestionData.MetadataEntry\x12\x14\n\x0cquery_record\x18\x05 \x01(\t\x12\x0e\n\x06source\x18\x06 \x01(\t\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xf8\x01\n\rFaqAnswerData\x12\x0e\n\x06\x61nswer\x18\x01 \x01(\t\x12\x18\n\x10\x63onfidence_score\x18\x02 \x01(\x02\x12\x10\n\x08question\x18\x03 \x01(\t\x12T\n\x08metadata\x18\x04 \x03(\x0b\x32\x42.google.cloud.contactcenterinsights.v1.FaqAnswerData.MetadataEntry\x12\x14\n\x0cquery_record\x18\x05 \x01(\t\x12\x0e\n\x06source\x18\x06 \x01(\t\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xd7\x01\n\x0eSmartReplyData\x12\r\n\x05reply\x18\x01 \x01(\t\x12\x18\n\x10\x63onfidence_score\x18\x02 \x01(\x01\x12U\n\x08metadata\x18\x03 \x03(\x0b\x32\x43.google.cloud.contactcenterinsights.v1.SmartReplyData.MetadataEntry\x12\x14\n\x0cquery_record\x18\x04 \x01(\t\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xf4\x01\n\x1aSmartComposeSuggestionData\x12\x12\n\nsuggestion\x18\x01 \x01(\t\x12\x18\n\x10\x63onfidence_score\x18\x02 \x01(\x01\x12\x61\n\x08metadata\x18\x03 \x03(\x0b\x32O.google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData.MetadataEntry\x12\x14\n\x0cquery_record\x18\x04 \x01(\t\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"M\n\x19\x44ialogflowInteractionData\x12\x1c\n\x14\x64ialogflow_intent_id\x18\x01 \x01(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x02\"\xcd\x03\n\'ConversationSummarizationSuggestionData\x12\x0c\n\x04text\x18\x01 \x01(\t\x12w\n\rtext_sections\x18\x05 \x03(\x0b\x32`.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.TextSectionsEntry\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x12n\n\x08metadata\x18\x03 \x03(\x0b\x32\\.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.MetadataEntry\x12\x15\n\ranswer_record\x18\x04 \x01(\t\x12\x1a\n\x12\x63onversation_model\x18\x06 \x01(\t\x1a\x33\n\x11TextSectionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x8b\x03\n\x17\x43onversationParticipant\x12Q\n\x1b\x64ialogflow_participant_name\x18\x05 \x01(\tB*\xfa\x41\'\n%dialogflow.googleapis.com/ParticipantH\x00\x12\x11\n\x07user_id\x18\x06 \x01(\tH\x00\x12\"\n\x16\x64ialogflow_participant\x18\x01 \x01(\tB\x02\x18\x01\x12#\n\x1bobfuscated_external_user_id\x18\x03 \x01(\t\x12Q\n\x04role\x18\x02 \x01(\x0e\x32\x43.google.cloud.contactcenterinsights.v1.ConversationParticipant.Role\"_\n\x04Role\x12\x14\n\x10ROLE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bHUMAN_AGENT\x10\x01\x12\x13\n\x0f\x41UTOMATED_AGENT\x10\x02\x12\x0c\n\x08\x45ND_USER\x10\x03\x12\r\n\tANY_AGENT\x10\x04\x42\r\n\x0bparticipant\"\x90\x02\n\x04View\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\r\n\x05value\x18\x05 \x01(\t:d\xea\x41\x61\n)contactcenterinsights.googleapis.com/View\x12\x34projects/{project}/locations/{location}/views/{view}\"\x8f\x07\n\x11\x41nnotatorSelector\x12\"\n\x1arun_interruption_annotator\x18\x01 \x01(\x08\x12\x1d\n\x15run_silence_annotator\x18\x02 \x01(\x08\x12$\n\x1crun_phrase_matcher_annotator\x18\x03 \x01(\x08\x12P\n\x0fphrase_matchers\x18\x04 \x03(\tB7\xfa\x41\x34\n2contactcenterinsights.googleapis.com/PhraseMatcher\x12\x1f\n\x17run_sentiment_annotator\x18\x05 \x01(\x08\x12\x1c\n\x14run_entity_annotator\x18\x06 \x01(\x08\x12\x1c\n\x14run_intent_annotator\x18\x07 \x01(\x08\x12!\n\x19run_issue_model_annotator\x18\x08 \x01(\x08\x12J\n\x0cissue_models\x18\n \x03(\tB4\xfa\x41\x31\n/contactcenterinsights.googleapis.com/IssueModel\x12#\n\x1brun_summarization_annotator\x18\t \x01(\x08\x12j\n\x14summarization_config\x18\x0b \x01(\x0b\x32L.google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig\x1a\xe1\x02\n\x13SummarizationConfig\x12R\n\x14\x63onversation_profile\x18\x01 \x01(\tB2\xfa\x41/\n-dialogflow.googleapis.com/ConversationProfileH\x00\x12~\n\x13summarization_model\x18\x02 \x01(\x0e\x32_.google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.SummarizationModelH\x00\"f\n\x12SummarizationModel\x12#\n\x1fSUMMARIZATION_MODEL_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x42\x41SELINE_MODEL\x10\x01\x12\x17\n\x13\x42\x41SELINE_MODEL_V2_0\x10\x02\x42\x0e\n\x0cmodel_sourceB\xe0\x05\n)com.google.cloud.contactcenterinsights.v1B\x0eResourcesProtoP\x01Z_cloud.google.com/go/contactcenterinsights/apiv1/contactcenterinsightspb;contactcenterinsightspb\xaa\x02%Google.Cloud.ContactCenterInsights.V1\xca\x02%Google\\Cloud\\ContactCenterInsights\\V1\xea\x02(Google::Cloud::ContactCenterInsights::V1\xea\x41\x84\x01\n-dialogflow.googleapis.com/ConversationProfile\x12Sprojects/{project}/locations/{location}/conversationProfiles/{conversation_profile}\xea\x41\xd4\x01\n%dialogflow.googleapis.com/Participant\x12Jprojects/{project}/conversations/{conversation}/participants/{participant}\x12_projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant}\xea\x41\x64\n speech.googleapis.com/Recognizer\x12@projects/{project}/locations/{location}/recognizers/{recognizer}b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.protobuf.Duration", "google/protobuf/duration.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module ContactCenterInsights + module V1 + Conversation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.Conversation").msgclass + Conversation::CallMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.Conversation.CallMetadata").msgclass + Conversation::QualityMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata").msgclass + Conversation::QualityMetadata::AgentInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.AgentInfo").msgclass + Conversation::Transcript = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.Conversation.Transcript").msgclass + Conversation::Transcript::TranscriptSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment").msgclass + Conversation::Transcript::TranscriptSegment::WordInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.WordInfo").msgclass + Conversation::Transcript::TranscriptSegment::DialogflowSegmentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment.DialogflowSegmentMetadata").msgclass + Conversation::Medium = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.Conversation.Medium").enummodule + Analysis = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.Analysis").msgclass + ConversationDataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.ConversationDataSource").msgclass + GcsSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.GcsSource").msgclass + DialogflowSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.DialogflowSource").msgclass + AnalysisResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.AnalysisResult").msgclass + AnalysisResult::CallAnalysisMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata").msgclass + IssueModelResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.IssueModelResult").msgclass + ConversationLevelSentiment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.ConversationLevelSentiment").msgclass + ConversationLevelSilence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.ConversationLevelSilence").msgclass + IssueAssignment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.IssueAssignment").msgclass + CallAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.CallAnnotation").msgclass + AnnotationBoundary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.AnnotationBoundary").msgclass + Entity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.Entity").msgclass + Entity::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.Entity.Type").enummodule + Intent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.Intent").msgclass + PhraseMatchData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.PhraseMatchData").msgclass + DialogflowIntent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.DialogflowIntent").msgclass + InterruptionData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.InterruptionData").msgclass + SilenceData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.SilenceData").msgclass + HoldData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.HoldData").msgclass + EntityMentionData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.EntityMentionData").msgclass + EntityMentionData::MentionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.EntityMentionData.MentionType").enummodule + IntentMatchData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.IntentMatchData").msgclass + SentimentData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.SentimentData").msgclass + IssueMatchData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.IssueMatchData").msgclass + IssueModel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.IssueModel").msgclass + IssueModel::InputDataConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.IssueModel.InputDataConfig").msgclass + IssueModel::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.IssueModel.State").enummodule + IssueModel::ModelType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.IssueModel.ModelType").enummodule + Issue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.Issue").msgclass + IssueModelLabelStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.IssueModelLabelStats").msgclass + IssueModelLabelStats::IssueStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.IssueModelLabelStats.IssueStats").msgclass + PhraseMatcher = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.PhraseMatcher").msgclass + PhraseMatcher::PhraseMatcherType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.PhraseMatcher.PhraseMatcherType").enummodule + PhraseMatchRuleGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup").msgclass + PhraseMatchRuleGroup::PhraseMatchRuleGroupType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.PhraseMatchRuleGroup.PhraseMatchRuleGroupType").enummodule + PhraseMatchRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.PhraseMatchRule").msgclass + PhraseMatchRuleConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.PhraseMatchRuleConfig").msgclass + ExactMatchConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.ExactMatchConfig").msgclass + Settings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.Settings").msgclass + Settings::AnalysisConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig").msgclass + EncryptionSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.EncryptionSpec").msgclass + RedactionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.RedactionConfig").msgclass + SpeechConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.SpeechConfig").msgclass + RuntimeAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.RuntimeAnnotation").msgclass + RuntimeAnnotation::UserInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput").msgclass + RuntimeAnnotation::UserInput::QuerySource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.QuerySource").enummodule + AnswerFeedback = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.AnswerFeedback").msgclass + AnswerFeedback::CorrectnessLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.AnswerFeedback.CorrectnessLevel").enummodule + ArticleSuggestionData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.ArticleSuggestionData").msgclass + FaqAnswerData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.FaqAnswerData").msgclass + SmartReplyData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.SmartReplyData").msgclass + SmartComposeSuggestionData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData").msgclass + DialogflowInteractionData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.DialogflowInteractionData").msgclass + ConversationSummarizationSuggestionData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData").msgclass + ConversationParticipant = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.ConversationParticipant").msgclass + ConversationParticipant::Role = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.ConversationParticipant.Role").enummodule + View = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.View").msgclass + AnnotatorSelector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.AnnotatorSelector").msgclass + AnnotatorSelector::SummarizationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig").msgclass + AnnotatorSelector::SummarizationConfig::SummarizationModel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.SummarizationModel").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/README.md new file mode 100644 index 000000000000..ad675b735cf9 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Contact Center AI Insights V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..2223d8935069 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/api/client.rb @@ -0,0 +1,420 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + end +end diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..b03587481349 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..38b4b61e6061 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..935946d52792 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/cloud/contactcenterinsights/v1/contact_center_insights.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/cloud/contactcenterinsights/v1/contact_center_insights.rb new file mode 100644 index 000000000000..3c897f083e21 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/cloud/contactcenterinsights/v1/contact_center_insights.rb @@ -0,0 +1,1295 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ContactCenterInsights + module V1 + # The request for calculating conversation statistics. + # @!attribute [rw] location + # @return [::String] + # Required. The location of the conversations. + # @!attribute [rw] filter + # @return [::String] + # A filter to reduce results to a specific subset. This field is useful for + # getting statistics about conversations with specific properties. + class CalculateStatsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for calculating conversation statistics. + # @!attribute [rw] average_duration + # @return [::Google::Protobuf::Duration] + # The average duration of all conversations. The average is calculated using + # only conversations that have a time duration. + # @!attribute [rw] average_turn_count + # @return [::Integer] + # The average number of turns per conversation. + # @!attribute [rw] conversation_count + # @return [::Integer] + # The total number of conversations. + # @!attribute [rw] smart_highlighter_matches + # @return [::Google::Protobuf::Map{::String => ::Integer}] + # A map associating each smart highlighter display name with its respective + # number of matches in the set of conversations. + # @!attribute [rw] custom_highlighter_matches + # @return [::Google::Protobuf::Map{::String => ::Integer}] + # A map associating each custom highlighter resource name with its respective + # number of matches in the set of conversations. + # @!attribute [rw] issue_matches + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Protobuf::Map{::String => ::Integer}] + # A map associating each issue resource name with its respective number of + # matches in the set of conversations. Key has the format: + # `projects//locations//issueModels//issues/` + # Deprecated, use `issue_matches_stats` field instead. + # @!attribute [rw] issue_matches_stats + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::ContactCenterInsights::V1::IssueModelLabelStats::IssueStats}] + # A map associating each issue resource name with its respective number of + # matches in the set of conversations. Key has the format: + # `projects//locations//issueModels//issues/` + # @!attribute [rw] conversation_count_time_series + # @return [::Google::Cloud::ContactCenterInsights::V1::CalculateStatsResponse::TimeSeries] + # A time series representing the count of conversations created over time + # that match that requested filter criteria. + class CalculateStatsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A time series representing conversations over time. + # @!attribute [rw] interval_duration + # @return [::Google::Protobuf::Duration] + # The duration of each interval. + # @!attribute [rw] points + # @return [::Array<::Google::Cloud::ContactCenterInsights::V1::CalculateStatsResponse::TimeSeries::Interval>] + # An ordered list of intervals from earliest to latest, where each interval + # represents the number of conversations that transpired during the time + # window. + class TimeSeries + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A single interval in a time series. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The start time of this interval. + # @!attribute [rw] conversation_count + # @return [::Integer] + # The number of conversations created in this interval. + class Interval + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Integer] + class SmartHighlighterMatchesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Integer] + class CustomHighlighterMatchesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Integer] + class IssueMatchesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::ContactCenterInsights::V1::IssueModelLabelStats::IssueStats] + class IssueMatchesStatsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Metadata for a create analysis operation. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [r] conversation + # @return [::String] + # Output only. The Conversation that this Analysis Operation belongs to. + # @!attribute [r] annotator_selector + # @return [::Google::Cloud::ContactCenterInsights::V1::AnnotatorSelector] + # Output only. The annotator selector used for the analysis (if any). + class CreateAnalysisOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to create a conversation. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the conversation. + # @!attribute [rw] conversation + # @return [::Google::Cloud::ContactCenterInsights::V1::Conversation] + # Required. The conversation resource to create. + # @!attribute [rw] conversation_id + # @return [::String] + # 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 `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-` + class CreateConversationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to upload a conversation. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the conversation. + # @!attribute [rw] conversation + # @return [::Google::Cloud::ContactCenterInsights::V1::Conversation] + # Required. The conversation resource to create. + # @!attribute [rw] conversation_id + # @return [::String] + # 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 `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-` + # @!attribute [rw] redaction_config + # @return [::Google::Cloud::ContactCenterInsights::V1::RedactionConfig] + # Optional. DLP settings for transcript redaction. Will default to the config + # specified in Settings. + # @!attribute [rw] speech_config + # @return [::Google::Cloud::ContactCenterInsights::V1::SpeechConfig] + # Optional. Speech-to-Text configuration. Will default to the config + # specified in Settings. + class UploadConversationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The metadata for an `UploadConversation` operation. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [r] request + # @return [::Google::Cloud::ContactCenterInsights::V1::UploadConversationRequest] + # Output only. The original request. + # @!attribute [r] analysis_operation + # @return [::String] + # Output only. The operation name for a successfully created analysis + # operation, if any. + # @!attribute [r] applied_redaction_config + # @return [::Google::Cloud::ContactCenterInsights::V1::RedactionConfig] + # Output only. The redaction config applied to the uploaded conversation. + class UploadConversationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list conversations. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the conversation. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + # @!attribute [rw] filter + # @return [::String] + # A filter to reduce results to a specific subset. Useful for querying + # conversations with specific properties. + # @!attribute [rw] order_by + # @return [::String] + # 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). + # @!attribute [rw] view + # @return [::Google::Cloud::ContactCenterInsights::V1::ConversationView] + # The level of details of the conversation. Default is `BASIC`. + class ListConversationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response of listing conversations. + # @!attribute [rw] conversations + # @return [::Array<::Google::Cloud::ContactCenterInsights::V1::Conversation>] + # The conversations that match the request. + # @!attribute [rw] next_page_token + # @return [::String] + # A token which can be sent as `page_token` to retrieve the next page. If + # this field is set, it means there is another page available. If it is not + # set, it means no other pages are available. + class ListConversationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to get a conversation. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the conversation to get. + # @!attribute [rw] view + # @return [::Google::Cloud::ContactCenterInsights::V1::ConversationView] + # The level of details of the conversation. Default is `FULL`. + class GetConversationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to update a conversation. + # @!attribute [rw] conversation + # @return [::Google::Cloud::ContactCenterInsights::V1::Conversation] + # Required. The new values for the conversation. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # 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: + # + # * `agent_id` + # * `language_code` + # * `labels` + # * `metadata` + # * `quality_metadata` + # * `call_metadata` + # * `start_time` + # * `expire_time` or `ttl` + # * `data_source.gcs_source.audio_uri` or + # `data_source.dialogflow_source.audio_uri` + class UpdateConversationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to delete a conversation. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the conversation to delete. + # @!attribute [rw] force + # @return [::Boolean] + # 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. + class DeleteConversationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to ingest conversations. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest::GcsSource] + # A cloud storage bucket source. Note that any previously ingested objects + # from the source will be skipped to avoid duplication. + # @!attribute [rw] transcript_object_config + # @return [::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest::TranscriptObjectConfig] + # Configuration for when `source` contains conversation transcripts. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource for new conversations. + # @!attribute [rw] conversation_config + # @return [::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest::ConversationConfig] + # Configuration that applies to all conversations. + # @!attribute [rw] redaction_config + # @return [::Google::Cloud::ContactCenterInsights::V1::RedactionConfig] + # Optional. DLP settings for transcript redaction. Optional, will default to + # the config specified in Settings. + # @!attribute [rw] speech_config + # @return [::Google::Cloud::ContactCenterInsights::V1::SpeechConfig] + # Optional. Default Speech-to-Text configuration. Optional, will default to + # the config specified in Settings. + # @!attribute [rw] sample_size + # @return [::Integer] + # 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. + class IngestConversationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration for Cloud Storage bucket sources. + # @!attribute [rw] bucket_uri + # @return [::String] + # Required. The Cloud Storage bucket containing source objects. + # @!attribute [rw] bucket_object_type + # @return [::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest::GcsSource::BucketObjectType] + # Optional. Specifies the type of the objects in `bucket_uri`. + # @!attribute [rw] metadata_bucket_uri + # @return [::String] + # Optional. The Cloud Storage path to the conversation metadata. Note that: + # [1] Metadata files are expected to be in JSON format. + # [2] Metadata and source files (transcripts or audio) must be in + # separate buckets. + # [3] A source file and its corresponding metadata file must share the same + # name to + # be properly ingested, E.g. `gs://bucket/audio/conversation1.mp3` and + # `gs://bucket/metadata/conversation1.json`. + # @!attribute [rw] custom_metadata_keys + # @return [::Array<::String>] + # 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. + class GcsSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + module BucketObjectType + # The object type is unspecified and will default to `TRANSCRIPT`. + BUCKET_OBJECT_TYPE_UNSPECIFIED = 0 + + # The object is a transcript. + TRANSCRIPT = 1 + + # The object is an audio file. + AUDIO = 2 + end + end + + # Configuration for processing transcript objects. + # @!attribute [rw] medium + # @return [::Google::Cloud::ContactCenterInsights::V1::Conversation::Medium] + # Required. The medium transcript objects represent. + class TranscriptObjectConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration that applies to all conversations. + # @!attribute [rw] agent_id + # @return [::String] + # Optional. An opaque, user-specified string representing a human agent who + # handled all conversations in the import. Note that this will be + # overridden if per-conversation metadata is provided through the + # `metadata_bucket_uri`. + # @!attribute [rw] agent_channel + # @return [::Integer] + # Optional. Indicates which of the channels, 1 or 2, contains the agent. + # Note that this must be set for conversations to be properly displayed and + # analyzed. + # @!attribute [rw] customer_channel + # @return [::Integer] + # Optional. Indicates which of the channels, 1 or 2, contains the agent. + # Note that this must be set for conversations to be properly displayed and + # analyzed. + class ConversationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The metadata for an IngestConversations operation. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [r] request + # @return [::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest] + # Output only. The original request for ingest. + # @!attribute [r] partial_errors + # @return [::Array<::Google::Rpc::Status>] + # Output only. Partial errors during ingest operation that might cause the + # operation output to be incomplete. + # @!attribute [r] ingest_conversations_stats + # @return [::Google::Cloud::ContactCenterInsights::V1::IngestConversationsMetadata::IngestConversationsStats] + # Output only. Statistics for IngestConversations operation. + class IngestConversationsMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Statistics for IngestConversations operation. + # @!attribute [r] processed_object_count + # @return [::Integer] + # Output only. The number of objects processed during the ingest operation. + # @!attribute [r] duplicates_skipped_count + # @return [::Integer] + # Output only. The number of objects skipped because another conversation + # with the same transcript uri had already been ingested. + # @!attribute [r] successful_ingest_count + # @return [::Integer] + # Output only. The number of new conversations added during this ingest + # operation. + # @!attribute [r] failed_ingest_count + # @return [::Integer] + # Output only. The number of objects which were unable to be ingested due + # to errors. The errors are populated in the partial_errors field. + class IngestConversationsStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The response to an IngestConversations operation. + class IngestConversationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to create an analysis. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the analysis. + # @!attribute [rw] analysis + # @return [::Google::Cloud::ContactCenterInsights::V1::Analysis] + # Required. The analysis to create. + class CreateAnalysisRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to list analyses. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the analyses. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + # @!attribute [rw] filter + # @return [::String] + # A filter to reduce results to a specific subset. Useful for querying + # conversations with specific properties. + class ListAnalysesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response to list analyses. + # @!attribute [rw] analyses + # @return [::Array<::Google::Cloud::ContactCenterInsights::V1::Analysis>] + # The analyses that match the request. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListAnalysesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to get an analysis. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the analysis to get. + class GetAnalysisRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to delete an analysis. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the analysis to delete. + class DeleteAnalysisRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to analyze conversations in bulk. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource to create analyses in. + # @!attribute [rw] filter + # @return [::String] + # Required. Filter used to select the subset of conversations to analyze. + # @!attribute [rw] analysis_percentage + # @return [::Float] + # Required. Percentage of selected conversation to analyze, between + # [0, 100]. + # @!attribute [rw] annotator_selector + # @return [::Google::Cloud::ContactCenterInsights::V1::AnnotatorSelector] + # To select the annotators to run and the phrase matchers to use + # (if any). If not specified, all annotators will be run. + class BulkAnalyzeConversationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The metadata for a bulk analyze conversations operation. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time the operation was created. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The time the operation finished running. + # @!attribute [rw] request + # @return [::Google::Cloud::ContactCenterInsights::V1::BulkAnalyzeConversationsRequest] + # The original request for bulk analyze. + # @!attribute [rw] completed_analyses_count + # @return [::Integer] + # The number of requested analyses that have completed successfully so far. + # @!attribute [rw] failed_analyses_count + # @return [::Integer] + # The number of requested analyses that have failed so far. + # @!attribute [rw] total_requested_analyses_count + # @return [::Integer] + # Total number of analyses requested. Computed by the number of conversations + # returned by `filter` multiplied by `analysis_percentage` in the request. + # @!attribute [r] partial_errors + # @return [::Array<::Google::Rpc::Status>] + # Output only. Partial errors during bulk analyze operation that might cause + # the operation output to be incomplete. + class BulkAnalyzeConversationsMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for a bulk analyze conversations operation. + # @!attribute [rw] successful_analysis_count + # @return [::Integer] + # Count of successful analyses. + # @!attribute [rw] failed_analysis_count + # @return [::Integer] + # Count of failed analyses. + class BulkAnalyzeConversationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to delete conversations in bulk. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource to delete conversations from. + # Format: + # projects/\\{project}/locations/\\{location} + # @!attribute [rw] filter + # @return [::String] + # Filter used to select the subset of conversations to delete. + # @!attribute [rw] max_delete_count + # @return [::Integer] + # Maximum number of conversations to delete. + # @!attribute [rw] force + # @return [::Boolean] + # 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. + class BulkDeleteConversationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The metadata for a bulk delete conversations operation. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time the operation was created. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The time the operation finished running. + # @!attribute [rw] request + # @return [::Google::Cloud::ContactCenterInsights::V1::BulkDeleteConversationsRequest] + # The original request for bulk delete. + # @!attribute [rw] partial_errors + # @return [::Array<::Google::Rpc::Status>] + # Partial errors during bulk delete conversations operation that might cause + # the operation output to be incomplete. + class BulkDeleteConversationsMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for a bulk delete conversations operation. + class BulkDeleteConversationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to export insights. + # @!attribute [rw] big_query_destination + # @return [::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest::BigQueryDestination] + # Specified if sink is a BigQuery table. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource to export data from. + # @!attribute [rw] filter + # @return [::String] + # A filter to reduce results to a specific subset. Useful for exporting + # conversations with specific properties. + # @!attribute [rw] kms_key + # @return [::String] + # A fully qualified KMS key name for BigQuery tables protected by CMEK. + # Format: + # projects/\\{project}/locations/\\{location}/keyRings/\\{keyring}/cryptoKeys/\\{key}/cryptoKeyVersions/\\{version} + # @!attribute [rw] write_disposition + # @return [::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest::WriteDisposition] + # Options for what to do if the destination table already exists. + class ExportInsightsDataRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A BigQuery Table Reference. + # @!attribute [rw] project_id + # @return [::String] + # A project ID or number. If specified, then export will attempt to + # write data to this project instead of the resource project. Otherwise, + # the resource project will be used. + # @!attribute [rw] dataset + # @return [::String] + # Required. The name of the BigQuery dataset that the snapshot result + # should be exported to. If this dataset does not exist, the export call + # returns an INVALID_ARGUMENT error. + # @!attribute [rw] table + # @return [::String] + # The BigQuery table name to which the insights data should be written. + # If this table does not exist, the export call returns an INVALID_ARGUMENT + # error. + class BigQueryDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the action that occurs if the destination table already exists. + module WriteDisposition + # Write disposition is not specified. Defaults to WRITE_TRUNCATE. + WRITE_DISPOSITION_UNSPECIFIED = 0 + + # If the table already exists, BigQuery will overwrite the table data and + # use the schema from the load. + WRITE_TRUNCATE = 1 + + # If the table already exists, BigQuery will append data to the table. + WRITE_APPEND = 2 + end + end + + # Metadata for an export insights operation. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [rw] request + # @return [::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest] + # The original request for export. + # @!attribute [rw] partial_errors + # @return [::Array<::Google::Rpc::Status>] + # Partial errors during export operation that might cause the operation + # output to be incomplete. + class ExportInsightsDataMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for an export insights operation. + class ExportInsightsDataResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to create an issue model. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the issue model. + # @!attribute [rw] issue_model + # @return [::Google::Cloud::ContactCenterInsights::V1::IssueModel] + # Required. The issue model to create. + class CreateIssueModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for creating an issue model. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [rw] request + # @return [::Google::Cloud::ContactCenterInsights::V1::CreateIssueModelRequest] + # The original request for creation. + class CreateIssueModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to update an issue model. + # @!attribute [rw] issue_model + # @return [::Google::Cloud::ContactCenterInsights::V1::IssueModel] + # Required. The new values for the issue model. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be updated. + class UpdateIssueModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list issue models. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the issue model. + class ListIssueModelsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response of listing issue models. + # @!attribute [rw] issue_models + # @return [::Array<::Google::Cloud::ContactCenterInsights::V1::IssueModel>] + # The issue models that match the request. + class ListIssueModelsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to get an issue model. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the issue model to get. + class GetIssueModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to delete an issue model. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the issue model to delete. + class DeleteIssueModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for deleting an issue model. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [rw] request + # @return [::Google::Cloud::ContactCenterInsights::V1::DeleteIssueModelRequest] + # The original request for deletion. + class DeleteIssueModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to deploy an issue model. + # @!attribute [rw] name + # @return [::String] + # Required. The issue model to deploy. + class DeployIssueModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response to deploy an issue model. + class DeployIssueModelResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for deploying an issue model. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [rw] request + # @return [::Google::Cloud::ContactCenterInsights::V1::DeployIssueModelRequest] + # The original request for deployment. + class DeployIssueModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to undeploy an issue model. + # @!attribute [rw] name + # @return [::String] + # Required. The issue model to undeploy. + class UndeployIssueModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response to undeploy an issue model. + class UndeployIssueModelResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for undeploying an issue model. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [rw] request + # @return [::Google::Cloud::ContactCenterInsights::V1::UndeployIssueModelRequest] + # The original request for undeployment. + class UndeployIssueModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to export an issue model. + # @!attribute [rw] gcs_destination + # @return [::Google::Cloud::ContactCenterInsights::V1::ExportIssueModelRequest::GcsDestination] + # Google Cloud Storage URI to export the issue model to. + # @!attribute [rw] name + # @return [::String] + # Required. The issue model to export. + class ExportIssueModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Google Cloud Storage Object URI to save the issue model to. + # @!attribute [rw] object_uri + # @return [::String] + # Required. Format: `gs:///` + class GcsDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Response from export issue model + class ExportIssueModelResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata used for export issue model. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time the operation was created. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The time the operation finished running. + # @!attribute [rw] request + # @return [::Google::Cloud::ContactCenterInsights::V1::ExportIssueModelRequest] + # The original export request. + class ExportIssueModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to import an issue model. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::ContactCenterInsights::V1::ImportIssueModelRequest::GcsSource] + # Google Cloud Storage source message. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the issue model. + # @!attribute [rw] create_new_model + # @return [::Boolean] + # 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. + class ImportIssueModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Google Cloud Storage Object URI to get the issue model file from. + # @!attribute [rw] object_uri + # @return [::String] + # Required. Format: `gs:///` + class GcsSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Response from import issue model + class ImportIssueModelResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata used for import issue model. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time the operation was created. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The time the operation finished running. + # @!attribute [rw] request + # @return [::Google::Cloud::ContactCenterInsights::V1::ImportIssueModelRequest] + # The original import request. + class ImportIssueModelMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to get an issue. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the issue to get. + class GetIssueRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list issues. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the issue. + class ListIssuesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response of listing issues. + # @!attribute [rw] issues + # @return [::Array<::Google::Cloud::ContactCenterInsights::V1::Issue>] + # The issues that match the request. + class ListIssuesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to update an issue. + # @!attribute [rw] issue + # @return [::Google::Cloud::ContactCenterInsights::V1::Issue] + # Required. The new values for the issue. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be updated. + class UpdateIssueRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to delete an issue. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the issue to delete. + class DeleteIssueRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to get statistics of an issue model. + # @!attribute [rw] issue_model + # @return [::String] + # Required. The resource name of the issue model to query against. + class CalculateIssueModelStatsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response of querying an issue model's statistics. + # @!attribute [rw] current_stats + # @return [::Google::Cloud::ContactCenterInsights::V1::IssueModelLabelStats] + # The latest label statistics for the queried issue model. Includes results + # on both training data and data labeled after deployment. + class CalculateIssueModelStatsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to create a phrase matcher. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the phrase matcher. Required. The location + # to create a phrase matcher for. Format: `projects//locations/` or `projects//locations/` + # @!attribute [rw] phrase_matcher + # @return [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher] + # Required. The phrase matcher resource to create. + class CreatePhraseMatcherRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list phrase matchers. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the phrase matcher. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + # @!attribute [rw] filter + # @return [::String] + # A filter to reduce results to a specific subset. Useful for querying + # phrase matchers with specific properties. + class ListPhraseMatchersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response of listing phrase matchers. + # @!attribute [rw] phrase_matchers + # @return [::Array<::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher>] + # The phrase matchers that match the request. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListPhraseMatchersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to get a a phrase matcher. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the phrase matcher to get. + class GetPhraseMatcherRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to delete a phrase matcher. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the phrase matcher to delete. + class DeletePhraseMatcherRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to update a phrase matcher. + # @!attribute [rw] phrase_matcher + # @return [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher] + # Required. The new values for the phrase matcher. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be updated. + class UpdatePhraseMatcherRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to get project-level settings. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the settings resource to get. + class GetSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to update project-level settings. + # @!attribute [rw] settings + # @return [::Google::Cloud::ContactCenterInsights::V1::Settings] + # Required. The new settings values. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The list of fields to be updated. + class UpdateSettingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to get location-level encryption specification. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the encryption spec resource to get. + class GetEncryptionSpecRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to initialize a location-level encryption specification. + # @!attribute [rw] encryption_spec + # @return [::Google::Cloud::ContactCenterInsights::V1::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. + class InitializeEncryptionSpecRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response to initialize a location-level encryption specification. + class InitializeEncryptionSpecResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for initializing a location-level encryption specification. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [r] request + # @return [::Google::Cloud::ContactCenterInsights::V1::InitializeEncryptionSpecRequest] + # Output only. The original request for initialization. + # @!attribute [rw] partial_errors + # @return [::Array<::Google::Rpc::Status>] + # Partial errors during initialising operation that might cause the operation + # output to be incomplete. + class InitializeEncryptionSpecMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to create a view. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the view. Required. The location to create + # a view for. + # Format: `projects//locations/` or + # `projects//locations/` + # @!attribute [rw] view + # @return [::Google::Cloud::ContactCenterInsights::V1::View] + # Required. The view resource to create. + class CreateViewRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to get a view. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the view to get. + class GetViewRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to list views. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the views. + # @!attribute [rw] page_size + # @return [::Integer] + # 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. + # @!attribute [rw] page_token + # @return [::String] + # 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. + class ListViewsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response of listing views. + # @!attribute [rw] views + # @return [::Array<::Google::Cloud::ContactCenterInsights::V1::View>] + # The views that match the request. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListViewsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to update a view. + # @!attribute [rw] view + # @return [::Google::Cloud::ContactCenterInsights::V1::View] + # Required. The new view. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be updated. + class UpdateViewRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request to delete a view. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the view to delete. + class DeleteViewRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the options for viewing a conversation. + module ConversationView + # The conversation view is not specified. + # + # * Defaults to `FULL` in `GetConversationRequest`. + # * Defaults to `BASIC` in `ListConversationsRequest`. + CONVERSATION_VIEW_UNSPECIFIED = 0 + + # Populates all fields in the conversation. + FULL = 2 + + # Populates all fields in the conversation except the transcript. + BASIC = 1 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/cloud/contactcenterinsights/v1/resources.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/cloud/contactcenterinsights/v1/resources.rb new file mode 100644 index 000000000000..ed3c13d59a1f --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/cloud/contactcenterinsights/v1/resources.rb @@ -0,0 +1,1635 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module ContactCenterInsights + module V1 + # The conversation resource. + # @!attribute [rw] call_metadata + # @return [::Google::Cloud::ContactCenterInsights::V1::Conversation::CallMetadata] + # Call-specific metadata. + # @!attribute [rw] expire_time + # @return [::Google::Protobuf::Timestamp] + # The time at which this conversation should expire. After this time, the + # conversation data and any associated analyses will be deleted. + # @!attribute [rw] ttl + # @return [::Google::Protobuf::Duration] + # Input only. The TTL for this resource. If specified, then this TTL will + # be used to calculate the expire time. + # @!attribute [rw] name + # @return [::String] + # Immutable. The resource name of the conversation. + # Format: + # projects/\\{project}/locations/\\{location}/conversations/\\{conversation} + # @!attribute [rw] data_source + # @return [::Google::Cloud::ContactCenterInsights::V1::ConversationDataSource] + # The source of the audio and transcription for the conversation. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the conversation was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The most recent time at which the conversation was updated. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The time at which the conversation started. + # @!attribute [rw] language_code + # @return [::String] + # A user-specified language code for the conversation. + # @!attribute [rw] agent_id + # @return [::String] + # An opaque, user-specified string representing the human agent who handled + # the conversation. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # 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. + # @!attribute [rw] quality_metadata + # @return [::Google::Cloud::ContactCenterInsights::V1::Conversation::QualityMetadata] + # Conversation metadata related to quality management. + # @!attribute [rw] metadata_json + # @return [::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. + # @!attribute [r] transcript + # @return [::Google::Cloud::ContactCenterInsights::V1::Conversation::Transcript] + # Output only. The conversation transcript. + # @!attribute [rw] medium + # @return [::Google::Cloud::ContactCenterInsights::V1::Conversation::Medium] + # Immutable. The conversation medium, if unspecified will default to + # PHONE_CALL. + # @!attribute [r] duration + # @return [::Google::Protobuf::Duration] + # Output only. The duration of the conversation. + # @!attribute [r] turn_count + # @return [::Integer] + # Output only. The number of turns in the conversation. + # @!attribute [r] latest_analysis + # @return [::Google::Cloud::ContactCenterInsights::V1::Analysis] + # Output only. The conversation's latest analysis, if one exists. + # @!attribute [r] latest_summary + # @return [::Google::Cloud::ContactCenterInsights::V1::ConversationSummarizationSuggestionData] + # Output only. Latest summary of the conversation. + # @!attribute [r] runtime_annotations + # @return [::Array<::Google::Cloud::ContactCenterInsights::V1::RuntimeAnnotation>] + # Output only. The annotations that were generated during the customer and + # agent interaction. + # @!attribute [r] dialogflow_intents + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::ContactCenterInsights::V1::DialogflowIntent}] + # Output only. All the matched Dialogflow intents in the call. The key + # corresponds to a Dialogflow intent, format: + # projects/\\{project}/agent/\\{agent}/intents/\\{intent} + # @!attribute [rw] obfuscated_user_id + # @return [::String] + # Obfuscated user ID which the customer sent to us. + class Conversation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Call-specific metadata. + # @!attribute [rw] customer_channel + # @return [::Integer] + # The audio channel that contains the customer. + # @!attribute [rw] agent_channel + # @return [::Integer] + # The audio channel that contains the agent. + class CallMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Conversation metadata related to quality management. + # @!attribute [rw] customer_satisfaction_rating + # @return [::Integer] + # An arbitrary integer value indicating the customer's satisfaction rating. + # @!attribute [rw] wait_duration + # @return [::Google::Protobuf::Duration] + # The amount of time the customer waited to connect with an agent. + # @!attribute [rw] menu_path + # @return [::String] + # An arbitrary string value specifying the menu path the customer took. + # @!attribute [rw] agent_info + # @return [::Array<::Google::Cloud::ContactCenterInsights::V1::Conversation::QualityMetadata::AgentInfo>] + # Information about agents involved in the call. + class QualityMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Information about an agent involved in the conversation. + # @!attribute [rw] agent_id + # @return [::String] + # A user-specified string representing the agent. + # @!attribute [rw] display_name + # @return [::String] + # The agent's name. + # @!attribute [rw] team + # @return [::String] + # A user-specified string representing the agent's team. + # @!attribute [rw] disposition_code + # @return [::String] + # A user-provided string indicating the outcome of the agent's segment of + # the call. + class AgentInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A message representing the transcript of a conversation. + # @!attribute [rw] transcript_segments + # @return [::Array<::Google::Cloud::ContactCenterInsights::V1::Conversation::Transcript::TranscriptSegment>] + # A list of sequential transcript segments that comprise the conversation. + class Transcript + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A segment of a full transcript. + # @!attribute [rw] message_time + # @return [::Google::Protobuf::Timestamp] + # The time that the message occurred, if provided. + # @!attribute [rw] text + # @return [::String] + # The text of this segment. + # @!attribute [rw] confidence + # @return [::Float] + # A confidence estimate between 0.0 and 1.0 of the fidelity of this + # segment. A default value of 0.0 indicates that the value is unset. + # @!attribute [rw] words + # @return [::Array<::Google::Cloud::ContactCenterInsights::V1::Conversation::Transcript::TranscriptSegment::WordInfo>] + # A list of the word-specific information for each word in the segment. + # @!attribute [rw] language_code + # @return [::String] + # The language code of this segment as a + # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. + # Example: "en-US". + # @!attribute [rw] channel_tag + # @return [::Integer] + # For conversations derived from multi-channel audio, this is the channel + # number corresponding to the audio from that channel. For + # audioChannelCount = N, its output values can range from '1' to 'N'. A + # channel tag of 0 indicates that the audio is mono. + # @!attribute [rw] segment_participant + # @return [::Google::Cloud::ContactCenterInsights::V1::ConversationParticipant] + # The participant of this segment. + # @!attribute [rw] dialogflow_segment_metadata + # @return [::Google::Cloud::ContactCenterInsights::V1::Conversation::Transcript::TranscriptSegment::DialogflowSegmentMetadata] + # CCAI metadata relating to the current transcript segment. + # @!attribute [rw] sentiment + # @return [::Google::Cloud::ContactCenterInsights::V1::SentimentData] + # The sentiment for this transcript segment. + class TranscriptSegment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Word-level info for words in a transcript. + # @!attribute [rw] start_offset + # @return [::Google::Protobuf::Duration] + # Time offset of the start of this word relative to the beginning of + # the total conversation. + # @!attribute [rw] end_offset + # @return [::Google::Protobuf::Duration] + # Time offset of the end of this word relative to the beginning of the + # total conversation. + # @!attribute [rw] word + # @return [::String] + # The word itself. Includes punctuation marks that surround the word. + # @!attribute [rw] confidence + # @return [::Float] + # A confidence estimate between 0.0 and 1.0 of the fidelity of this + # word. A default value of 0.0 indicates that the value is unset. + class WordInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata from Dialogflow relating to the current transcript segment. + # @!attribute [rw] smart_reply_allowlist_covered + # @return [::Boolean] + # Whether the transcript segment was covered under the configured smart + # reply allowlist in Agent Assist. + class DialogflowSegmentMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::ContactCenterInsights::V1::DialogflowIntent] + class DialogflowIntentsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Possible media for the conversation. + module Medium + # Default value, if unspecified will default to PHONE_CALL. + MEDIUM_UNSPECIFIED = 0 + + # The format for conversations that took place over the phone. + PHONE_CALL = 1 + + # The format for conversations that took place over chat. + CHAT = 2 + end + end + + # The analysis resource. + # @!attribute [rw] name + # @return [::String] + # Immutable. The resource name of the analysis. + # Format: + # projects/\\{project}/locations/\\{location}/conversations/\\{conversation}/analyses/\\{analysis} + # @!attribute [r] request_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the analysis was requested. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the analysis was created, which occurs when + # the long-running operation completes. + # @!attribute [r] analysis_result + # @return [::Google::Cloud::ContactCenterInsights::V1::AnalysisResult] + # Output only. The result of the analysis, which is populated when the + # analysis finishes. + # @!attribute [rw] annotator_selector + # @return [::Google::Cloud::ContactCenterInsights::V1::AnnotatorSelector] + # To select the annotators to run and the phrase matchers to use + # (if any). If not specified, all annotators will be run. + class Analysis + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The conversation source, which is a combination of transcript and audio. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::ContactCenterInsights::V1::GcsSource] + # A Cloud Storage location specification for the audio and transcript. + # @!attribute [rw] dialogflow_source + # @return [::Google::Cloud::ContactCenterInsights::V1::DialogflowSource] + # The source when the conversation comes from Dialogflow. + class ConversationDataSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A Cloud Storage source of conversation data. + # @!attribute [rw] audio_uri + # @return [::String] + # Cloud Storage URI that points to a file that contains the conversation + # audio. + # @!attribute [rw] transcript_uri + # @return [::String] + # Immutable. Cloud Storage URI that points to a file that contains the + # conversation transcript. + class GcsSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A Dialogflow source of conversation data. + # @!attribute [r] dialogflow_conversation + # @return [::String] + # Output only. The name of the Dialogflow conversation that this conversation + # resource is derived from. Format: + # projects/\\{project}/locations/\\{location}/conversations/\\{conversation} + # @!attribute [rw] audio_uri + # @return [::String] + # Cloud Storage URI that points to a file that contains the conversation + # audio. + class DialogflowSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The result of an analysis. + # @!attribute [rw] call_analysis_metadata + # @return [::Google::Cloud::ContactCenterInsights::V1::AnalysisResult::CallAnalysisMetadata] + # Call-specific metadata created by the analysis. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The time at which the analysis ended. + class AnalysisResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Call-specific metadata created during analysis. + # @!attribute [rw] annotations + # @return [::Array<::Google::Cloud::ContactCenterInsights::V1::CallAnnotation>] + # A list of call annotations that apply to this call. + # @!attribute [rw] entities + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::ContactCenterInsights::V1::Entity}] + # All the entities in the call. + # @!attribute [rw] sentiments + # @return [::Array<::Google::Cloud::ContactCenterInsights::V1::ConversationLevelSentiment>] + # Overall conversation-level sentiment for each channel of the call. + # @!attribute [rw] silence + # @return [::Google::Cloud::ContactCenterInsights::V1::ConversationLevelSilence] + # Overall conversation-level silence during the call. + # @!attribute [rw] intents + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::ContactCenterInsights::V1::Intent}] + # All the matched intents in the call. + # @!attribute [rw] phrase_matchers + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::ContactCenterInsights::V1::PhraseMatchData}] + # All the matched phrase matchers in the call. + # @!attribute [rw] issue_model_result + # @return [::Google::Cloud::ContactCenterInsights::V1::IssueModelResult] + # Overall conversation-level issue modeling result. + class CallAnalysisMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::ContactCenterInsights::V1::Entity] + class EntitiesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::ContactCenterInsights::V1::Intent] + class IntentsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::ContactCenterInsights::V1::PhraseMatchData] + class PhraseMatchersEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Issue Modeling result on a conversation. + # @!attribute [rw] issue_model + # @return [::String] + # Issue model that generates the result. + # Format: projects/\\{project}/locations/\\{location}/issueModels/\\{issue_model} + # @!attribute [rw] issues + # @return [::Array<::Google::Cloud::ContactCenterInsights::V1::IssueAssignment>] + # All the matched issues. + class IssueModelResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # One channel of conversation-level sentiment data. + # @!attribute [rw] channel_tag + # @return [::Integer] + # The channel of the audio that the data applies to. + # @!attribute [rw] sentiment_data + # @return [::Google::Cloud::ContactCenterInsights::V1::SentimentData] + # Data specifying sentiment. + class ConversationLevelSentiment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Conversation-level silence data. + # @!attribute [rw] silence_duration + # @return [::Google::Protobuf::Duration] + # Amount of time calculated to be in silence. + # @!attribute [rw] silence_percentage + # @return [::Float] + # Percentage of the total conversation spent in silence. + class ConversationLevelSilence + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about the issue. + # @!attribute [rw] issue + # @return [::String] + # Resource name of the assigned issue. + # @!attribute [rw] score + # @return [::Float] + # Score indicating the likelihood of the issue assignment. + # currently bounded on [0,1]. + # @!attribute [rw] display_name + # @return [::String] + # Immutable. Display name of the assigned issue. This field is set at time of + # analyis and immutable since then. + class IssueAssignment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A piece of metadata that applies to a window of a call. + # @!attribute [rw] interruption_data + # @return [::Google::Cloud::ContactCenterInsights::V1::InterruptionData] + # Data specifying an interruption. + # @!attribute [rw] sentiment_data + # @return [::Google::Cloud::ContactCenterInsights::V1::SentimentData] + # Data specifying sentiment. + # @!attribute [rw] silence_data + # @return [::Google::Cloud::ContactCenterInsights::V1::SilenceData] + # Data specifying silence. + # @!attribute [rw] hold_data + # @return [::Google::Cloud::ContactCenterInsights::V1::HoldData] + # Data specifying a hold. + # @!attribute [rw] entity_mention_data + # @return [::Google::Cloud::ContactCenterInsights::V1::EntityMentionData] + # Data specifying an entity mention. + # @!attribute [rw] intent_match_data + # @return [::Google::Cloud::ContactCenterInsights::V1::IntentMatchData] + # Data specifying an intent match. + # @!attribute [rw] phrase_match_data + # @return [::Google::Cloud::ContactCenterInsights::V1::PhraseMatchData] + # Data specifying a phrase match. + # @!attribute [rw] issue_match_data + # @return [::Google::Cloud::ContactCenterInsights::V1::IssueMatchData] + # Data specifying an issue match. + # @!attribute [rw] channel_tag + # @return [::Integer] + # The channel of the audio where the annotation occurs. For single-channel + # audio, this field is not populated. + # @!attribute [rw] annotation_start_boundary + # @return [::Google::Cloud::ContactCenterInsights::V1::AnnotationBoundary] + # The boundary in the conversation where the annotation starts, inclusive. + # @!attribute [rw] annotation_end_boundary + # @return [::Google::Cloud::ContactCenterInsights::V1::AnnotationBoundary] + # The boundary in the conversation where the annotation ends, inclusive. + class CallAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A point in a conversation that marks the start or the end of an annotation. + # @!attribute [rw] word_index + # @return [::Integer] + # The word index of this boundary with respect to the first word in the + # transcript piece. This index starts at zero. + # @!attribute [rw] transcript_index + # @return [::Integer] + # The index in the sequence of transcribed pieces of the conversation where + # the boundary is located. This index starts at zero. + class AnnotationBoundary + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The data for an entity annotation. + # Represents a phrase in the conversation that is a known entity, such + # as a person, an organization, or location. + # @!attribute [rw] display_name + # @return [::String] + # The representative name for the entity. + # @!attribute [rw] type + # @return [::Google::Cloud::ContactCenterInsights::V1::Entity::Type] + # The entity type. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Map{::String => ::String}] + # Metadata associated with the entity. + # + # For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) + # and Knowledge Graph MID (`mid`), if they are available. For the metadata + # associated with other entity types, see the Type table below. + # @!attribute [rw] salience + # @return [::Float] + # The salience score associated with the entity in the [0, 1.0] range. + # + # The salience score for an entity provides information about the + # importance or centrality of that entity to the entire document text. + # Scores closer to 0 are less salient, while scores closer to 1.0 are highly + # salient. + # @!attribute [rw] sentiment + # @return [::Google::Cloud::ContactCenterInsights::V1::SentimentData] + # The aggregate sentiment expressed for this entity in the conversation. + class Entity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class MetadataEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The type of the entity. For most entity types, the associated metadata is a + # Wikipedia URL (`wikipedia_url`) and Knowledge Graph MID (`mid`). The table + # below lists the associated fields for entities that have different + # metadata. + module Type + # Unspecified. + TYPE_UNSPECIFIED = 0 + + # Person. + PERSON = 1 + + # Location. + LOCATION = 2 + + # Organization. + ORGANIZATION = 3 + + # Event. + EVENT = 4 + + # Artwork. + WORK_OF_ART = 5 + + # Consumer product. + CONSUMER_GOOD = 6 + + # Other types of entities. + OTHER = 7 + + # Phone number. + # + # The metadata lists the phone number (formatted according to local + # convention), plus whichever additional elements appear in the text: + # + # * `number` - The actual number, broken down into sections according to + # local convention. + # * `national_prefix` - Country code, if detected. + # * `area_code` - Region or area code, if detected. + # * `extension` - Phone extension (to be dialed after connection), if + # detected. + PHONE_NUMBER = 9 + + # Address. + # + # The metadata identifies the street number and locality plus whichever + # additional elements appear in the text: + # + # * `street_number` - Street number. + # * `locality` - City or town. + # * `street_name` - Street/route name, if detected. + # * `postal_code` - Postal code, if detected. + # * `country` - Country, if detected. + # * `broad_region` - Administrative area, such as the state, if detected. + # * `narrow_region` - Smaller administrative area, such as county, if + # detected. + # * `sublocality` - Used in Asian addresses to demark a district within a + # city, if detected. + ADDRESS = 10 + + # Date. + # + # The metadata identifies the components of the date: + # + # * `year` - Four digit year, if detected. + # * `month` - Two digit month number, if detected. + # * `day` - Two digit day number, if detected. + DATE = 11 + + # Number. + # + # The metadata is the number itself. + NUMBER = 12 + + # Price. + # + # The metadata identifies the `value` and `currency`. + PRICE = 13 + end + end + + # The data for an intent. + # Represents a detected intent in the conversation, for example MAKES_PROMISE. + # @!attribute [rw] id + # @return [::String] + # The unique identifier of the intent. + # @!attribute [rw] display_name + # @return [::String] + # The human-readable name of the intent. + class Intent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The data for a matched phrase matcher. + # Represents information identifying a phrase matcher for a given match. + # @!attribute [rw] phrase_matcher + # @return [::String] + # The unique identifier (the resource name) of the phrase matcher. + # @!attribute [rw] display_name + # @return [::String] + # The human-readable name of the phrase matcher. + class PhraseMatchData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The data for a Dialogflow intent. + # Represents a detected intent in the conversation, e.g. MAKES_PROMISE. + # @!attribute [rw] display_name + # @return [::String] + # The human-readable name of the intent. + class DialogflowIntent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The data for an interruption annotation. + class InterruptionData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The data for a silence annotation. + class SilenceData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The data for a hold annotation. + class HoldData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The data for an entity mention annotation. + # This represents a mention of an `Entity` in the conversation. + # @!attribute [rw] entity_unique_id + # @return [::String] + # The key of this entity in conversation entities. + # Can be used to retrieve the exact `Entity` this mention is attached to. + # @!attribute [rw] type + # @return [::Google::Cloud::ContactCenterInsights::V1::EntityMentionData::MentionType] + # The type of the entity mention. + # @!attribute [rw] sentiment + # @return [::Google::Cloud::ContactCenterInsights::V1::SentimentData] + # Sentiment expressed for this mention of the entity. + class EntityMentionData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The supported types of mentions. + module MentionType + # Unspecified. + MENTION_TYPE_UNSPECIFIED = 0 + + # Proper noun. + PROPER = 1 + + # Common noun (or noun compound). + COMMON = 2 + end + end + + # The data for an intent match. + # Represents an intent match for a text segment in the conversation. A text + # segment can be part of a sentence, a complete sentence, or an utterance + # with multiple sentences. + # @!attribute [rw] intent_unique_id + # @return [::String] + # The id of the matched intent. + # Can be used to retrieve the corresponding intent information. + class IntentMatchData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The data for a sentiment annotation. + # @!attribute [rw] magnitude + # @return [::Float] + # A non-negative number from 0 to infinity which represents the abolute + # magnitude of sentiment regardless of score. + # @!attribute [rw] score + # @return [::Float] + # The sentiment score between -1.0 (negative) and 1.0 (positive). + class SentimentData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The data for an issue match annotation. + # @!attribute [rw] issue_assignment + # @return [::Google::Cloud::ContactCenterInsights::V1::IssueAssignment] + # Information about the issue's assignment. + class IssueMatchData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The issue model resource. + # @!attribute [rw] name + # @return [::String] + # Immutable. The resource name of the issue model. + # Format: + # projects/\\{project}/locations/\\{location}/issueModels/\\{issue_model} + # @!attribute [rw] display_name + # @return [::String] + # The representative name for the issue model. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which this issue model was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The most recent time at which the issue model was updated. + # @!attribute [r] issue_count + # @return [::Integer] + # Output only. Number of issues in this issue model. + # @!attribute [r] state + # @return [::Google::Cloud::ContactCenterInsights::V1::IssueModel::State] + # Output only. State of the model. + # @!attribute [rw] input_data_config + # @return [::Google::Cloud::ContactCenterInsights::V1::IssueModel::InputDataConfig] + # Configs for the input data that used to create the issue model. + # @!attribute [r] training_stats + # @return [::Google::Cloud::ContactCenterInsights::V1::IssueModelLabelStats] + # Output only. Immutable. The issue model's label statistics on its training + # data. + # @!attribute [rw] model_type + # @return [::Google::Cloud::ContactCenterInsights::V1::IssueModel::ModelType] + # Type of the model. + # @!attribute [rw] language_code + # @return [::String] + # Language of the model. + class IssueModel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configs for the input data used to create the issue model. + # @!attribute [rw] medium + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::ContactCenterInsights::V1::Conversation::Medium] + # Medium of conversations used in training data. This field is being + # deprecated. To specify the medium to be used in training a new issue + # model, set the `medium` field on `filter`. + # @!attribute [r] training_conversations_count + # @return [::Integer] + # Output only. Number of conversations used in training. Output only. + # @!attribute [rw] filter + # @return [::String] + # A filter to reduce the conversations used for training the model to a + # specific subset. + class InputDataConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # State of the model. + module State + # Unspecified. + STATE_UNSPECIFIED = 0 + + # Model is not deployed but is ready to deploy. + UNDEPLOYED = 1 + + # Model is being deployed. + DEPLOYING = 2 + + # Model is deployed and is ready to be used. A model can only be used in + # analysis if it's in this state. + DEPLOYED = 3 + + # Model is being undeployed. + UNDEPLOYING = 4 + + # Model is being deleted. + DELETING = 5 + end + + # Type of the model. + module ModelType + # Unspecified model type. + MODEL_TYPE_UNSPECIFIED = 0 + + # Type V1. + TYPE_V1 = 1 + + # Type V2. + TYPE_V2 = 2 + end + end + + # The issue resource. + # @!attribute [rw] name + # @return [::String] + # Immutable. The resource name of the issue. + # Format: + # projects/\\{project}/locations/\\{location}/issueModels/\\{issue_model}/issues/\\{issue} + # @!attribute [rw] display_name + # @return [::String] + # The representative name for the issue. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which this issue was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The most recent time that this issue was updated. + # @!attribute [r] sample_utterances + # @return [::Array<::String>] + # Output only. Resource names of the sample representative utterances that + # match to this issue. + # @!attribute [rw] display_description + # @return [::String] + # Representative description of the issue. + class Issue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Aggregated statistics about an issue model. + # @!attribute [rw] analyzed_conversations_count + # @return [::Integer] + # Number of conversations the issue model has analyzed at this point in time. + # @!attribute [rw] unclassified_conversations_count + # @return [::Integer] + # Number of analyzed conversations for which no issue was applicable at this + # point in time. + # @!attribute [rw] issue_stats + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::ContactCenterInsights::V1::IssueModelLabelStats::IssueStats}] + # Statistics on each issue. Key is the issue's resource name. + class IssueModelLabelStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Aggregated statistics about an issue. + # @!attribute [rw] issue + # @return [::String] + # Issue resource. + # Format: + # projects/\\{project}/locations/\\{location}/issueModels/\\{issue_model}/issues/\\{issue} + # @!attribute [rw] labeled_conversations_count + # @return [::Integer] + # Number of conversations attached to the issue at this point in time. + # @!attribute [rw] display_name + # @return [::String] + # Display name of the issue. + class IssueStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::ContactCenterInsights::V1::IssueModelLabelStats::IssueStats] + class IssueStatsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The phrase matcher resource. + # @!attribute [rw] name + # @return [::String] + # The resource name of the phrase matcher. + # Format: + # projects/\\{project}/locations/\\{location}/phraseMatchers/\\{phrase_matcher} + # @!attribute [r] revision_id + # @return [::String] + # Output only. Immutable. The revision ID of the phrase matcher. + # A new revision is committed whenever the matcher is changed, except when it + # is activated or deactivated. A server generated random ID will be used. + # Example: locations/global/phraseMatchers/my-first-matcher@1234567 + # @!attribute [rw] version_tag + # @return [::String] + # The customized version tag to use for the phrase matcher. If not specified, + # it will default to `revision_id`. + # @!attribute [r] revision_create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp of when the revision was created. It is also the + # create time when a new matcher is added. + # @!attribute [rw] display_name + # @return [::String] + # The human-readable name of the phrase matcher. + # @!attribute [rw] type + # @return [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher::PhraseMatcherType] + # Required. The type of this phrase matcher. + # @!attribute [rw] active + # @return [::Boolean] + # Applies the phrase matcher only when it is active. + # @!attribute [rw] phrase_match_rule_groups + # @return [::Array<::Google::Cloud::ContactCenterInsights::V1::PhraseMatchRuleGroup>] + # A list of phase match rule groups that are included in this matcher. + # @!attribute [r] activation_update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The most recent time at which the activation status was + # updated. + # @!attribute [rw] role_match + # @return [::Google::Cloud::ContactCenterInsights::V1::ConversationParticipant::Role] + # The role whose utterances the phrase matcher should be matched + # against. If the role is ROLE_UNSPECIFIED it will be matched against any + # utterances in the transcript. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The most recent time at which the phrase matcher was updated. + class PhraseMatcher + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specifies how to combine each phrase match rule group to determine whether + # there is a match. + module PhraseMatcherType + # Unspecified. + PHRASE_MATCHER_TYPE_UNSPECIFIED = 0 + + # Must meet all phrase match rule groups or there is no match. + ALL_OF = 1 + + # If any of the phrase match rule groups are met, there is a match. + ANY_OF = 2 + end + end + + # A message representing a rule in the phrase matcher. + # @!attribute [rw] type + # @return [::Google::Cloud::ContactCenterInsights::V1::PhraseMatchRuleGroup::PhraseMatchRuleGroupType] + # Required. The type of this phrase match rule group. + # @!attribute [rw] phrase_match_rules + # @return [::Array<::Google::Cloud::ContactCenterInsights::V1::PhraseMatchRule>] + # A list of phrase match rules that are included in this group. + class PhraseMatchRuleGroup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specifies how to combine each phrase match rule for whether there is a + # match. + module PhraseMatchRuleGroupType + # Unspecified. + PHRASE_MATCH_RULE_GROUP_TYPE_UNSPECIFIED = 0 + + # Must meet all phrase match rules or there is no match. + ALL_OF = 1 + + # If any of the phrase match rules are met, there is a match. + ANY_OF = 2 + end + end + + # The data for a phrase match rule. + # @!attribute [rw] query + # @return [::String] + # Required. The phrase to be matched. + # @!attribute [rw] negated + # @return [::Boolean] + # Specifies whether the phrase must be missing from the transcript segment or + # present in the transcript segment. + # @!attribute [rw] config + # @return [::Google::Cloud::ContactCenterInsights::V1::PhraseMatchRuleConfig] + # Provides additional information about the rule that specifies how to apply + # the rule. + class PhraseMatchRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration information of a phrase match rule. + # @!attribute [rw] exact_match_config + # @return [::Google::Cloud::ContactCenterInsights::V1::ExactMatchConfig] + # The configuration for the exact match rule. + class PhraseMatchRuleConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Exact match configuration. + # @!attribute [rw] case_sensitive + # @return [::Boolean] + # Whether to consider case sensitivity when performing an exact match. + class ExactMatchConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The CCAI Insights project wide settings. + # Use these settings to configure the behavior of Insights. + # View these settings with + # [`getsettings`](https://cloud.google.com/contact-center/insights/docs/reference/rest/v1/projects.locations/getSettings) + # and change the settings with + # [`updateSettings`](https://cloud.google.com/contact-center/insights/docs/reference/rest/v1/projects.locations/updateSettings). + # @!attribute [rw] name + # @return [::String] + # Immutable. The resource name of the settings resource. + # Format: + # projects/\\{project}/locations/\\{location}/settings + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the settings was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the settings were last updated. + # @!attribute [rw] language_code + # @return [::String] + # A language code to be applied to each transcript segment unless the segment + # already specifies a language code. Language code defaults to "en-US" if it + # is neither specified on the segment nor here. + # @!attribute [rw] conversation_ttl + # @return [::Google::Protobuf::Duration] + # The default TTL for newly-created conversations. If a conversation has a + # specified expiration, that value will be used instead. Changing this + # value will not change the expiration of existing conversations. + # Conversations with no expire time persist until they are deleted. + # @!attribute [rw] pubsub_notification_settings + # @return [::Google::Protobuf::Map{::String => ::String}] + # A map that maps a notification trigger to a Pub/Sub topic. Each time a + # specified trigger occurs, Insights will notify the corresponding Pub/Sub + # topic. + # + # Keys are notification triggers. Supported keys are: + # + # * "all-triggers": Notify each time any of the supported triggers occurs. + # * "create-analysis": Notify each time an analysis is created. + # * "create-conversation": Notify each time a conversation is created. + # * "export-insights-data": Notify each time an export is complete. + # * "ingest-conversations": Notify each time an IngestConversations LRO is + # complete. + # * "update-conversation": Notify each time a conversation is updated via + # UpdateConversation. + # * "upload-conversation": Notify when an UploadConversation LRO is complete. + # + # Values are Pub/Sub topics. The format of each Pub/Sub topic is: + # projects/\\{project}/topics/\\{topic} + # @!attribute [rw] analysis_config + # @return [::Google::Cloud::ContactCenterInsights::V1::Settings::AnalysisConfig] + # Default analysis settings. + # @!attribute [rw] redaction_config + # @return [::Google::Cloud::ContactCenterInsights::V1::RedactionConfig] + # Default DLP redaction resources to be applied while ingesting + # conversations. This applies to conversations ingested from the + # `UploadConversation` and `IngestConversations` endpoints, including + # conversations coming from CCAI Platform. + # @!attribute [rw] speech_config + # @return [::Google::Cloud::ContactCenterInsights::V1::SpeechConfig] + # Optional. Default Speech-to-Text resources to use while ingesting audio + # files. Optional, CCAI Insights will create a default if not provided. This + # applies to conversations ingested from the `UploadConversation` and + # `IngestConversations` endpoints, including conversations coming from CCAI + # Platform. + class Settings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Default configuration when creating Analyses in Insights. + # @!attribute [rw] runtime_integration_analysis_percentage + # @return [::Float] + # Percentage of conversations created using Dialogflow runtime integration + # to analyze automatically, between [0, 100]. + # @!attribute [rw] upload_conversation_analysis_percentage + # @return [::Float] + # Percentage of conversations created using the UploadConversation endpoint + # to analyze automatically, between [0, 100]. + # @!attribute [rw] annotator_selector + # @return [::Google::Cloud::ContactCenterInsights::V1::AnnotatorSelector] + # To select the annotators to run and the phrase matchers to use + # (if any). If not specified, all annotators will be run. + class AnalysisConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class PubsubNotificationSettingsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A customer-managed encryption key specification that can be applied to all + # created resources (e.g. Conversation). + # @!attribute [rw] name + # @return [::String] + # Immutable. The resource name of the encryption key specification resource. + # Format: + # projects/\\{project}/locations/\\{location}/encryptionSpec + # @!attribute [rw] kms_key + # @return [::String] + # 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: + # `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{key}` + class EncryptionSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DLP resources used for redaction while ingesting conversations. + # DLP settings are applied to conversations ingested from the + # `UploadConversation` and `IngestConversations` endpoints, including + # conversation coming from CCAI Platform. They are not applied to conversations + # ingested from the `CreateConversation` endpoint or the Dialogflow / Agent + # Assist runtime integrations. When using Dialogflow / Agent Assist runtime + # integrations, redaction should be performed in Dialogflow / Agent Assist. + # @!attribute [rw] deidentify_template + # @return [::String] + # The fully-qualified DLP deidentify template resource name. + # Format: + # `projects/{project}/deidentifyTemplates/{template}` + # @!attribute [rw] inspect_template + # @return [::String] + # The fully-qualified DLP inspect template resource name. + # Format: + # `projects/{project}/locations/{location}/inspectTemplates/{template}` + class RedactionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Speech-to-Text configuration. + # Speech-to-Text settings are applied to conversations ingested from the + # `UploadConversation` and `IngestConversations` endpoints, including + # conversation coming from CCAI Platform. They are not applied to conversations + # ingested from the `CreateConversation` endpoint. + # @!attribute [rw] speech_recognizer + # @return [::String] + # The fully-qualified Speech Recognizer resource name. + # Format: + # `projects/{project_id}/locations/{location}/recognizer/{recognizer}` + class SpeechConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An annotation that was generated during the customer and agent interaction. + # @!attribute [rw] article_suggestion + # @return [::Google::Cloud::ContactCenterInsights::V1::ArticleSuggestionData] + # Agent Assist Article Suggestion data. + # @!attribute [rw] faq_answer + # @return [::Google::Cloud::ContactCenterInsights::V1::FaqAnswerData] + # Agent Assist FAQ answer data. + # @!attribute [rw] smart_reply + # @return [::Google::Cloud::ContactCenterInsights::V1::SmartReplyData] + # Agent Assist Smart Reply data. + # @!attribute [rw] smart_compose_suggestion + # @return [::Google::Cloud::ContactCenterInsights::V1::SmartComposeSuggestionData] + # Agent Assist Smart Compose suggestion data. + # @!attribute [rw] dialogflow_interaction + # @return [::Google::Cloud::ContactCenterInsights::V1::DialogflowInteractionData] + # Dialogflow interaction data. + # @!attribute [rw] conversation_summarization_suggestion + # @return [::Google::Cloud::ContactCenterInsights::V1::ConversationSummarizationSuggestionData] + # Conversation summarization suggestion data. + # @!attribute [rw] annotation_id + # @return [::String] + # The unique identifier of the annotation. + # Format: + # projects/\\{project}/locations/\\{location}/conversationDatasets/\\{dataset}/conversationDataItems/\\{data_item}/conversationAnnotations/\\{annotation} + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time at which this annotation was created. + # @!attribute [rw] start_boundary + # @return [::Google::Cloud::ContactCenterInsights::V1::AnnotationBoundary] + # The boundary in the conversation where the annotation starts, inclusive. + # @!attribute [rw] end_boundary + # @return [::Google::Cloud::ContactCenterInsights::V1::AnnotationBoundary] + # The boundary in the conversation where the annotation ends, inclusive. + # @!attribute [rw] answer_feedback + # @return [::Google::Cloud::ContactCenterInsights::V1::AnswerFeedback] + # The feedback that the customer has about the answer in `data`. + # @!attribute [rw] user_input + # @return [::Google::Cloud::ContactCenterInsights::V1::RuntimeAnnotation::UserInput] + # Explicit input used for generating the answer + class RuntimeAnnotation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Explicit input used for generating the answer + # @!attribute [rw] query + # @return [::String] + # Query text. Article Search uses this to store the input query used + # to generate the search results. + # @!attribute [rw] generator_name + # @return [::String] + # The resource name of associated generator. Format: + # `projects//locations//generators/` + # @!attribute [rw] query_source + # @return [::Google::Cloud::ContactCenterInsights::V1::RuntimeAnnotation::UserInput::QuerySource] + # Query source for the answer. + class UserInput + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The source of the query. + module QuerySource + # Unknown query source. + QUERY_SOURCE_UNSPECIFIED = 0 + + # The query is from agents. + AGENT_QUERY = 1 + + # The query is a query from previous suggestions, e.g. from a preceding + # SuggestKnowledgeAssist response. + SUGGESTED_QUERY = 2 + end + end + end + + # The feedback that the customer has about a certain answer in the + # conversation. + # @!attribute [rw] correctness_level + # @return [::Google::Cloud::ContactCenterInsights::V1::AnswerFeedback::CorrectnessLevel] + # The correctness level of an answer. + # @!attribute [rw] clicked + # @return [::Boolean] + # Indicates whether an answer or item was clicked by the human agent. + # @!attribute [rw] displayed + # @return [::Boolean] + # Indicates whether an answer or item was displayed to the human agent in the + # agent desktop UI. + class AnswerFeedback + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The correctness level of an answer. + module CorrectnessLevel + # Correctness level unspecified. + CORRECTNESS_LEVEL_UNSPECIFIED = 0 + + # Answer is totally wrong. + NOT_CORRECT = 1 + + # Answer is partially correct. + PARTIALLY_CORRECT = 2 + + # Answer is fully correct. + FULLY_CORRECT = 3 + end + end + + # Agent Assist Article Suggestion data. + # @!attribute [rw] title + # @return [::String] + # Article title. + # @!attribute [rw] uri + # @return [::String] + # Article URI. + # @!attribute [rw] confidence_score + # @return [::Float] + # The system's confidence score that this article is a good match for this + # conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely + # certain). + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map that contains metadata about the Article Suggestion and the document + # that it originates from. + # @!attribute [rw] query_record + # @return [::String] + # The name of the answer record. + # Format: + # projects/\\{project}/locations/\\{location}/answerRecords/\\{answer_record} + # @!attribute [rw] source + # @return [::String] + # The knowledge document that this answer was extracted from. + # Format: + # projects/\\{project}/knowledgeBases/\\{knowledge_base}/documents/\\{document} + class ArticleSuggestionData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class MetadataEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Agent Assist frequently-asked-question answer data. + # @!attribute [rw] answer + # @return [::String] + # The piece of text from the `source` knowledge base document. + # @!attribute [rw] confidence_score + # @return [::Float] + # The system's confidence score that this answer is a good match for this + # conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely + # certain). + # @!attribute [rw] question + # @return [::String] + # The corresponding FAQ question. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map that contains metadata about the FAQ answer and the document that + # it originates from. + # @!attribute [rw] query_record + # @return [::String] + # The name of the answer record. + # Format: + # projects/\\{project}/locations/\\{location}/answerRecords/\\{answer_record} + # @!attribute [rw] source + # @return [::String] + # The knowledge document that this answer was extracted from. + # Format: + # projects/\\{project}/knowledgeBases/\\{knowledge_base}/documents/\\{document}. + class FaqAnswerData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class MetadataEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Agent Assist Smart Reply data. + # @!attribute [rw] reply + # @return [::String] + # The content of the reply. + # @!attribute [rw] confidence_score + # @return [::Float] + # The system's confidence score that this reply is a good match for this + # conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely + # certain). + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map that contains metadata about the Smart Reply and the document from + # which it originates. + # @!attribute [rw] query_record + # @return [::String] + # The name of the answer record. + # Format: + # projects/\\{project}/locations/\\{location}/answerRecords/\\{answer_record} + class SmartReplyData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class MetadataEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Agent Assist Smart Compose suggestion data. + # @!attribute [rw] suggestion + # @return [::String] + # The content of the suggestion. + # @!attribute [rw] confidence_score + # @return [::Float] + # The system's confidence score that this suggestion is a good match for this + # conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely + # certain). + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map that contains metadata about the Smart Compose suggestion and the + # document from which it originates. + # @!attribute [rw] query_record + # @return [::String] + # The name of the answer record. + # Format: + # projects/\\{project}/locations/\\{location}/answerRecords/\\{answer_record} + class SmartComposeSuggestionData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class MetadataEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Dialogflow interaction data. + # @!attribute [rw] dialogflow_intent_id + # @return [::String] + # The Dialogflow intent resource path. Format: + # projects/\\{project}/agent/\\{agent}/intents/\\{intent} + # @!attribute [rw] confidence + # @return [::Float] + # The confidence of the match ranging from 0.0 (completely uncertain) to 1.0 + # (completely certain). + class DialogflowInteractionData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Conversation summarization suggestion data. + # @!attribute [rw] text + # @return [::String] + # The summarization content that is concatenated into one string. + # @!attribute [rw] text_sections + # @return [::Google::Protobuf::Map{::String => ::String}] + # The summarization content that is divided into sections. The key is the + # section's name and the value is the section's content. There is no + # specific format for the key or value. + # @!attribute [rw] confidence + # @return [::Float] + # The confidence score of the summarization. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Map{::String => ::String}] + # A map that contains metadata about the summarization and the document + # from which it originates. + # @!attribute [rw] answer_record + # @return [::String] + # The name of the answer record. + # Format: + # projects/\\{project}/locations/\\{location}/answerRecords/\\{answer_record} + # @!attribute [rw] conversation_model + # @return [::String] + # The name of the model that generates this summary. + # Format: + # projects/\\{project}/locations/\\{location}/conversationModels/\\{conversation_model} + class ConversationSummarizationSuggestionData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class TextSectionsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class MetadataEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The call participant speaking for a given utterance. + # @!attribute [rw] dialogflow_participant_name + # @return [::String] + # The name of the participant provided by Dialogflow. Format: + # projects/\\{project}/locations/\\{location}/conversations/\\{conversation}/participants/\\{participant} + # @!attribute [rw] user_id + # @return [::String] + # A user-specified ID representing the participant. + # @!attribute [rw] dialogflow_participant + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Deprecated. Use `dialogflow_participant_name` instead. + # The name of the Dialogflow participant. Format: + # projects/\\{project}/locations/\\{location}/conversations/\\{conversation}/participants/\\{participant} + # @!attribute [rw] obfuscated_external_user_id + # @return [::String] + # Obfuscated user ID from Dialogflow. + # @!attribute [rw] role + # @return [::Google::Cloud::ContactCenterInsights::V1::ConversationParticipant::Role] + # The role of the participant. + class ConversationParticipant + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The role of the participant. + module Role + # Participant's role is not set. + ROLE_UNSPECIFIED = 0 + + # Participant is a human agent. + HUMAN_AGENT = 1 + + # Participant is an automated agent. + AUTOMATED_AGENT = 2 + + # Participant is an end user who conversed with the contact center. + END_USER = 3 + + # Participant is either a human or automated agent. + ANY_AGENT = 4 + end + end + + # The View resource. + # @!attribute [rw] name + # @return [::String] + # Immutable. The resource name of the view. + # Format: + # projects/\\{project}/locations/\\{location}/views/\\{view} + # @!attribute [rw] display_name + # @return [::String] + # The human-readable display name of the view. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which this view was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The most recent time at which the view was updated. + # @!attribute [rw] value + # @return [::String] + # String with specific view properties, must be non-empty. + class View + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Selector of all available annotators and phrase matchers to run. + # @!attribute [rw] run_interruption_annotator + # @return [::Boolean] + # Whether to run the interruption annotator. + # @!attribute [rw] run_silence_annotator + # @return [::Boolean] + # Whether to run the silence annotator. + # @!attribute [rw] run_phrase_matcher_annotator + # @return [::Boolean] + # Whether to run the active phrase matcher annotator(s). + # @!attribute [rw] phrase_matchers + # @return [::Array<::String>] + # The list of phrase matchers to run. If not provided, all active phrase + # matchers will be used. If inactive phrase matchers are provided, they will + # not be used. Phrase matchers will be run only if + # run_phrase_matcher_annotator is set to true. Format: + # projects/\\{project}/locations/\\{location}/phraseMatchers/\\{phrase_matcher} + # @!attribute [rw] run_sentiment_annotator + # @return [::Boolean] + # Whether to run the sentiment annotator. + # @!attribute [rw] run_entity_annotator + # @return [::Boolean] + # Whether to run the entity annotator. + # @!attribute [rw] run_intent_annotator + # @return [::Boolean] + # Whether to run the intent annotator. + # @!attribute [rw] run_issue_model_annotator + # @return [::Boolean] + # Whether to run the issue model annotator. A model should have already been + # deployed for this to take effect. + # @!attribute [rw] issue_models + # @return [::Array<::String>] + # The issue model to run. If not provided, the most recently deployed topic + # model will be used. The provided issue model will only be used for + # inference if the issue model is deployed and if run_issue_model_annotator + # is set to true. If more than one issue model is provided, only the first + # provided issue model will be used for inference. + # @!attribute [rw] run_summarization_annotator + # @return [::Boolean] + # Whether to run the summarization annotator. + # @!attribute [rw] summarization_config + # @return [::Google::Cloud::ContactCenterInsights::V1::AnnotatorSelector::SummarizationConfig] + # Configuration for the summarization annotator. + class AnnotatorSelector + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration for summarization. + # @!attribute [rw] conversation_profile + # @return [::String] + # Resource name of the Dialogflow conversation profile. + # Format: + # projects/\\{project}/locations/\\{location}/conversationProfiles/\\{conversation_profile} + # @!attribute [rw] summarization_model + # @return [::Google::Cloud::ContactCenterInsights::V1::AnnotatorSelector::SummarizationConfig::SummarizationModel] + # Default summarization model to be used. + class SummarizationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Summarization model to use, if `conversation_profile` is not used. + module SummarizationModel + # Unspecified summarization model. + SUMMARIZATION_MODEL_UNSPECIFIED = 0 + + # The CCAI baseline model. + BASELINE_MODEL = 1 + + # The CCAI baseline model, V2.0. + BASELINE_MODEL_V2_0 = 2 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..54b83fb82b7d --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,164 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal response of the operation in case of success. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc LongRunningRecognize(LongRunningRecognizeRequest) + # returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "LongRunningRecognizeResponse" + # metadata_type: "LongRunningRecognizeMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..fb4d6862eac9 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..b5731a824060 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..8c6b19d52e3d --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..8e7abcf8f052 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..4ac9c4801a3f --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..09acc69b6125 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/Gemfile new file mode 100644 index 000000000000..286415276d75 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-contact_center_insights-v1", path: "../" +else + gem "google-cloud-contact_center_insights-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/bulk_analyze_conversations.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/bulk_analyze_conversations.rb new file mode 100644 index 000000000000..dab2d3897a1d --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/bulk_analyze_conversations.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_BulkAnalyzeConversations_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the bulk_analyze_conversations call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#bulk_analyze_conversations. +# +def bulk_analyze_conversations + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::BulkAnalyzeConversationsRequest.new + + # Call the bulk_analyze_conversations method. + result = client.bulk_analyze_conversations request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_BulkAnalyzeConversations_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/bulk_delete_conversations.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/bulk_delete_conversations.rb new file mode 100644 index 000000000000..7b13cbe76cfb --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/bulk_delete_conversations.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_BulkDeleteConversations_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the bulk_delete_conversations call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#bulk_delete_conversations. +# +def bulk_delete_conversations + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::BulkDeleteConversationsRequest.new + + # Call the bulk_delete_conversations method. + result = client.bulk_delete_conversations request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_BulkDeleteConversations_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/calculate_issue_model_stats.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/calculate_issue_model_stats.rb new file mode 100644 index 000000000000..2e5405791b87 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/calculate_issue_model_stats.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_CalculateIssueModelStats_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the calculate_issue_model_stats call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#calculate_issue_model_stats. +# +def calculate_issue_model_stats + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsRequest.new + + # Call the calculate_issue_model_stats method. + result = client.calculate_issue_model_stats request + + # The returned object is of type Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsResponse. + p result +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_CalculateIssueModelStats_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/calculate_stats.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/calculate_stats.rb new file mode 100644 index 000000000000..eefbbb116461 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/calculate_stats.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_CalculateStats_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the calculate_stats call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#calculate_stats. +# +def calculate_stats + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::CalculateStatsRequest.new + + # Call the calculate_stats method. + result = client.calculate_stats request + + # The returned object is of type Google::Cloud::ContactCenterInsights::V1::CalculateStatsResponse. + p result +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_CalculateStats_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/create_analysis.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/create_analysis.rb new file mode 100644 index 000000000000..ac1522e3a206 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/create_analysis.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_CreateAnalysis_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the create_analysis call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#create_analysis. +# +def create_analysis + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRequest.new + + # Call the create_analysis method. + result = client.create_analysis request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_CreateAnalysis_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/create_conversation.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/create_conversation.rb new file mode 100644 index 000000000000..ddc2f8d74e37 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/create_conversation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_CreateConversation_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the create_conversation call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#create_conversation. +# +def create_conversation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::CreateConversationRequest.new + + # Call the create_conversation method. + result = client.create_conversation request + + # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Conversation. + p result +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_CreateConversation_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/create_issue_model.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/create_issue_model.rb new file mode 100644 index 000000000000..33be585cd586 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/create_issue_model.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_CreateIssueModel_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the create_issue_model call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#create_issue_model. +# +def create_issue_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::CreateIssueModelRequest.new + + # Call the create_issue_model method. + result = client.create_issue_model request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_CreateIssueModel_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/create_phrase_matcher.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/create_phrase_matcher.rb new file mode 100644 index 000000000000..c2a2974b72ac --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/create_phrase_matcher.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_CreatePhraseMatcher_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the create_phrase_matcher call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#create_phrase_matcher. +# +def create_phrase_matcher + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::CreatePhraseMatcherRequest.new + + # Call the create_phrase_matcher method. + result = client.create_phrase_matcher request + + # The returned object is of type Google::Cloud::ContactCenterInsights::V1::PhraseMatcher. + p result +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_CreatePhraseMatcher_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/create_view.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/create_view.rb new file mode 100644 index 000000000000..e4a98ee1de05 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/create_view.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_CreateView_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the create_view call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#create_view. +# +def create_view + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::CreateViewRequest.new + + # Call the create_view method. + result = client.create_view request + + # The returned object is of type Google::Cloud::ContactCenterInsights::V1::View. + p result +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_CreateView_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/delete_analysis.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/delete_analysis.rb new file mode 100644 index 000000000000..1da1a2ed0688 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/delete_analysis.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_DeleteAnalysis_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the delete_analysis call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#delete_analysis. +# +def delete_analysis + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRequest.new + + # Call the delete_analysis method. + result = client.delete_analysis request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_DeleteAnalysis_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/delete_conversation.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/delete_conversation.rb new file mode 100644 index 000000000000..a0e1f5c38192 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/delete_conversation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_DeleteConversation_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the delete_conversation call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#delete_conversation. +# +def delete_conversation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::DeleteConversationRequest.new + + # Call the delete_conversation method. + result = client.delete_conversation request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_DeleteConversation_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/delete_issue.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/delete_issue.rb new file mode 100644 index 000000000000..65a6b9334908 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/delete_issue.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_DeleteIssue_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the delete_issue call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#delete_issue. +# +def delete_issue + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::DeleteIssueRequest.new + + # Call the delete_issue method. + result = client.delete_issue request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_DeleteIssue_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/delete_issue_model.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/delete_issue_model.rb new file mode 100644 index 000000000000..c33850d3a300 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/delete_issue_model.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_DeleteIssueModel_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the delete_issue_model call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#delete_issue_model. +# +def delete_issue_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::DeleteIssueModelRequest.new + + # Call the delete_issue_model method. + result = client.delete_issue_model request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_DeleteIssueModel_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/delete_phrase_matcher.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/delete_phrase_matcher.rb new file mode 100644 index 000000000000..53bdcbf9a2f4 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/delete_phrase_matcher.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_DeletePhraseMatcher_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the delete_phrase_matcher call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#delete_phrase_matcher. +# +def delete_phrase_matcher + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::DeletePhraseMatcherRequest.new + + # Call the delete_phrase_matcher method. + result = client.delete_phrase_matcher request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_DeletePhraseMatcher_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/delete_view.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/delete_view.rb new file mode 100644 index 000000000000..6e92fd1e52c7 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/delete_view.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_DeleteView_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the delete_view call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#delete_view. +# +def delete_view + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::DeleteViewRequest.new + + # Call the delete_view method. + result = client.delete_view request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_DeleteView_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/deploy_issue_model.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/deploy_issue_model.rb new file mode 100644 index 000000000000..b5bbafaaf2f7 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/deploy_issue_model.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_DeployIssueModel_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the deploy_issue_model call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#deploy_issue_model. +# +def deploy_issue_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::DeployIssueModelRequest.new + + # Call the deploy_issue_model method. + result = client.deploy_issue_model request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_DeployIssueModel_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/export_insights_data.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/export_insights_data.rb new file mode 100644 index 000000000000..113f05f29ab8 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/export_insights_data.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_ExportInsightsData_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the export_insights_data call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#export_insights_data. +# +def export_insights_data + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest.new + + # Call the export_insights_data method. + result = client.export_insights_data request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_ExportInsightsData_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/export_issue_model.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/export_issue_model.rb new file mode 100644 index 000000000000..6a1f352f75fd --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/export_issue_model.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_ExportIssueModel_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the export_issue_model call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#export_issue_model. +# +def export_issue_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::ExportIssueModelRequest.new + + # Call the export_issue_model method. + result = client.export_issue_model request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_ExportIssueModel_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/get_analysis.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/get_analysis.rb new file mode 100644 index 000000000000..18522d1da8b7 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/get_analysis.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_GetAnalysis_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the get_analysis call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#get_analysis. +# +def get_analysis + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::GetAnalysisRequest.new + + # Call the get_analysis method. + result = client.get_analysis request + + # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Analysis. + p result +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_GetAnalysis_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/get_conversation.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/get_conversation.rb new file mode 100644 index 000000000000..0fd0133037fb --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/get_conversation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_GetConversation_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the get_conversation call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#get_conversation. +# +def get_conversation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::GetConversationRequest.new + + # Call the get_conversation method. + result = client.get_conversation request + + # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Conversation. + p result +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_GetConversation_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/get_encryption_spec.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/get_encryption_spec.rb new file mode 100644 index 000000000000..8c057117c1a0 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/get_encryption_spec.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_GetEncryptionSpec_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the get_encryption_spec call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#get_encryption_spec. +# +def get_encryption_spec + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::GetEncryptionSpecRequest.new + + # Call the get_encryption_spec method. + result = client.get_encryption_spec request + + # The returned object is of type Google::Cloud::ContactCenterInsights::V1::EncryptionSpec. + p result +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_GetEncryptionSpec_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/get_issue.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/get_issue.rb new file mode 100644 index 000000000000..6756cf202285 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/get_issue.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_GetIssue_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the get_issue call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#get_issue. +# +def get_issue + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::GetIssueRequest.new + + # Call the get_issue method. + result = client.get_issue request + + # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Issue. + p result +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_GetIssue_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/get_issue_model.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/get_issue_model.rb new file mode 100644 index 000000000000..a09f3da5cc83 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/get_issue_model.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_GetIssueModel_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the get_issue_model call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#get_issue_model. +# +def get_issue_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::GetIssueModelRequest.new + + # Call the get_issue_model method. + result = client.get_issue_model request + + # The returned object is of type Google::Cloud::ContactCenterInsights::V1::IssueModel. + p result +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_GetIssueModel_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/get_phrase_matcher.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/get_phrase_matcher.rb new file mode 100644 index 000000000000..678cbc41a81a --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/get_phrase_matcher.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_GetPhraseMatcher_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the get_phrase_matcher call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#get_phrase_matcher. +# +def get_phrase_matcher + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::GetPhraseMatcherRequest.new + + # Call the get_phrase_matcher method. + result = client.get_phrase_matcher request + + # The returned object is of type Google::Cloud::ContactCenterInsights::V1::PhraseMatcher. + p result +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_GetPhraseMatcher_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/get_settings.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/get_settings.rb new file mode 100644 index 000000000000..85ece256b52a --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/get_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_GetSettings_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the get_settings call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#get_settings. +# +def get_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::GetSettingsRequest.new + + # Call the get_settings method. + result = client.get_settings request + + # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Settings. + p result +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_GetSettings_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/get_view.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/get_view.rb new file mode 100644 index 000000000000..3a1e9e80b2ca --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/get_view.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_GetView_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the get_view call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#get_view. +# +def get_view + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::GetViewRequest.new + + # Call the get_view method. + result = client.get_view request + + # The returned object is of type Google::Cloud::ContactCenterInsights::V1::View. + p result +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_GetView_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/import_issue_model.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/import_issue_model.rb new file mode 100644 index 000000000000..bc5d26de885d --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/import_issue_model.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_ImportIssueModel_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the import_issue_model call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#import_issue_model. +# +def import_issue_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::ImportIssueModelRequest.new + + # Call the import_issue_model method. + result = client.import_issue_model request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_ImportIssueModel_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/ingest_conversations.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/ingest_conversations.rb new file mode 100644 index 000000000000..3710767e67a4 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/ingest_conversations.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_IngestConversations_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the ingest_conversations call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#ingest_conversations. +# +def ingest_conversations + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest.new + + # Call the ingest_conversations method. + result = client.ingest_conversations request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_IngestConversations_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/initialize_encryption_spec.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/initialize_encryption_spec.rb new file mode 100644 index 000000000000..9473461b9748 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/initialize_encryption_spec.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_InitializeEncryptionSpec_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the initialize_encryption_spec call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#initialize_encryption_spec. +# +def initialize_encryption_spec + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::InitializeEncryptionSpecRequest.new + + # Call the initialize_encryption_spec method. + result = client.initialize_encryption_spec request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_InitializeEncryptionSpec_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/list_analyses.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/list_analyses.rb new file mode 100644 index 000000000000..5e35eff9e810 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/list_analyses.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_ListAnalyses_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the list_analyses call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#list_analyses. +# +def list_analyses + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::ListAnalysesRequest.new + + # Call the list_analyses method. + result = client.list_analyses request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ContactCenterInsights::V1::Analysis. + p item + end +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_ListAnalyses_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/list_conversations.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/list_conversations.rb new file mode 100644 index 000000000000..8468f78b0dbf --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/list_conversations.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_ListConversations_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the list_conversations call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#list_conversations. +# +def list_conversations + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::ListConversationsRequest.new + + # Call the list_conversations method. + result = client.list_conversations request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ContactCenterInsights::V1::Conversation. + p item + end +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_ListConversations_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/list_issue_models.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/list_issue_models.rb new file mode 100644 index 000000000000..665cb085020b --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/list_issue_models.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_ListIssueModels_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the list_issue_models call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#list_issue_models. +# +def list_issue_models + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::ListIssueModelsRequest.new + + # Call the list_issue_models method. + result = client.list_issue_models request + + # The returned object is of type Google::Cloud::ContactCenterInsights::V1::ListIssueModelsResponse. + p result +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_ListIssueModels_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/list_issues.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/list_issues.rb new file mode 100644 index 000000000000..d6481a5ba2c7 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/list_issues.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_ListIssues_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the list_issues call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#list_issues. +# +def list_issues + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::ListIssuesRequest.new + + # Call the list_issues method. + result = client.list_issues request + + # The returned object is of type Google::Cloud::ContactCenterInsights::V1::ListIssuesResponse. + p result +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_ListIssues_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/list_phrase_matchers.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/list_phrase_matchers.rb new file mode 100644 index 000000000000..ede67a8240d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/list_phrase_matchers.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_ListPhraseMatchers_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the list_phrase_matchers call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#list_phrase_matchers. +# +def list_phrase_matchers + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersRequest.new + + # Call the list_phrase_matchers method. + result = client.list_phrase_matchers request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher. + p item + end +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_ListPhraseMatchers_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/list_views.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/list_views.rb new file mode 100644 index 000000000000..7e5dac72d88d --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/list_views.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_ListViews_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the list_views call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#list_views. +# +def list_views + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::ListViewsRequest.new + + # Call the list_views method. + result = client.list_views request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::ContactCenterInsights::V1::View. + p item + end +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_ListViews_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/undeploy_issue_model.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/undeploy_issue_model.rb new file mode 100644 index 000000000000..7b6f240ef91d --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/undeploy_issue_model.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_UndeployIssueModel_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the undeploy_issue_model call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#undeploy_issue_model. +# +def undeploy_issue_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::UndeployIssueModelRequest.new + + # Call the undeploy_issue_model method. + result = client.undeploy_issue_model request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_UndeployIssueModel_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/update_conversation.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/update_conversation.rb new file mode 100644 index 000000000000..c400fa60eec9 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/update_conversation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_UpdateConversation_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the update_conversation call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#update_conversation. +# +def update_conversation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::UpdateConversationRequest.new + + # Call the update_conversation method. + result = client.update_conversation request + + # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Conversation. + p result +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_UpdateConversation_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/update_issue.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/update_issue.rb new file mode 100644 index 000000000000..b6c16eab7dd5 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/update_issue.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_UpdateIssue_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the update_issue call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#update_issue. +# +def update_issue + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::UpdateIssueRequest.new + + # Call the update_issue method. + result = client.update_issue request + + # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Issue. + p result +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_UpdateIssue_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/update_issue_model.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/update_issue_model.rb new file mode 100644 index 000000000000..62aa030adbd1 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/update_issue_model.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_UpdateIssueModel_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the update_issue_model call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#update_issue_model. +# +def update_issue_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::UpdateIssueModelRequest.new + + # Call the update_issue_model method. + result = client.update_issue_model request + + # The returned object is of type Google::Cloud::ContactCenterInsights::V1::IssueModel. + p result +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_UpdateIssueModel_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/update_phrase_matcher.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/update_phrase_matcher.rb new file mode 100644 index 000000000000..0db2511dab4e --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/update_phrase_matcher.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_UpdatePhraseMatcher_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the update_phrase_matcher call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#update_phrase_matcher. +# +def update_phrase_matcher + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::UpdatePhraseMatcherRequest.new + + # Call the update_phrase_matcher method. + result = client.update_phrase_matcher request + + # The returned object is of type Google::Cloud::ContactCenterInsights::V1::PhraseMatcher. + p result +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_UpdatePhraseMatcher_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/update_settings.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/update_settings.rb new file mode 100644 index 000000000000..d6a2a5cd4235 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/update_settings.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_UpdateSettings_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the update_settings call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#update_settings. +# +def update_settings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::UpdateSettingsRequest.new + + # Call the update_settings method. + result = client.update_settings request + + # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Settings. + p result +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_UpdateSettings_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/update_view.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/update_view.rb new file mode 100644 index 000000000000..c0f415a5b32b --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/update_view.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_UpdateView_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the update_view call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#update_view. +# +def update_view + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::UpdateViewRequest.new + + # Call the update_view method. + result = client.update_view request + + # The returned object is of type Google::Cloud::ContactCenterInsights::V1::View. + p result +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_UpdateView_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/upload_conversation.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/upload_conversation.rb new file mode 100644 index 000000000000..a2e36e122d98 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/contact_center_insights/upload_conversation.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START contactcenterinsights_v1_generated_ContactCenterInsights_UploadConversation_sync] +require "google/cloud/contact_center_insights/v1" + +## +# Snippet for the upload_conversation call in the ContactCenterInsights service +# +# 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. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#upload_conversation. +# +def upload_conversation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ContactCenterInsights::V1::UploadConversationRequest.new + + # Call the upload_conversation method. + result = client.upload_conversation request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END contactcenterinsights_v1_generated_ContactCenterInsights_UploadConversation_sync] diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/snippet_metadata_google.cloud.contactcenterinsights.v1.json b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/snippet_metadata_google.cloud.contactcenterinsights.v1.json new file mode 100644 index 000000000000..eb17cbabe6e8 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/snippets/snippet_metadata_google.cloud.contactcenterinsights.v1.json @@ -0,0 +1,1735 @@ +{ + "client_library": { + "name": "google-cloud-contact_center_insights-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.contactcenterinsights.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_CreateConversation_sync", + "title": "Snippet for the create_conversation call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#create_conversation.", + "file": "contact_center_insights/create_conversation.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_conversation", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#create_conversation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::CreateConversationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ContactCenterInsights::V1::Conversation", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "CreateConversation", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateConversation", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_UploadConversation_sync", + "title": "Snippet for the upload_conversation call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#upload_conversation.", + "file": "contact_center_insights/upload_conversation.rb", + "language": "RUBY", + "client_method": { + "short_name": "upload_conversation", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#upload_conversation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::UploadConversationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "UploadConversation", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.UploadConversation", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_UpdateConversation_sync", + "title": "Snippet for the update_conversation call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#update_conversation.", + "file": "contact_center_insights/update_conversation.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_conversation", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#update_conversation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::UpdateConversationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ContactCenterInsights::V1::Conversation", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "UpdateConversation", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateConversation", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_GetConversation_sync", + "title": "Snippet for the get_conversation call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#get_conversation.", + "file": "contact_center_insights/get_conversation.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_conversation", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#get_conversation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::GetConversationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ContactCenterInsights::V1::Conversation", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "GetConversation", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetConversation", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_ListConversations_sync", + "title": "Snippet for the list_conversations call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#list_conversations.", + "file": "contact_center_insights/list_conversations.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_conversations", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#list_conversations", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::ListConversationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ContactCenterInsights::V1::ListConversationsResponse", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "ListConversations", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListConversations", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_DeleteConversation_sync", + "title": "Snippet for the delete_conversation call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#delete_conversation.", + "file": "contact_center_insights/delete_conversation.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_conversation", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#delete_conversation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::DeleteConversationRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "DeleteConversation", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteConversation", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_CreateAnalysis_sync", + "title": "Snippet for the create_analysis call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#create_analysis.", + "file": "contact_center_insights/create_analysis.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_analysis", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#create_analysis", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "CreateAnalysis", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateAnalysis", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_GetAnalysis_sync", + "title": "Snippet for the get_analysis call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#get_analysis.", + "file": "contact_center_insights/get_analysis.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_analysis", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#get_analysis", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::GetAnalysisRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ContactCenterInsights::V1::Analysis", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "GetAnalysis", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetAnalysis", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_ListAnalyses_sync", + "title": "Snippet for the list_analyses call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#list_analyses.", + "file": "contact_center_insights/list_analyses.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_analyses", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#list_analyses", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::ListAnalysesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ContactCenterInsights::V1::ListAnalysesResponse", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "ListAnalyses", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListAnalyses", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_DeleteAnalysis_sync", + "title": "Snippet for the delete_analysis call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#delete_analysis.", + "file": "contact_center_insights/delete_analysis.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_analysis", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#delete_analysis", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "DeleteAnalysis", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteAnalysis", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_BulkAnalyzeConversations_sync", + "title": "Snippet for the bulk_analyze_conversations call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#bulk_analyze_conversations.", + "file": "contact_center_insights/bulk_analyze_conversations.rb", + "language": "RUBY", + "client_method": { + "short_name": "bulk_analyze_conversations", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#bulk_analyze_conversations", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::BulkAnalyzeConversationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "BulkAnalyzeConversations", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.BulkAnalyzeConversations", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_BulkDeleteConversations_sync", + "title": "Snippet for the bulk_delete_conversations call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#bulk_delete_conversations.", + "file": "contact_center_insights/bulk_delete_conversations.rb", + "language": "RUBY", + "client_method": { + "short_name": "bulk_delete_conversations", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#bulk_delete_conversations", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::BulkDeleteConversationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "BulkDeleteConversations", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.BulkDeleteConversations", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_IngestConversations_sync", + "title": "Snippet for the ingest_conversations call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#ingest_conversations.", + "file": "contact_center_insights/ingest_conversations.rb", + "language": "RUBY", + "client_method": { + "short_name": "ingest_conversations", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#ingest_conversations", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "IngestConversations", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.IngestConversations", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_ExportInsightsData_sync", + "title": "Snippet for the export_insights_data call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#export_insights_data.", + "file": "contact_center_insights/export_insights_data.rb", + "language": "RUBY", + "client_method": { + "short_name": "export_insights_data", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#export_insights_data", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "ExportInsightsData", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ExportInsightsData", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_CreateIssueModel_sync", + "title": "Snippet for the create_issue_model call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#create_issue_model.", + "file": "contact_center_insights/create_issue_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_issue_model", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#create_issue_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::CreateIssueModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "CreateIssueModel", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateIssueModel", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_UpdateIssueModel_sync", + "title": "Snippet for the update_issue_model call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#update_issue_model.", + "file": "contact_center_insights/update_issue_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_issue_model", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#update_issue_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::UpdateIssueModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ContactCenterInsights::V1::IssueModel", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "UpdateIssueModel", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateIssueModel", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_GetIssueModel_sync", + "title": "Snippet for the get_issue_model call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#get_issue_model.", + "file": "contact_center_insights/get_issue_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_issue_model", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#get_issue_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::GetIssueModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ContactCenterInsights::V1::IssueModel", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "GetIssueModel", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetIssueModel", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_ListIssueModels_sync", + "title": "Snippet for the list_issue_models call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#list_issue_models.", + "file": "contact_center_insights/list_issue_models.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_issue_models", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#list_issue_models", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsResponse", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "ListIssueModels", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListIssueModels", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_DeleteIssueModel_sync", + "title": "Snippet for the delete_issue_model call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#delete_issue_model.", + "file": "contact_center_insights/delete_issue_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_issue_model", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#delete_issue_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::DeleteIssueModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "DeleteIssueModel", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteIssueModel", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_DeployIssueModel_sync", + "title": "Snippet for the deploy_issue_model call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#deploy_issue_model.", + "file": "contact_center_insights/deploy_issue_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "deploy_issue_model", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#deploy_issue_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::DeployIssueModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "DeployIssueModel", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeployIssueModel", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_UndeployIssueModel_sync", + "title": "Snippet for the undeploy_issue_model call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#undeploy_issue_model.", + "file": "contact_center_insights/undeploy_issue_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "undeploy_issue_model", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#undeploy_issue_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::UndeployIssueModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "UndeployIssueModel", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.UndeployIssueModel", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_ExportIssueModel_sync", + "title": "Snippet for the export_issue_model call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#export_issue_model.", + "file": "contact_center_insights/export_issue_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "export_issue_model", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#export_issue_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::ExportIssueModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "ExportIssueModel", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ExportIssueModel", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_ImportIssueModel_sync", + "title": "Snippet for the import_issue_model call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#import_issue_model.", + "file": "contact_center_insights/import_issue_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "import_issue_model", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#import_issue_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::ImportIssueModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "ImportIssueModel", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ImportIssueModel", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_GetIssue_sync", + "title": "Snippet for the get_issue call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#get_issue.", + "file": "contact_center_insights/get_issue.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_issue", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#get_issue", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::GetIssueRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ContactCenterInsights::V1::Issue", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "GetIssue", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetIssue", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_ListIssues_sync", + "title": "Snippet for the list_issues call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#list_issues.", + "file": "contact_center_insights/list_issues.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_issues", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#list_issues", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::ListIssuesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ContactCenterInsights::V1::ListIssuesResponse", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "ListIssues", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListIssues", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_UpdateIssue_sync", + "title": "Snippet for the update_issue call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#update_issue.", + "file": "contact_center_insights/update_issue.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_issue", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#update_issue", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::UpdateIssueRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ContactCenterInsights::V1::Issue", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "UpdateIssue", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateIssue", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_DeleteIssue_sync", + "title": "Snippet for the delete_issue call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#delete_issue.", + "file": "contact_center_insights/delete_issue.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_issue", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#delete_issue", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::DeleteIssueRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "DeleteIssue", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteIssue", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_CalculateIssueModelStats_sync", + "title": "Snippet for the calculate_issue_model_stats call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#calculate_issue_model_stats.", + "file": "contact_center_insights/calculate_issue_model_stats.rb", + "language": "RUBY", + "client_method": { + "short_name": "calculate_issue_model_stats", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#calculate_issue_model_stats", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsResponse", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "CalculateIssueModelStats", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.CalculateIssueModelStats", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_CreatePhraseMatcher_sync", + "title": "Snippet for the create_phrase_matcher call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#create_phrase_matcher.", + "file": "contact_center_insights/create_phrase_matcher.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_phrase_matcher", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#create_phrase_matcher", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::CreatePhraseMatcherRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "CreatePhraseMatcher", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreatePhraseMatcher", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_GetPhraseMatcher_sync", + "title": "Snippet for the get_phrase_matcher call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#get_phrase_matcher.", + "file": "contact_center_insights/get_phrase_matcher.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_phrase_matcher", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#get_phrase_matcher", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::GetPhraseMatcherRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "GetPhraseMatcher", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetPhraseMatcher", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_ListPhraseMatchers_sync", + "title": "Snippet for the list_phrase_matchers call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#list_phrase_matchers.", + "file": "contact_center_insights/list_phrase_matchers.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_phrase_matchers", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#list_phrase_matchers", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersResponse", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "ListPhraseMatchers", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListPhraseMatchers", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_DeletePhraseMatcher_sync", + "title": "Snippet for the delete_phrase_matcher call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#delete_phrase_matcher.", + "file": "contact_center_insights/delete_phrase_matcher.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_phrase_matcher", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#delete_phrase_matcher", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::DeletePhraseMatcherRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "DeletePhraseMatcher", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeletePhraseMatcher", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_UpdatePhraseMatcher_sync", + "title": "Snippet for the update_phrase_matcher call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#update_phrase_matcher.", + "file": "contact_center_insights/update_phrase_matcher.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_phrase_matcher", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#update_phrase_matcher", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::UpdatePhraseMatcherRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "UpdatePhraseMatcher", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdatePhraseMatcher", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_CalculateStats_sync", + "title": "Snippet for the calculate_stats call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#calculate_stats.", + "file": "contact_center_insights/calculate_stats.rb", + "language": "RUBY", + "client_method": { + "short_name": "calculate_stats", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#calculate_stats", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::CalculateStatsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ContactCenterInsights::V1::CalculateStatsResponse", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "CalculateStats", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.CalculateStats", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_GetSettings_sync", + "title": "Snippet for the get_settings call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#get_settings.", + "file": "contact_center_insights/get_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_settings", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#get_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::GetSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ContactCenterInsights::V1::Settings", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "GetSettings", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetSettings", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_UpdateSettings_sync", + "title": "Snippet for the update_settings call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#update_settings.", + "file": "contact_center_insights/update_settings.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_settings", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#update_settings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::UpdateSettingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ContactCenterInsights::V1::Settings", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "UpdateSettings", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateSettings", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_GetEncryptionSpec_sync", + "title": "Snippet for the get_encryption_spec call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#get_encryption_spec.", + "file": "contact_center_insights/get_encryption_spec.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_encryption_spec", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#get_encryption_spec", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::GetEncryptionSpecRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ContactCenterInsights::V1::EncryptionSpec", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "GetEncryptionSpec", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetEncryptionSpec", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_InitializeEncryptionSpec_sync", + "title": "Snippet for the initialize_encryption_spec call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#initialize_encryption_spec.", + "file": "contact_center_insights/initialize_encryption_spec.rb", + "language": "RUBY", + "client_method": { + "short_name": "initialize_encryption_spec", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#initialize_encryption_spec", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::InitializeEncryptionSpecRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "InitializeEncryptionSpec", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.InitializeEncryptionSpec", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_CreateView_sync", + "title": "Snippet for the create_view call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#create_view.", + "file": "contact_center_insights/create_view.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_view", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#create_view", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::CreateViewRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ContactCenterInsights::V1::View", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "CreateView", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.CreateView", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_GetView_sync", + "title": "Snippet for the get_view call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#get_view.", + "file": "contact_center_insights/get_view.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_view", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#get_view", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::GetViewRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ContactCenterInsights::V1::View", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "GetView", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetView", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_ListViews_sync", + "title": "Snippet for the list_views call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#list_views.", + "file": "contact_center_insights/list_views.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_views", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#list_views", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::ListViewsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ContactCenterInsights::V1::ListViewsResponse", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "ListViews", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ListViews", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_UpdateView_sync", + "title": "Snippet for the update_view call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#update_view.", + "file": "contact_center_insights/update_view.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_view", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#update_view", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::UpdateViewRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ContactCenterInsights::V1::View", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "UpdateView", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.UpdateView", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "contactcenterinsights_v1_generated_ContactCenterInsights_DeleteView_sync", + "title": "Snippet for the delete_view call in the ContactCenterInsights service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#delete_view.", + "file": "contact_center_insights/delete_view.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_view", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client#delete_view", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ContactCenterInsights::V1::DeleteViewRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ContactCenterInsights::Client", + "full_name": "::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client" + }, + "method": { + "short_name": "DeleteView", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteView", + "service": { + "short_name": "ContactCenterInsights", + "full_name": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/test/google/cloud/contact_center_insights/v1/contact_center_insights_operations_test.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/test/google/cloud/contact_center_insights/v1/contact_center_insights_operations_test.rb new file mode 100644 index 000000000000..7ae90dc98892 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/test/google/cloud/contact_center_insights/v1/contact_center_insights_operations_test.rb @@ -0,0 +1,389 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/contactcenterinsights/v1/contact_center_insights_pb" +require "google/cloud/contactcenterinsights/v1/contact_center_insights_services_pb" +require "google/cloud/contact_center_insights/v1/contact_center_insights" + +class ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + yield @response, @operation if block_given? + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/test/google/cloud/contact_center_insights/v1/contact_center_insights_paths_test.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/test/google/cloud/contact_center_insights/v1/contact_center_insights_paths_test.rb new file mode 100644 index 000000000000..f5d69622b887 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/test/google/cloud/contact_center_insights/v1/contact_center_insights_paths_test.rb @@ -0,0 +1,182 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/contact_center_insights/v1/contact_center_insights" + +class ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_analysis_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.analysis_path project: "value0", location: "value1", conversation: "value2", analysis: "value3" + assert_equal "projects/value0/locations/value1/conversations/value2/analyses/value3", path + end + end + + def test_conversation_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.conversation_path project: "value0", location: "value1", conversation: "value2" + assert_equal "projects/value0/locations/value1/conversations/value2", path + end + end + + def test_conversation_profile_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.conversation_profile_path project: "value0", location: "value1", conversation_profile: "value2" + assert_equal "projects/value0/locations/value1/conversationProfiles/value2", path + end + end + + def test_encryption_spec_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.encryption_spec_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1/encryptionSpec", path + end + end + + def test_issue_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.issue_path project: "value0", location: "value1", issue_model: "value2", issue: "value3" + assert_equal "projects/value0/locations/value1/issueModels/value2/issues/value3", path + end + end + + def test_issue_model_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.issue_model_path project: "value0", location: "value1", issue_model: "value2" + assert_equal "projects/value0/locations/value1/issueModels/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_participant_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.participant_path project: "value0", conversation: "value1", participant: "value2" + assert_equal "projects/value0/conversations/value1/participants/value2", path + + path = client.participant_path project: "value0", location: "value1", conversation: "value2", participant: "value3" + assert_equal "projects/value0/locations/value1/conversations/value2/participants/value3", path + end + end + + def test_phrase_matcher_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.phrase_matcher_path project: "value0", location: "value1", phrase_matcher: "value2" + assert_equal "projects/value0/locations/value1/phraseMatchers/value2", path + end + end + + def test_recognizer_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.recognizer_path project: "value0", location: "value1", recognizer: "value2" + assert_equal "projects/value0/locations/value1/recognizers/value2", path + end + end + + def test_settings_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.settings_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1/settings", path + end + end + + def test_view_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.view_path project: "value0", location: "value1", view: "value2" + assert_equal "projects/value0/locations/value1/views/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/test/google/cloud/contact_center_insights/v1/contact_center_insights_rest_test.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/test/google/cloud/contact_center_insights/v1/contact_center_insights_rest_test.rb new file mode 100644 index 000000000000..1e13aca3332f --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/test/google/cloud/contact_center_insights/v1/contact_center_insights_rest_test.rb @@ -0,0 +1,2464 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/contactcenterinsights/v1/contact_center_insights_pb" +require "google/cloud/contact_center_insights/v1/contact_center_insights/rest" + + +class ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {} + make_http_request :get, uri: uri, body: nil, params: params, options: options + end + + def make_delete_request uri:, params: {}, options: {} + make_http_request :delete, uri: uri, body: nil, params: params, options: options + end + + def make_post_request uri:, body: nil, params: {}, options: {} + make_http_request :post, uri: uri, body: body, params: params, options: options + end + + def make_patch_request uri:, body:, params: {}, options: {} + make_http_request :patch, uri: uri, body: body, params: params, options: options + end + + def make_put_request uri:, body:, params: {}, options: {} + make_http_request :put, uri: uri, body: body, params: params, options: options + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_create_conversation + # Create test objects. + client_result = ::Google::Cloud::ContactCenterInsights::V1::Conversation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + conversation = {} + conversation_id = "hello world" + + create_conversation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_create_conversation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_conversation_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_conversation({ parent: parent, conversation: conversation, conversation_id: conversation_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_conversation parent: parent, conversation: conversation, conversation_id: conversation_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_conversation ::Google::Cloud::ContactCenterInsights::V1::CreateConversationRequest.new(parent: parent, conversation: conversation, conversation_id: conversation_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_conversation({ parent: parent, conversation: conversation, conversation_id: conversation_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_conversation(::Google::Cloud::ContactCenterInsights::V1::CreateConversationRequest.new(parent: parent, conversation: conversation, conversation_id: conversation_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_conversation_client_stub.call_count + end + end + end + + def test_upload_conversation + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + conversation = {} + conversation_id = "hello world" + redaction_config = {} + speech_config = {} + + upload_conversation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_upload_conversation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, upload_conversation_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.upload_conversation({ parent: parent, conversation: conversation, conversation_id: conversation_id, redaction_config: redaction_config, speech_config: speech_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.upload_conversation parent: parent, conversation: conversation, conversation_id: conversation_id, redaction_config: redaction_config, speech_config: speech_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.upload_conversation ::Google::Cloud::ContactCenterInsights::V1::UploadConversationRequest.new(parent: parent, conversation: conversation, conversation_id: conversation_id, redaction_config: redaction_config, speech_config: speech_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.upload_conversation({ parent: parent, conversation: conversation, conversation_id: conversation_id, redaction_config: redaction_config, speech_config: speech_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.upload_conversation(::Google::Cloud::ContactCenterInsights::V1::UploadConversationRequest.new(parent: parent, conversation: conversation, conversation_id: conversation_id, redaction_config: redaction_config, speech_config: speech_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, upload_conversation_client_stub.call_count + end + end + end + + def test_update_conversation + # Create test objects. + client_result = ::Google::Cloud::ContactCenterInsights::V1::Conversation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + conversation = {} + update_mask = {} + + update_conversation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_update_conversation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_conversation_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_conversation({ conversation: conversation, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_conversation conversation: conversation, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_conversation ::Google::Cloud::ContactCenterInsights::V1::UpdateConversationRequest.new(conversation: conversation, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_conversation({ conversation: conversation, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_conversation(::Google::Cloud::ContactCenterInsights::V1::UpdateConversationRequest.new(conversation: conversation, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_conversation_client_stub.call_count + end + end + end + + def test_get_conversation + # Create test objects. + client_result = ::Google::Cloud::ContactCenterInsights::V1::Conversation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :CONVERSATION_VIEW_UNSPECIFIED + + get_conversation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_get_conversation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_conversation_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_conversation({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_conversation name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_conversation ::Google::Cloud::ContactCenterInsights::V1::GetConversationRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_conversation({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_conversation(::Google::Cloud::ContactCenterInsights::V1::GetConversationRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_conversation_client_stub.call_count + end + end + end + + def test_list_conversations + # Create test objects. + client_result = ::Google::Cloud::ContactCenterInsights::V1::ListConversationsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + view = :CONVERSATION_VIEW_UNSPECIFIED + + list_conversations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_list_conversations_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_conversations_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_conversations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_conversations parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_conversations ::Google::Cloud::ContactCenterInsights::V1::ListConversationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_conversations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_conversations(::Google::Cloud::ContactCenterInsights::V1::ListConversationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_conversations_client_stub.call_count + end + end + end + + def test_delete_conversation + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + + delete_conversation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_delete_conversation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_conversation_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_conversation({ name: name, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_conversation name: name, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_conversation ::Google::Cloud::ContactCenterInsights::V1::DeleteConversationRequest.new(name: name, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_conversation({ name: name, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_conversation(::Google::Cloud::ContactCenterInsights::V1::DeleteConversationRequest.new(name: name, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_conversation_client_stub.call_count + end + end + end + + def test_create_analysis + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + analysis = {} + + create_analysis_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_create_analysis_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_analysis_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_analysis({ parent: parent, analysis: analysis }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_analysis parent: parent, analysis: analysis do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_analysis ::Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRequest.new(parent: parent, analysis: analysis) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_analysis({ parent: parent, analysis: analysis }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_analysis(::Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRequest.new(parent: parent, analysis: analysis), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_analysis_client_stub.call_count + end + end + end + + def test_get_analysis + # Create test objects. + client_result = ::Google::Cloud::ContactCenterInsights::V1::Analysis.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_analysis_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_get_analysis_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_analysis_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_analysis({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_analysis name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_analysis ::Google::Cloud::ContactCenterInsights::V1::GetAnalysisRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_analysis({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_analysis(::Google::Cloud::ContactCenterInsights::V1::GetAnalysisRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_analysis_client_stub.call_count + end + end + end + + def test_list_analyses + # Create test objects. + client_result = ::Google::Cloud::ContactCenterInsights::V1::ListAnalysesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_analyses_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_list_analyses_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_analyses_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_analyses({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_analyses parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_analyses ::Google::Cloud::ContactCenterInsights::V1::ListAnalysesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_analyses({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_analyses(::Google::Cloud::ContactCenterInsights::V1::ListAnalysesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_analyses_client_stub.call_count + end + end + end + + def test_delete_analysis + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_analysis_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_delete_analysis_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_analysis_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_analysis({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_analysis name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_analysis ::Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_analysis({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_analysis(::Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_analysis_client_stub.call_count + end + end + end + + def test_bulk_analyze_conversations + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + analysis_percentage = 3.5 + annotator_selector = {} + + bulk_analyze_conversations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_bulk_analyze_conversations_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, bulk_analyze_conversations_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.bulk_analyze_conversations({ parent: parent, filter: filter, analysis_percentage: analysis_percentage, annotator_selector: annotator_selector }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.bulk_analyze_conversations parent: parent, filter: filter, analysis_percentage: analysis_percentage, annotator_selector: annotator_selector do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.bulk_analyze_conversations ::Google::Cloud::ContactCenterInsights::V1::BulkAnalyzeConversationsRequest.new(parent: parent, filter: filter, analysis_percentage: analysis_percentage, annotator_selector: annotator_selector) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.bulk_analyze_conversations({ parent: parent, filter: filter, analysis_percentage: analysis_percentage, annotator_selector: annotator_selector }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.bulk_analyze_conversations(::Google::Cloud::ContactCenterInsights::V1::BulkAnalyzeConversationsRequest.new(parent: parent, filter: filter, analysis_percentage: analysis_percentage, annotator_selector: annotator_selector), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, bulk_analyze_conversations_client_stub.call_count + end + end + end + + def test_bulk_delete_conversations + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + max_delete_count = 42 + force = true + + bulk_delete_conversations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_bulk_delete_conversations_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, bulk_delete_conversations_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.bulk_delete_conversations({ parent: parent, filter: filter, max_delete_count: max_delete_count, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.bulk_delete_conversations parent: parent, filter: filter, max_delete_count: max_delete_count, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.bulk_delete_conversations ::Google::Cloud::ContactCenterInsights::V1::BulkDeleteConversationsRequest.new(parent: parent, filter: filter, max_delete_count: max_delete_count, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.bulk_delete_conversations({ parent: parent, filter: filter, max_delete_count: max_delete_count, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.bulk_delete_conversations(::Google::Cloud::ContactCenterInsights::V1::BulkDeleteConversationsRequest.new(parent: parent, filter: filter, max_delete_count: max_delete_count, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, bulk_delete_conversations_client_stub.call_count + end + end + end + + def test_ingest_conversations + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + gcs_source = {} + transcript_object_config = {} + parent = "hello world" + conversation_config = {} + redaction_config = {} + speech_config = {} + sample_size = 42 + + ingest_conversations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_ingest_conversations_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, ingest_conversations_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.ingest_conversations({ gcs_source: gcs_source, transcript_object_config: transcript_object_config, parent: parent, conversation_config: conversation_config, redaction_config: redaction_config, speech_config: speech_config, sample_size: sample_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.ingest_conversations gcs_source: gcs_source, transcript_object_config: transcript_object_config, parent: parent, conversation_config: conversation_config, redaction_config: redaction_config, speech_config: speech_config, sample_size: sample_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.ingest_conversations ::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest.new(gcs_source: gcs_source, transcript_object_config: transcript_object_config, parent: parent, conversation_config: conversation_config, redaction_config: redaction_config, speech_config: speech_config, sample_size: sample_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.ingest_conversations({ gcs_source: gcs_source, transcript_object_config: transcript_object_config, parent: parent, conversation_config: conversation_config, redaction_config: redaction_config, speech_config: speech_config, sample_size: sample_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.ingest_conversations(::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest.new(gcs_source: gcs_source, transcript_object_config: transcript_object_config, parent: parent, conversation_config: conversation_config, redaction_config: redaction_config, speech_config: speech_config, sample_size: sample_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, ingest_conversations_client_stub.call_count + end + end + end + + def test_export_insights_data + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + big_query_destination = {} + parent = "hello world" + filter = "hello world" + kms_key = "hello world" + write_disposition = :WRITE_DISPOSITION_UNSPECIFIED + + export_insights_data_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_export_insights_data_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, export_insights_data_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.export_insights_data({ big_query_destination: big_query_destination, parent: parent, filter: filter, kms_key: kms_key, write_disposition: write_disposition }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.export_insights_data big_query_destination: big_query_destination, parent: parent, filter: filter, kms_key: kms_key, write_disposition: write_disposition do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.export_insights_data ::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest.new(big_query_destination: big_query_destination, parent: parent, filter: filter, kms_key: kms_key, write_disposition: write_disposition) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.export_insights_data({ big_query_destination: big_query_destination, parent: parent, filter: filter, kms_key: kms_key, write_disposition: write_disposition }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.export_insights_data(::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest.new(big_query_destination: big_query_destination, parent: parent, filter: filter, kms_key: kms_key, write_disposition: write_disposition), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, export_insights_data_client_stub.call_count + end + end + end + + def test_create_issue_model + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + issue_model = {} + + create_issue_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_create_issue_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_issue_model_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_issue_model({ parent: parent, issue_model: issue_model }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_issue_model parent: parent, issue_model: issue_model do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_issue_model ::Google::Cloud::ContactCenterInsights::V1::CreateIssueModelRequest.new(parent: parent, issue_model: issue_model) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_issue_model({ parent: parent, issue_model: issue_model }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_issue_model(::Google::Cloud::ContactCenterInsights::V1::CreateIssueModelRequest.new(parent: parent, issue_model: issue_model), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_issue_model_client_stub.call_count + end + end + end + + def test_update_issue_model + # Create test objects. + client_result = ::Google::Cloud::ContactCenterInsights::V1::IssueModel.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + issue_model = {} + update_mask = {} + + update_issue_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_update_issue_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_issue_model_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_issue_model({ issue_model: issue_model, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_issue_model issue_model: issue_model, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_issue_model ::Google::Cloud::ContactCenterInsights::V1::UpdateIssueModelRequest.new(issue_model: issue_model, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_issue_model({ issue_model: issue_model, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_issue_model(::Google::Cloud::ContactCenterInsights::V1::UpdateIssueModelRequest.new(issue_model: issue_model, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_issue_model_client_stub.call_count + end + end + end + + def test_get_issue_model + # Create test objects. + client_result = ::Google::Cloud::ContactCenterInsights::V1::IssueModel.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_issue_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_get_issue_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_issue_model_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_issue_model({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_issue_model name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_issue_model ::Google::Cloud::ContactCenterInsights::V1::GetIssueModelRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_issue_model({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_issue_model(::Google::Cloud::ContactCenterInsights::V1::GetIssueModelRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_issue_model_client_stub.call_count + end + end + end + + def test_list_issue_models + # Create test objects. + client_result = ::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + + list_issue_models_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_list_issue_models_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_issue_models_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_issue_models({ parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_issue_models parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_issue_models ::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsRequest.new(parent: parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_issue_models({ parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_issue_models(::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsRequest.new(parent: parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_issue_models_client_stub.call_count + end + end + end + + def test_delete_issue_model + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_issue_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_delete_issue_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_issue_model_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_issue_model({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_issue_model name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_issue_model ::Google::Cloud::ContactCenterInsights::V1::DeleteIssueModelRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_issue_model({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_issue_model(::Google::Cloud::ContactCenterInsights::V1::DeleteIssueModelRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_issue_model_client_stub.call_count + end + end + end + + def test_deploy_issue_model + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + deploy_issue_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_deploy_issue_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, deploy_issue_model_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.deploy_issue_model({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.deploy_issue_model name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.deploy_issue_model ::Google::Cloud::ContactCenterInsights::V1::DeployIssueModelRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.deploy_issue_model({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.deploy_issue_model(::Google::Cloud::ContactCenterInsights::V1::DeployIssueModelRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, deploy_issue_model_client_stub.call_count + end + end + end + + def test_undeploy_issue_model + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + undeploy_issue_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_undeploy_issue_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, undeploy_issue_model_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.undeploy_issue_model({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.undeploy_issue_model name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.undeploy_issue_model ::Google::Cloud::ContactCenterInsights::V1::UndeployIssueModelRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.undeploy_issue_model({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.undeploy_issue_model(::Google::Cloud::ContactCenterInsights::V1::UndeployIssueModelRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, undeploy_issue_model_client_stub.call_count + end + end + end + + def test_export_issue_model + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + gcs_destination = {} + name = "hello world" + + export_issue_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_export_issue_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, export_issue_model_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.export_issue_model({ gcs_destination: gcs_destination, name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.export_issue_model gcs_destination: gcs_destination, name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.export_issue_model ::Google::Cloud::ContactCenterInsights::V1::ExportIssueModelRequest.new(gcs_destination: gcs_destination, name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.export_issue_model({ gcs_destination: gcs_destination, name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.export_issue_model(::Google::Cloud::ContactCenterInsights::V1::ExportIssueModelRequest.new(gcs_destination: gcs_destination, name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, export_issue_model_client_stub.call_count + end + end + end + + def test_import_issue_model + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + gcs_source = {} + parent = "hello world" + create_new_model = true + + import_issue_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_import_issue_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, import_issue_model_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.import_issue_model({ gcs_source: gcs_source, parent: parent, create_new_model: create_new_model }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.import_issue_model gcs_source: gcs_source, parent: parent, create_new_model: create_new_model do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.import_issue_model ::Google::Cloud::ContactCenterInsights::V1::ImportIssueModelRequest.new(gcs_source: gcs_source, parent: parent, create_new_model: create_new_model) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.import_issue_model({ gcs_source: gcs_source, parent: parent, create_new_model: create_new_model }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.import_issue_model(::Google::Cloud::ContactCenterInsights::V1::ImportIssueModelRequest.new(gcs_source: gcs_source, parent: parent, create_new_model: create_new_model), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, import_issue_model_client_stub.call_count + end + end + end + + def test_get_issue + # Create test objects. + client_result = ::Google::Cloud::ContactCenterInsights::V1::Issue.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_issue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_get_issue_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_issue_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_issue({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_issue name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_issue ::Google::Cloud::ContactCenterInsights::V1::GetIssueRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_issue({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_issue(::Google::Cloud::ContactCenterInsights::V1::GetIssueRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_issue_client_stub.call_count + end + end + end + + def test_list_issues + # Create test objects. + client_result = ::Google::Cloud::ContactCenterInsights::V1::ListIssuesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + + list_issues_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_list_issues_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_issues_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_issues({ parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_issues parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_issues ::Google::Cloud::ContactCenterInsights::V1::ListIssuesRequest.new(parent: parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_issues({ parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_issues(::Google::Cloud::ContactCenterInsights::V1::ListIssuesRequest.new(parent: parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_issues_client_stub.call_count + end + end + end + + def test_update_issue + # Create test objects. + client_result = ::Google::Cloud::ContactCenterInsights::V1::Issue.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + issue = {} + update_mask = {} + + update_issue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_update_issue_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_issue_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_issue({ issue: issue, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_issue issue: issue, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_issue ::Google::Cloud::ContactCenterInsights::V1::UpdateIssueRequest.new(issue: issue, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_issue({ issue: issue, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_issue(::Google::Cloud::ContactCenterInsights::V1::UpdateIssueRequest.new(issue: issue, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_issue_client_stub.call_count + end + end + end + + def test_delete_issue + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_issue_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_delete_issue_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_issue_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_issue({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_issue name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_issue ::Google::Cloud::ContactCenterInsights::V1::DeleteIssueRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_issue({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_issue(::Google::Cloud::ContactCenterInsights::V1::DeleteIssueRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_issue_client_stub.call_count + end + end + end + + def test_calculate_issue_model_stats + # Create test objects. + client_result = ::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + issue_model = "hello world" + + calculate_issue_model_stats_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_calculate_issue_model_stats_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, calculate_issue_model_stats_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.calculate_issue_model_stats({ issue_model: issue_model }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.calculate_issue_model_stats issue_model: issue_model do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.calculate_issue_model_stats ::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsRequest.new(issue_model: issue_model) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.calculate_issue_model_stats({ issue_model: issue_model }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.calculate_issue_model_stats(::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsRequest.new(issue_model: issue_model), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, calculate_issue_model_stats_client_stub.call_count + end + end + end + + def test_create_phrase_matcher + # Create test objects. + client_result = ::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + phrase_matcher = {} + + create_phrase_matcher_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_create_phrase_matcher_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_phrase_matcher_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_phrase_matcher({ parent: parent, phrase_matcher: phrase_matcher }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_phrase_matcher parent: parent, phrase_matcher: phrase_matcher do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_phrase_matcher ::Google::Cloud::ContactCenterInsights::V1::CreatePhraseMatcherRequest.new(parent: parent, phrase_matcher: phrase_matcher) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_phrase_matcher({ parent: parent, phrase_matcher: phrase_matcher }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_phrase_matcher(::Google::Cloud::ContactCenterInsights::V1::CreatePhraseMatcherRequest.new(parent: parent, phrase_matcher: phrase_matcher), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_phrase_matcher_client_stub.call_count + end + end + end + + def test_get_phrase_matcher + # Create test objects. + client_result = ::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_phrase_matcher_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_get_phrase_matcher_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_phrase_matcher_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_phrase_matcher({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_phrase_matcher name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_phrase_matcher ::Google::Cloud::ContactCenterInsights::V1::GetPhraseMatcherRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_phrase_matcher({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_phrase_matcher(::Google::Cloud::ContactCenterInsights::V1::GetPhraseMatcherRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_phrase_matcher_client_stub.call_count + end + end + end + + def test_list_phrase_matchers + # Create test objects. + client_result = ::Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_phrase_matchers_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_list_phrase_matchers_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_phrase_matchers_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_phrase_matchers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_phrase_matchers parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_phrase_matchers ::Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_phrase_matchers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_phrase_matchers(::Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_phrase_matchers_client_stub.call_count + end + end + end + + def test_delete_phrase_matcher + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_phrase_matcher_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_delete_phrase_matcher_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_phrase_matcher_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_phrase_matcher({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_phrase_matcher name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_phrase_matcher ::Google::Cloud::ContactCenterInsights::V1::DeletePhraseMatcherRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_phrase_matcher({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_phrase_matcher(::Google::Cloud::ContactCenterInsights::V1::DeletePhraseMatcherRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_phrase_matcher_client_stub.call_count + end + end + end + + def test_update_phrase_matcher + # Create test objects. + client_result = ::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + phrase_matcher = {} + update_mask = {} + + update_phrase_matcher_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_update_phrase_matcher_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_phrase_matcher_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_phrase_matcher({ phrase_matcher: phrase_matcher, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_phrase_matcher phrase_matcher: phrase_matcher, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_phrase_matcher ::Google::Cloud::ContactCenterInsights::V1::UpdatePhraseMatcherRequest.new(phrase_matcher: phrase_matcher, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_phrase_matcher({ phrase_matcher: phrase_matcher, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_phrase_matcher(::Google::Cloud::ContactCenterInsights::V1::UpdatePhraseMatcherRequest.new(phrase_matcher: phrase_matcher, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_phrase_matcher_client_stub.call_count + end + end + end + + def test_calculate_stats + # Create test objects. + client_result = ::Google::Cloud::ContactCenterInsights::V1::CalculateStatsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + location = "hello world" + filter = "hello world" + + calculate_stats_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_calculate_stats_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, calculate_stats_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.calculate_stats({ location: location, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.calculate_stats location: location, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.calculate_stats ::Google::Cloud::ContactCenterInsights::V1::CalculateStatsRequest.new(location: location, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.calculate_stats({ location: location, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.calculate_stats(::Google::Cloud::ContactCenterInsights::V1::CalculateStatsRequest.new(location: location, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, calculate_stats_client_stub.call_count + end + end + end + + def test_get_settings + # Create test objects. + client_result = ::Google::Cloud::ContactCenterInsights::V1::Settings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_get_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_settings_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_settings({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_settings name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_settings ::Google::Cloud::ContactCenterInsights::V1::GetSettingsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_settings({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_settings(::Google::Cloud::ContactCenterInsights::V1::GetSettingsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_settings_client_stub.call_count + end + end + end + + def test_update_settings + # Create test objects. + client_result = ::Google::Cloud::ContactCenterInsights::V1::Settings.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + settings = {} + update_mask = {} + + update_settings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_update_settings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_settings_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_settings({ settings: settings, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_settings settings: settings, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_settings ::Google::Cloud::ContactCenterInsights::V1::UpdateSettingsRequest.new(settings: settings, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_settings({ settings: settings, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_settings(::Google::Cloud::ContactCenterInsights::V1::UpdateSettingsRequest.new(settings: settings, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_settings_client_stub.call_count + end + end + end + + def test_get_encryption_spec + # Create test objects. + client_result = ::Google::Cloud::ContactCenterInsights::V1::EncryptionSpec.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_encryption_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_get_encryption_spec_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_encryption_spec_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_encryption_spec({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_encryption_spec name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_encryption_spec ::Google::Cloud::ContactCenterInsights::V1::GetEncryptionSpecRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_encryption_spec({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_encryption_spec(::Google::Cloud::ContactCenterInsights::V1::GetEncryptionSpecRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_encryption_spec_client_stub.call_count + end + end + end + + def test_initialize_encryption_spec + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + encryption_spec = {} + + initialize_encryption_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_initialize_encryption_spec_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, initialize_encryption_spec_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.initialize_encryption_spec({ encryption_spec: encryption_spec }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.initialize_encryption_spec encryption_spec: encryption_spec do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.initialize_encryption_spec ::Google::Cloud::ContactCenterInsights::V1::InitializeEncryptionSpecRequest.new(encryption_spec: encryption_spec) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.initialize_encryption_spec({ encryption_spec: encryption_spec }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.initialize_encryption_spec(::Google::Cloud::ContactCenterInsights::V1::InitializeEncryptionSpecRequest.new(encryption_spec: encryption_spec), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, initialize_encryption_spec_client_stub.call_count + end + end + end + + def test_create_view + # Create test objects. + client_result = ::Google::Cloud::ContactCenterInsights::V1::View.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + view = {} + + create_view_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_create_view_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_view_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_view({ parent: parent, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_view parent: parent, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_view ::Google::Cloud::ContactCenterInsights::V1::CreateViewRequest.new(parent: parent, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_view({ parent: parent, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_view(::Google::Cloud::ContactCenterInsights::V1::CreateViewRequest.new(parent: parent, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_view_client_stub.call_count + end + end + end + + def test_get_view + # Create test objects. + client_result = ::Google::Cloud::ContactCenterInsights::V1::View.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_view_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_get_view_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_view_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_view({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_view name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_view ::Google::Cloud::ContactCenterInsights::V1::GetViewRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_view({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_view(::Google::Cloud::ContactCenterInsights::V1::GetViewRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_view_client_stub.call_count + end + end + end + + def test_list_views + # Create test objects. + client_result = ::Google::Cloud::ContactCenterInsights::V1::ListViewsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_views_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_list_views_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_views_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_views({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_views parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_views ::Google::Cloud::ContactCenterInsights::V1::ListViewsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_views({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_views(::Google::Cloud::ContactCenterInsights::V1::ListViewsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_views_client_stub.call_count + end + end + end + + def test_update_view + # Create test objects. + client_result = ::Google::Cloud::ContactCenterInsights::V1::View.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + view = {} + update_mask = {} + + update_view_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_update_view_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_view_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_view({ view: view, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_view view: view, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_view ::Google::Cloud::ContactCenterInsights::V1::UpdateViewRequest.new(view: view, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_view({ view: view, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_view(::Google::Cloud::ContactCenterInsights::V1::UpdateViewRequest.new(view: view, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_view_client_stub.call_count + end + end + end + + def test_delete_view + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_view_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.stub :transcode_delete_view_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_view_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_view({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_view name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_view ::Google::Cloud::ContactCenterInsights::V1::DeleteViewRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_view({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_view(::Google::Cloud::ContactCenterInsights::V1::DeleteViewRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_view_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/test/google/cloud/contact_center_insights/v1/contact_center_insights_test.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/test/google/cloud/contact_center_insights/v1/contact_center_insights_test.rb new file mode 100644 index 000000000000..72537d71cb03 --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/test/google/cloud/contact_center_insights/v1/contact_center_insights_test.rb @@ -0,0 +1,2777 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/contactcenterinsights/v1/contact_center_insights_pb" +require "google/cloud/contactcenterinsights/v1/contact_center_insights_services_pb" +require "google/cloud/contact_center_insights/v1/contact_center_insights" + +class ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + yield @response, @operation if block_given? + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + end + + def test_create_conversation + # Create GRPC objects. + grpc_response = ::Google::Cloud::ContactCenterInsights::V1::Conversation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + conversation = {} + conversation_id = "hello world" + + create_conversation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_conversation, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::CreateConversationRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ContactCenterInsights::V1::Conversation), request["conversation"] + assert_equal "hello world", request["conversation_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_conversation_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_conversation({ parent: parent, conversation: conversation, conversation_id: conversation_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_conversation parent: parent, conversation: conversation, conversation_id: conversation_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_conversation ::Google::Cloud::ContactCenterInsights::V1::CreateConversationRequest.new(parent: parent, conversation: conversation, conversation_id: conversation_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_conversation({ parent: parent, conversation: conversation, conversation_id: conversation_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_conversation(::Google::Cloud::ContactCenterInsights::V1::CreateConversationRequest.new(parent: parent, conversation: conversation, conversation_id: conversation_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_conversation_client_stub.call_rpc_count + end + end + + def test_upload_conversation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + conversation = {} + conversation_id = "hello world" + redaction_config = {} + speech_config = {} + + upload_conversation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :upload_conversation, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::UploadConversationRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ContactCenterInsights::V1::Conversation), request["conversation"] + assert_equal "hello world", request["conversation_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ContactCenterInsights::V1::RedactionConfig), request["redaction_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ContactCenterInsights::V1::SpeechConfig), request["speech_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, upload_conversation_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.upload_conversation({ parent: parent, conversation: conversation, conversation_id: conversation_id, redaction_config: redaction_config, speech_config: speech_config }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.upload_conversation parent: parent, conversation: conversation, conversation_id: conversation_id, redaction_config: redaction_config, speech_config: speech_config do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.upload_conversation ::Google::Cloud::ContactCenterInsights::V1::UploadConversationRequest.new(parent: parent, conversation: conversation, conversation_id: conversation_id, redaction_config: redaction_config, speech_config: speech_config) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.upload_conversation({ parent: parent, conversation: conversation, conversation_id: conversation_id, redaction_config: redaction_config, speech_config: speech_config }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.upload_conversation(::Google::Cloud::ContactCenterInsights::V1::UploadConversationRequest.new(parent: parent, conversation: conversation, conversation_id: conversation_id, redaction_config: redaction_config, speech_config: speech_config), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, upload_conversation_client_stub.call_rpc_count + end + end + + def test_update_conversation + # Create GRPC objects. + grpc_response = ::Google::Cloud::ContactCenterInsights::V1::Conversation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + conversation = {} + update_mask = {} + + update_conversation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_conversation, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::UpdateConversationRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ContactCenterInsights::V1::Conversation), request["conversation"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_conversation_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_conversation({ conversation: conversation, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_conversation conversation: conversation, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_conversation ::Google::Cloud::ContactCenterInsights::V1::UpdateConversationRequest.new(conversation: conversation, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_conversation({ conversation: conversation, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_conversation(::Google::Cloud::ContactCenterInsights::V1::UpdateConversationRequest.new(conversation: conversation, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_conversation_client_stub.call_rpc_count + end + end + + def test_get_conversation + # Create GRPC objects. + grpc_response = ::Google::Cloud::ContactCenterInsights::V1::Conversation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :CONVERSATION_VIEW_UNSPECIFIED + + get_conversation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_conversation, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::GetConversationRequest, request + assert_equal "hello world", request["name"] + assert_equal :CONVERSATION_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_conversation_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_conversation({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_conversation name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_conversation ::Google::Cloud::ContactCenterInsights::V1::GetConversationRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_conversation({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_conversation(::Google::Cloud::ContactCenterInsights::V1::GetConversationRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_conversation_client_stub.call_rpc_count + end + end + + def test_list_conversations + # Create GRPC objects. + grpc_response = ::Google::Cloud::ContactCenterInsights::V1::ListConversationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + view = :CONVERSATION_VIEW_UNSPECIFIED + + list_conversations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_conversations, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::ListConversationsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + assert_equal :CONVERSATION_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_conversations_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_conversations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_conversations parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_conversations ::Google::Cloud::ContactCenterInsights::V1::ListConversationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_conversations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_conversations(::Google::Cloud::ContactCenterInsights::V1::ListConversationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, view: view), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_conversations_client_stub.call_rpc_count + end + end + + def test_delete_conversation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + + delete_conversation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_conversation, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::DeleteConversationRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_conversation_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_conversation({ name: name, force: force }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_conversation name: name, force: force do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_conversation ::Google::Cloud::ContactCenterInsights::V1::DeleteConversationRequest.new(name: name, force: force) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_conversation({ name: name, force: force }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_conversation(::Google::Cloud::ContactCenterInsights::V1::DeleteConversationRequest.new(name: name, force: force), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_conversation_client_stub.call_rpc_count + end + end + + def test_create_analysis + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + analysis = {} + + create_analysis_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_analysis, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ContactCenterInsights::V1::Analysis), request["analysis"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_analysis_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_analysis({ parent: parent, analysis: analysis }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_analysis parent: parent, analysis: analysis do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_analysis ::Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRequest.new(parent: parent, analysis: analysis) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_analysis({ parent: parent, analysis: analysis }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_analysis(::Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRequest.new(parent: parent, analysis: analysis), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_analysis_client_stub.call_rpc_count + end + end + + def test_get_analysis + # Create GRPC objects. + grpc_response = ::Google::Cloud::ContactCenterInsights::V1::Analysis.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_analysis_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_analysis, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::GetAnalysisRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_analysis_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_analysis({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_analysis name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_analysis ::Google::Cloud::ContactCenterInsights::V1::GetAnalysisRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_analysis({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_analysis(::Google::Cloud::ContactCenterInsights::V1::GetAnalysisRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_analysis_client_stub.call_rpc_count + end + end + + def test_list_analyses + # Create GRPC objects. + grpc_response = ::Google::Cloud::ContactCenterInsights::V1::ListAnalysesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_analyses_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_analyses, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::ListAnalysesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_analyses_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_analyses({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_analyses parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_analyses ::Google::Cloud::ContactCenterInsights::V1::ListAnalysesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_analyses({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_analyses(::Google::Cloud::ContactCenterInsights::V1::ListAnalysesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_analyses_client_stub.call_rpc_count + end + end + + def test_delete_analysis + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_analysis_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_analysis, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_analysis_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_analysis({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_analysis name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_analysis ::Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_analysis({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_analysis(::Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_analysis_client_stub.call_rpc_count + end + end + + def test_bulk_analyze_conversations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + analysis_percentage = 3.5 + annotator_selector = {} + + bulk_analyze_conversations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :bulk_analyze_conversations, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::BulkAnalyzeConversationsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal 3.5, request["analysis_percentage"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ContactCenterInsights::V1::AnnotatorSelector), request["annotator_selector"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, bulk_analyze_conversations_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.bulk_analyze_conversations({ parent: parent, filter: filter, analysis_percentage: analysis_percentage, annotator_selector: annotator_selector }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.bulk_analyze_conversations parent: parent, filter: filter, analysis_percentage: analysis_percentage, annotator_selector: annotator_selector do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.bulk_analyze_conversations ::Google::Cloud::ContactCenterInsights::V1::BulkAnalyzeConversationsRequest.new(parent: parent, filter: filter, analysis_percentage: analysis_percentage, annotator_selector: annotator_selector) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.bulk_analyze_conversations({ parent: parent, filter: filter, analysis_percentage: analysis_percentage, annotator_selector: annotator_selector }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.bulk_analyze_conversations(::Google::Cloud::ContactCenterInsights::V1::BulkAnalyzeConversationsRequest.new(parent: parent, filter: filter, analysis_percentage: analysis_percentage, annotator_selector: annotator_selector), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, bulk_analyze_conversations_client_stub.call_rpc_count + end + end + + def test_bulk_delete_conversations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + max_delete_count = 42 + force = true + + bulk_delete_conversations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :bulk_delete_conversations, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::BulkDeleteConversationsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["max_delete_count"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, bulk_delete_conversations_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.bulk_delete_conversations({ parent: parent, filter: filter, max_delete_count: max_delete_count, force: force }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.bulk_delete_conversations parent: parent, filter: filter, max_delete_count: max_delete_count, force: force do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.bulk_delete_conversations ::Google::Cloud::ContactCenterInsights::V1::BulkDeleteConversationsRequest.new(parent: parent, filter: filter, max_delete_count: max_delete_count, force: force) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.bulk_delete_conversations({ parent: parent, filter: filter, max_delete_count: max_delete_count, force: force }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.bulk_delete_conversations(::Google::Cloud::ContactCenterInsights::V1::BulkDeleteConversationsRequest.new(parent: parent, filter: filter, max_delete_count: max_delete_count, force: force), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, bulk_delete_conversations_client_stub.call_rpc_count + end + end + + def test_ingest_conversations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + gcs_source = {} + transcript_object_config = {} + parent = "hello world" + conversation_config = {} + redaction_config = {} + speech_config = {} + sample_size = 42 + + ingest_conversations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :ingest_conversations, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest::GcsSource), request["gcs_source"] + assert_equal :gcs_source, request.source + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest::TranscriptObjectConfig), request["transcript_object_config"] + assert_equal :transcript_object_config, request.object_config + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest::ConversationConfig), request["conversation_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ContactCenterInsights::V1::RedactionConfig), request["redaction_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ContactCenterInsights::V1::SpeechConfig), request["speech_config"] + assert_equal 42, request["sample_size"] + assert request.has_sample_size? + refute_nil options + end + + Gapic::ServiceStub.stub :new, ingest_conversations_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.ingest_conversations({ gcs_source: gcs_source, transcript_object_config: transcript_object_config, parent: parent, conversation_config: conversation_config, redaction_config: redaction_config, speech_config: speech_config, sample_size: sample_size }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.ingest_conversations gcs_source: gcs_source, transcript_object_config: transcript_object_config, parent: parent, conversation_config: conversation_config, redaction_config: redaction_config, speech_config: speech_config, sample_size: sample_size do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.ingest_conversations ::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest.new(gcs_source: gcs_source, transcript_object_config: transcript_object_config, parent: parent, conversation_config: conversation_config, redaction_config: redaction_config, speech_config: speech_config, sample_size: sample_size) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.ingest_conversations({ gcs_source: gcs_source, transcript_object_config: transcript_object_config, parent: parent, conversation_config: conversation_config, redaction_config: redaction_config, speech_config: speech_config, sample_size: sample_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.ingest_conversations(::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest.new(gcs_source: gcs_source, transcript_object_config: transcript_object_config, parent: parent, conversation_config: conversation_config, redaction_config: redaction_config, speech_config: speech_config, sample_size: sample_size), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, ingest_conversations_client_stub.call_rpc_count + end + end + + def test_export_insights_data + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + big_query_destination = {} + parent = "hello world" + filter = "hello world" + kms_key = "hello world" + write_disposition = :WRITE_DISPOSITION_UNSPECIFIED + + export_insights_data_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :export_insights_data, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest::BigQueryDestination), request["big_query_destination"] + assert_equal :big_query_destination, request.destination + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["kms_key"] + assert_equal :WRITE_DISPOSITION_UNSPECIFIED, request["write_disposition"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, export_insights_data_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.export_insights_data({ big_query_destination: big_query_destination, parent: parent, filter: filter, kms_key: kms_key, write_disposition: write_disposition }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.export_insights_data big_query_destination: big_query_destination, parent: parent, filter: filter, kms_key: kms_key, write_disposition: write_disposition do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.export_insights_data ::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest.new(big_query_destination: big_query_destination, parent: parent, filter: filter, kms_key: kms_key, write_disposition: write_disposition) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.export_insights_data({ big_query_destination: big_query_destination, parent: parent, filter: filter, kms_key: kms_key, write_disposition: write_disposition }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.export_insights_data(::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest.new(big_query_destination: big_query_destination, parent: parent, filter: filter, kms_key: kms_key, write_disposition: write_disposition), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, export_insights_data_client_stub.call_rpc_count + end + end + + def test_create_issue_model + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + issue_model = {} + + create_issue_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_issue_model, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::CreateIssueModelRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ContactCenterInsights::V1::IssueModel), request["issue_model"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_issue_model_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_issue_model({ parent: parent, issue_model: issue_model }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_issue_model parent: parent, issue_model: issue_model do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_issue_model ::Google::Cloud::ContactCenterInsights::V1::CreateIssueModelRequest.new(parent: parent, issue_model: issue_model) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_issue_model({ parent: parent, issue_model: issue_model }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_issue_model(::Google::Cloud::ContactCenterInsights::V1::CreateIssueModelRequest.new(parent: parent, issue_model: issue_model), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_issue_model_client_stub.call_rpc_count + end + end + + def test_update_issue_model + # Create GRPC objects. + grpc_response = ::Google::Cloud::ContactCenterInsights::V1::IssueModel.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + issue_model = {} + update_mask = {} + + update_issue_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_issue_model, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::UpdateIssueModelRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ContactCenterInsights::V1::IssueModel), request["issue_model"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_issue_model_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_issue_model({ issue_model: issue_model, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_issue_model issue_model: issue_model, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_issue_model ::Google::Cloud::ContactCenterInsights::V1::UpdateIssueModelRequest.new(issue_model: issue_model, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_issue_model({ issue_model: issue_model, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_issue_model(::Google::Cloud::ContactCenterInsights::V1::UpdateIssueModelRequest.new(issue_model: issue_model, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_issue_model_client_stub.call_rpc_count + end + end + + def test_get_issue_model + # Create GRPC objects. + grpc_response = ::Google::Cloud::ContactCenterInsights::V1::IssueModel.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_issue_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_issue_model, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::GetIssueModelRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_issue_model_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_issue_model({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_issue_model name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_issue_model ::Google::Cloud::ContactCenterInsights::V1::GetIssueModelRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_issue_model({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_issue_model(::Google::Cloud::ContactCenterInsights::V1::GetIssueModelRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_issue_model_client_stub.call_rpc_count + end + end + + def test_list_issue_models + # Create GRPC objects. + grpc_response = ::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + + list_issue_models_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_issue_models, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsRequest, request + assert_equal "hello world", request["parent"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_issue_models_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_issue_models({ parent: parent }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_issue_models parent: parent do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_issue_models ::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsRequest.new(parent: parent) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_issue_models({ parent: parent }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_issue_models(::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsRequest.new(parent: parent), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_issue_models_client_stub.call_rpc_count + end + end + + def test_delete_issue_model + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_issue_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_issue_model, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::DeleteIssueModelRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_issue_model_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_issue_model({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_issue_model name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_issue_model ::Google::Cloud::ContactCenterInsights::V1::DeleteIssueModelRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_issue_model({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_issue_model(::Google::Cloud::ContactCenterInsights::V1::DeleteIssueModelRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_issue_model_client_stub.call_rpc_count + end + end + + def test_deploy_issue_model + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + deploy_issue_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :deploy_issue_model, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::DeployIssueModelRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, deploy_issue_model_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.deploy_issue_model({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.deploy_issue_model name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.deploy_issue_model ::Google::Cloud::ContactCenterInsights::V1::DeployIssueModelRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.deploy_issue_model({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.deploy_issue_model(::Google::Cloud::ContactCenterInsights::V1::DeployIssueModelRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, deploy_issue_model_client_stub.call_rpc_count + end + end + + def test_undeploy_issue_model + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + undeploy_issue_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :undeploy_issue_model, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::UndeployIssueModelRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, undeploy_issue_model_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.undeploy_issue_model({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.undeploy_issue_model name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.undeploy_issue_model ::Google::Cloud::ContactCenterInsights::V1::UndeployIssueModelRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.undeploy_issue_model({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.undeploy_issue_model(::Google::Cloud::ContactCenterInsights::V1::UndeployIssueModelRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, undeploy_issue_model_client_stub.call_rpc_count + end + end + + def test_export_issue_model + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + gcs_destination = {} + name = "hello world" + + export_issue_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :export_issue_model, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::ExportIssueModelRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ContactCenterInsights::V1::ExportIssueModelRequest::GcsDestination), request["gcs_destination"] + assert_equal :gcs_destination, request.Destination + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, export_issue_model_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.export_issue_model({ gcs_destination: gcs_destination, name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.export_issue_model gcs_destination: gcs_destination, name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.export_issue_model ::Google::Cloud::ContactCenterInsights::V1::ExportIssueModelRequest.new(gcs_destination: gcs_destination, name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.export_issue_model({ gcs_destination: gcs_destination, name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.export_issue_model(::Google::Cloud::ContactCenterInsights::V1::ExportIssueModelRequest.new(gcs_destination: gcs_destination, name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, export_issue_model_client_stub.call_rpc_count + end + end + + def test_import_issue_model + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + gcs_source = {} + parent = "hello world" + create_new_model = true + + import_issue_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :import_issue_model, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::ImportIssueModelRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ContactCenterInsights::V1::ImportIssueModelRequest::GcsSource), request["gcs_source"] + assert_equal :gcs_source, request.Source + assert_equal "hello world", request["parent"] + assert_equal true, request["create_new_model"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, import_issue_model_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.import_issue_model({ gcs_source: gcs_source, parent: parent, create_new_model: create_new_model }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.import_issue_model gcs_source: gcs_source, parent: parent, create_new_model: create_new_model do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.import_issue_model ::Google::Cloud::ContactCenterInsights::V1::ImportIssueModelRequest.new(gcs_source: gcs_source, parent: parent, create_new_model: create_new_model) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.import_issue_model({ gcs_source: gcs_source, parent: parent, create_new_model: create_new_model }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.import_issue_model(::Google::Cloud::ContactCenterInsights::V1::ImportIssueModelRequest.new(gcs_source: gcs_source, parent: parent, create_new_model: create_new_model), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, import_issue_model_client_stub.call_rpc_count + end + end + + def test_get_issue + # Create GRPC objects. + grpc_response = ::Google::Cloud::ContactCenterInsights::V1::Issue.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_issue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_issue, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::GetIssueRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_issue_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_issue({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_issue name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_issue ::Google::Cloud::ContactCenterInsights::V1::GetIssueRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_issue({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_issue(::Google::Cloud::ContactCenterInsights::V1::GetIssueRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_issue_client_stub.call_rpc_count + end + end + + def test_list_issues + # Create GRPC objects. + grpc_response = ::Google::Cloud::ContactCenterInsights::V1::ListIssuesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + + list_issues_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_issues, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::ListIssuesRequest, request + assert_equal "hello world", request["parent"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_issues_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_issues({ parent: parent }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_issues parent: parent do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_issues ::Google::Cloud::ContactCenterInsights::V1::ListIssuesRequest.new(parent: parent) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_issues({ parent: parent }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_issues(::Google::Cloud::ContactCenterInsights::V1::ListIssuesRequest.new(parent: parent), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_issues_client_stub.call_rpc_count + end + end + + def test_update_issue + # Create GRPC objects. + grpc_response = ::Google::Cloud::ContactCenterInsights::V1::Issue.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + issue = {} + update_mask = {} + + update_issue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_issue, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::UpdateIssueRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ContactCenterInsights::V1::Issue), request["issue"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_issue_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_issue({ issue: issue, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_issue issue: issue, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_issue ::Google::Cloud::ContactCenterInsights::V1::UpdateIssueRequest.new(issue: issue, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_issue({ issue: issue, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_issue(::Google::Cloud::ContactCenterInsights::V1::UpdateIssueRequest.new(issue: issue, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_issue_client_stub.call_rpc_count + end + end + + def test_delete_issue + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_issue_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_issue, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::DeleteIssueRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_issue_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_issue({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_issue name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_issue ::Google::Cloud::ContactCenterInsights::V1::DeleteIssueRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_issue({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_issue(::Google::Cloud::ContactCenterInsights::V1::DeleteIssueRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_issue_client_stub.call_rpc_count + end + end + + def test_calculate_issue_model_stats + # Create GRPC objects. + grpc_response = ::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + issue_model = "hello world" + + calculate_issue_model_stats_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :calculate_issue_model_stats, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsRequest, request + assert_equal "hello world", request["issue_model"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, calculate_issue_model_stats_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.calculate_issue_model_stats({ issue_model: issue_model }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.calculate_issue_model_stats issue_model: issue_model do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.calculate_issue_model_stats ::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsRequest.new(issue_model: issue_model) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.calculate_issue_model_stats({ issue_model: issue_model }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.calculate_issue_model_stats(::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsRequest.new(issue_model: issue_model), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, calculate_issue_model_stats_client_stub.call_rpc_count + end + end + + def test_create_phrase_matcher + # Create GRPC objects. + grpc_response = ::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + phrase_matcher = {} + + create_phrase_matcher_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_phrase_matcher, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::CreatePhraseMatcherRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher), request["phrase_matcher"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_phrase_matcher_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_phrase_matcher({ parent: parent, phrase_matcher: phrase_matcher }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_phrase_matcher parent: parent, phrase_matcher: phrase_matcher do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_phrase_matcher ::Google::Cloud::ContactCenterInsights::V1::CreatePhraseMatcherRequest.new(parent: parent, phrase_matcher: phrase_matcher) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_phrase_matcher({ parent: parent, phrase_matcher: phrase_matcher }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_phrase_matcher(::Google::Cloud::ContactCenterInsights::V1::CreatePhraseMatcherRequest.new(parent: parent, phrase_matcher: phrase_matcher), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_phrase_matcher_client_stub.call_rpc_count + end + end + + def test_get_phrase_matcher + # Create GRPC objects. + grpc_response = ::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_phrase_matcher_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_phrase_matcher, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::GetPhraseMatcherRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_phrase_matcher_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_phrase_matcher({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_phrase_matcher name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_phrase_matcher ::Google::Cloud::ContactCenterInsights::V1::GetPhraseMatcherRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_phrase_matcher({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_phrase_matcher(::Google::Cloud::ContactCenterInsights::V1::GetPhraseMatcherRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_phrase_matcher_client_stub.call_rpc_count + end + end + + def test_list_phrase_matchers + # Create GRPC objects. + grpc_response = ::Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_phrase_matchers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_phrase_matchers, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_phrase_matchers_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_phrase_matchers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_phrase_matchers parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_phrase_matchers ::Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_phrase_matchers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_phrase_matchers(::Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_phrase_matchers_client_stub.call_rpc_count + end + end + + def test_delete_phrase_matcher + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_phrase_matcher_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_phrase_matcher, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::DeletePhraseMatcherRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_phrase_matcher_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_phrase_matcher({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_phrase_matcher name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_phrase_matcher ::Google::Cloud::ContactCenterInsights::V1::DeletePhraseMatcherRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_phrase_matcher({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_phrase_matcher(::Google::Cloud::ContactCenterInsights::V1::DeletePhraseMatcherRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_phrase_matcher_client_stub.call_rpc_count + end + end + + def test_update_phrase_matcher + # Create GRPC objects. + grpc_response = ::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + phrase_matcher = {} + update_mask = {} + + update_phrase_matcher_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_phrase_matcher, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::UpdatePhraseMatcherRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher), request["phrase_matcher"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_phrase_matcher_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_phrase_matcher({ phrase_matcher: phrase_matcher, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_phrase_matcher phrase_matcher: phrase_matcher, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_phrase_matcher ::Google::Cloud::ContactCenterInsights::V1::UpdatePhraseMatcherRequest.new(phrase_matcher: phrase_matcher, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_phrase_matcher({ phrase_matcher: phrase_matcher, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_phrase_matcher(::Google::Cloud::ContactCenterInsights::V1::UpdatePhraseMatcherRequest.new(phrase_matcher: phrase_matcher, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_phrase_matcher_client_stub.call_rpc_count + end + end + + def test_calculate_stats + # Create GRPC objects. + grpc_response = ::Google::Cloud::ContactCenterInsights::V1::CalculateStatsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + location = "hello world" + filter = "hello world" + + calculate_stats_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :calculate_stats, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::CalculateStatsRequest, request + assert_equal "hello world", request["location"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, calculate_stats_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.calculate_stats({ location: location, filter: filter }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.calculate_stats location: location, filter: filter do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.calculate_stats ::Google::Cloud::ContactCenterInsights::V1::CalculateStatsRequest.new(location: location, filter: filter) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.calculate_stats({ location: location, filter: filter }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.calculate_stats(::Google::Cloud::ContactCenterInsights::V1::CalculateStatsRequest.new(location: location, filter: filter), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, calculate_stats_client_stub.call_rpc_count + end + end + + def test_get_settings + # Create GRPC objects. + grpc_response = ::Google::Cloud::ContactCenterInsights::V1::Settings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_settings, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::GetSettingsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_settings_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_settings({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_settings name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_settings ::Google::Cloud::ContactCenterInsights::V1::GetSettingsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_settings({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_settings(::Google::Cloud::ContactCenterInsights::V1::GetSettingsRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_settings_client_stub.call_rpc_count + end + end + + def test_update_settings + # Create GRPC objects. + grpc_response = ::Google::Cloud::ContactCenterInsights::V1::Settings.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + settings = {} + update_mask = {} + + update_settings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_settings, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::UpdateSettingsRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ContactCenterInsights::V1::Settings), request["settings"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_settings_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_settings({ settings: settings, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_settings settings: settings, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_settings ::Google::Cloud::ContactCenterInsights::V1::UpdateSettingsRequest.new(settings: settings, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_settings({ settings: settings, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_settings(::Google::Cloud::ContactCenterInsights::V1::UpdateSettingsRequest.new(settings: settings, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_settings_client_stub.call_rpc_count + end + end + + def test_get_encryption_spec + # Create GRPC objects. + grpc_response = ::Google::Cloud::ContactCenterInsights::V1::EncryptionSpec.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_encryption_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_encryption_spec, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::GetEncryptionSpecRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_encryption_spec_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_encryption_spec({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_encryption_spec name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_encryption_spec ::Google::Cloud::ContactCenterInsights::V1::GetEncryptionSpecRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_encryption_spec({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_encryption_spec(::Google::Cloud::ContactCenterInsights::V1::GetEncryptionSpecRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_encryption_spec_client_stub.call_rpc_count + end + end + + def test_initialize_encryption_spec + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + encryption_spec = {} + + initialize_encryption_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :initialize_encryption_spec, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::InitializeEncryptionSpecRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ContactCenterInsights::V1::EncryptionSpec), request["encryption_spec"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, initialize_encryption_spec_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.initialize_encryption_spec({ encryption_spec: encryption_spec }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.initialize_encryption_spec encryption_spec: encryption_spec do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.initialize_encryption_spec ::Google::Cloud::ContactCenterInsights::V1::InitializeEncryptionSpecRequest.new(encryption_spec: encryption_spec) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.initialize_encryption_spec({ encryption_spec: encryption_spec }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.initialize_encryption_spec(::Google::Cloud::ContactCenterInsights::V1::InitializeEncryptionSpecRequest.new(encryption_spec: encryption_spec), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, initialize_encryption_spec_client_stub.call_rpc_count + end + end + + def test_create_view + # Create GRPC objects. + grpc_response = ::Google::Cloud::ContactCenterInsights::V1::View.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + view = {} + + create_view_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_view, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::CreateViewRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ContactCenterInsights::V1::View), request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_view_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_view({ parent: parent, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_view parent: parent, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_view ::Google::Cloud::ContactCenterInsights::V1::CreateViewRequest.new(parent: parent, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_view({ parent: parent, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_view(::Google::Cloud::ContactCenterInsights::V1::CreateViewRequest.new(parent: parent, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_view_client_stub.call_rpc_count + end + end + + def test_get_view + # Create GRPC objects. + grpc_response = ::Google::Cloud::ContactCenterInsights::V1::View.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_view_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_view, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::GetViewRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_view_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_view({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_view name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_view ::Google::Cloud::ContactCenterInsights::V1::GetViewRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_view({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_view(::Google::Cloud::ContactCenterInsights::V1::GetViewRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_view_client_stub.call_rpc_count + end + end + + def test_list_views + # Create GRPC objects. + grpc_response = ::Google::Cloud::ContactCenterInsights::V1::ListViewsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_views_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_views, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::ListViewsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_views_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_views({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_views parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_views ::Google::Cloud::ContactCenterInsights::V1::ListViewsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_views({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_views(::Google::Cloud::ContactCenterInsights::V1::ListViewsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_views_client_stub.call_rpc_count + end + end + + def test_update_view + # Create GRPC objects. + grpc_response = ::Google::Cloud::ContactCenterInsights::V1::View.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + view = {} + update_mask = {} + + update_view_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_view, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::UpdateViewRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ContactCenterInsights::V1::View), request["view"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_view_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_view({ view: view, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_view view: view, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_view ::Google::Cloud::ContactCenterInsights::V1::UpdateViewRequest.new(view: view, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_view({ view: view, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_view(::Google::Cloud::ContactCenterInsights::V1::UpdateViewRequest.new(view: view, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_view_client_stub.call_rpc_count + end + end + + def test_delete_view + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_view_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_view, name + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::DeleteViewRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_view_client_stub do + # Create client + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_view({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_view name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_view ::Google::Cloud::ContactCenterInsights::V1::DeleteViewRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_view({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_view(::Google::Cloud::ContactCenterInsights::V1::DeleteViewRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_view_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client::Configuration, config + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-contact_center_insights-v1/test/helper.rb b/owl-bot-staging/google-cloud-contact_center_insights-v1/test/helper.rb new file mode 100644 index 000000000000..48407bca7edb --- /dev/null +++ b/owl-bot-staging/google-cloud-contact_center_insights-v1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# 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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct"