Class: Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client

Inherits:
Object
  • Object
show all
Includes:
Paths
Defined in:
lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb

Overview

Client for the ContactCenterInsights service.

An API that lets users analyze and explore their business conversation data.

Defined Under Namespace

Classes: Configuration

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Paths

#analysis_path, #analysis_rule_path, #conversation_path, #conversation_profile_path, #encryption_spec_path, #feedback_label_path, #issue_model_path, #issue_path, #location_path, #participant_path, #phrase_matcher_path, #qa_question_path, #qa_scorecard_path, #qa_scorecard_result_path, #qa_scorecard_revision_path, #recognizer_path, #settings_path, #view_path

Constructor Details

#initialize {|config| ... } ⇒ Client

Create a new ContactCenterInsights client object.

Examples:


# 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

Yields:

  • (config)

    Configure the ContactCenterInsights client.

Yield Parameters:



130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 130

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,
    logger: @config.logger
  )

  @contact_center_insights_stub.stub_logger&.info do |entry|
    entry.set_system_name
    entry.set_service
    entry.message = "Created client for #{entry.service}"
    entry.set_credentials_fields credentials
    entry.set "customEndpoint", @config.endpoint if @config.endpoint
    entry.set "defaultTimeout", @config.timeout if @config.timeout
    entry.set "quotaProject", @quota_project_id if @quota_project_id
  end

  @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @contact_center_insights_stub.endpoint
    config.universe_domain = @contact_center_insights_stub.universe_domain
    config.logger = @contact_center_insights_stub.logger if config.respond_to? :logger=
  end
end

Instance Attribute Details

#iam_policy_clientGoogle::Iam::V1::IAMPolicy::Client (readonly)

Get the associated client for mix-in of the IAMPolicy.

Returns:

  • (Google::Iam::V1::IAMPolicy::Client)


208
209
210
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 208

def iam_policy_client
  @iam_policy_client
end

#operations_client::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Operations (readonly)

Get the associated client for long-running operations.



201
202
203
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 201

def operations_client
  @operations_client
end

Class Method Details

.configure {|config| ... } ⇒ Client::Configuration

Configure the ContactCenterInsights Client class.

See Configuration for a description of the configuration fields.

Examples:


# Modify the configuration for all ContactCenterInsights clients
::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.configure do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 63

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

Instance Method Details

#bulk_analyze_conversations(request, options = nil) ⇒ ::Gapic::Operation #bulk_analyze_conversations(parent: nil, filter: nil, analysis_percentage: nil, annotator_selector: nil) ⇒ ::Gapic::Operation

Analyzes multiple conversations in a single request.

Examples:

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

Overloads:

  • #bulk_analyze_conversations(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to bulk_analyze_conversations via a request object, either of type BulkAnalyzeConversationsRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #bulk_analyze_conversations(parent: nil, filter: nil, analysis_percentage: nil, annotator_selector: nil) ⇒ ::Gapic::Operation

    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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent resource to create analyses in.

    • filter (::String) (defaults to: nil)

      Required. Filter used to select the subset of conversations to analyze.

    • analysis_percentage (::Float) (defaults to: nil)

      Required. Percentage of selected conversation to analyze, between [0, 100].

    • annotator_selector (::Google::Cloud::ContactCenterInsights::V1::AnnotatorSelector, ::Hash) (defaults to: nil)

      To select the annotators to run and the phrase matchers to use (if any). If not specified, all annotators will be run.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 1254

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
   = @config.rpcs.bulk_analyze_conversations..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.bulk_analyze_conversations.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.bulk_analyze_conversations.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#bulk_delete_conversations(request, options = nil) ⇒ ::Gapic::Operation #bulk_delete_conversations(parent: nil, filter: nil, max_delete_count: nil, force: nil) ⇒ ::Gapic::Operation

Deletes multiple conversations in a single request.

Examples:

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

Overloads:

  • #bulk_delete_conversations(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to bulk_delete_conversations via a request object, either of type BulkDeleteConversationsRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #bulk_delete_conversations(parent: nil, filter: nil, max_delete_count: nil, force: nil) ⇒ ::Gapic::Operation

    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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent resource to delete conversations from. Format: projects/{project}/locations/{location}

    • filter (::String) (defaults to: nil)

      Filter used to select the subset of conversations to delete.

    • max_delete_count (::Integer) (defaults to: nil)

      Maximum number of conversations to delete.

    • force (::Boolean) (defaults to: nil)

      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.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 1358

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
   = @config.rpcs.bulk_delete_conversations..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.bulk_delete_conversations.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.bulk_delete_conversations.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#bulk_download_feedback_labels(request, options = nil) ⇒ ::Gapic::Operation #bulk_download_feedback_labels(gcs_destination: nil, parent: nil, filter: nil, max_download_count: nil, feedback_label_type: nil, conversation_filter: nil, template_qa_scorecard_id: nil) ⇒ ::Gapic::Operation

Download feedback labels in bulk.

Examples:

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::BulkDownloadFeedbackLabelsRequest.new

# Call the bulk_download_feedback_labels method.
result = client.bulk_download_feedback_labels 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

Overloads:

  • #bulk_download_feedback_labels(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to bulk_download_feedback_labels via a request object, either of type BulkDownloadFeedbackLabelsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::ContactCenterInsights::V1::BulkDownloadFeedbackLabelsRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #bulk_download_feedback_labels(gcs_destination: nil, parent: nil, filter: nil, max_download_count: nil, feedback_label_type: nil, conversation_filter: nil, template_qa_scorecard_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to bulk_download_feedback_labels 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).

    Parameters:

    • gcs_destination (::Google::Cloud::ContactCenterInsights::V1::BulkDownloadFeedbackLabelsRequest::GcsDestination, ::Hash) (defaults to: nil)

      A cloud storage bucket destination.

    • parent (::String) (defaults to: nil)

      Required. The parent resource for new feedback labels.

    • filter (::String) (defaults to: nil)

      Optional. A filter to reduce results to a specific subset. Supports disjunctions (OR) and conjunctions (AND).

      Supported fields:

      • issue_model_id
      • qa_question_id
      • qa_scorecard_id
      • min_create_time
      • max_create_time
      • min_update_time
      • max_update_time
      • feedback_label_type: QUALITY_AI, TOPIC_MODELING
    • max_download_count (::Integer) (defaults to: nil)

      Optional. Limits the maximum number of feedback labels that will be downloaded. The first N feedback labels will be downloaded.

    • feedback_label_type (::Google::Cloud::ContactCenterInsights::V1::BulkDownloadFeedbackLabelsRequest::FeedbackLabelType) (defaults to: nil)

      Optional. The type of feedback labels that will be downloaded.

    • conversation_filter (::String) (defaults to: nil)

      Optional. Filter parent conversations to download feedback labels for. When specified, the feedback labels will be downloaded for the conversations that match the filter. If template_qa_scorecard_id is set, all the conversations that match the filter will be paired with the questions under the scorecard for labeling.

    • template_qa_scorecard_id (::Array<::String>) (defaults to: nil)

      Optional. If set, a template for labeling conversations and scorecard questions will be created from the conversation_filter and the questions under the scorecard(s). The feedback label filter will be ignored.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 7115

def bulk_download_feedback_labels request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::BulkDownloadFeedbackLabelsRequest

  # 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
   = @config.rpcs.bulk_download_feedback_labels..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.bulk_download_feedback_labels.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.bulk_download_feedback_labels.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @contact_center_insights_stub.call_rpc :bulk_download_feedback_labels, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#bulk_upload_feedback_labels(request, options = nil) ⇒ ::Gapic::Operation #bulk_upload_feedback_labels(gcs_source: nil, parent: nil, validate_only: nil) ⇒ ::Gapic::Operation

Upload feedback labels in bulk.

Examples:

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::BulkUploadFeedbackLabelsRequest.new

# Call the bulk_upload_feedback_labels method.
result = client.bulk_upload_feedback_labels 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

Overloads:

  • #bulk_upload_feedback_labels(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to bulk_upload_feedback_labels via a request object, either of type BulkUploadFeedbackLabelsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::ContactCenterInsights::V1::BulkUploadFeedbackLabelsRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #bulk_upload_feedback_labels(gcs_source: nil, parent: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to bulk_upload_feedback_labels 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).

    Parameters:

    • gcs_source (::Google::Cloud::ContactCenterInsights::V1::BulkUploadFeedbackLabelsRequest::GcsSource, ::Hash) (defaults to: nil)

      A cloud storage bucket source.

    • parent (::String) (defaults to: nil)

      Required. The parent resource for new feedback labels.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. If set, upload will not happen and the labels will be validated. If not set, then default behavior will be to upload the labels after validation is complete.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 6990

def bulk_upload_feedback_labels request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::BulkUploadFeedbackLabelsRequest

  # 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
   = @config.rpcs.bulk_upload_feedback_labels..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.bulk_upload_feedback_labels.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.bulk_upload_feedback_labels.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @contact_center_insights_stub.call_rpc :bulk_upload_feedback_labels, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#calculate_issue_model_stats(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsResponse #calculate_issue_model_stats(issue_model: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsResponse

Gets an issue model's statistics.

Examples:

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

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 2838

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
   = @config.rpcs.calculate_issue_model_stats..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.calculate_issue_model_stats.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.calculate_issue_model_stats.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#calculate_stats(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::CalculateStatsResponse #calculate_stats(location: nil, filter: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::CalculateStatsResponse

Gets conversation statistics.

Examples:

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

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 3376

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
   = @config.rpcs.calculate_stats..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.calculate_stats.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.calculate_stats.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#configure {|config| ... } ⇒ Client::Configuration

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 configure.

See Configuration for a description of the configuration fields.

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



100
101
102
103
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 100

def configure
  yield @config if block_given?
  @config
end

#create_analysis(request, options = nil) ⇒ ::Gapic::Operation #create_analysis(parent: nil, analysis: nil) ⇒ ::Gapic::Operation

Creates an analysis. The long running operation is done when the analysis has completed.

Examples:

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

Overloads:

  • #create_analysis(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_analysis via a request object, either of type Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_analysis(parent: nil, analysis: nil) ⇒ ::Gapic::Operation

    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).

    Parameters:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 879

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
   = @config.rpcs.create_analysis..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_analysis.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_analysis.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_analysis_rule(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::AnalysisRule #create_analysis_rule(parent: nil, analysis_rule: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::AnalysisRule

Creates a analysis rule.

Examples:

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::CreateAnalysisRuleRequest.new

# Call the create_analysis_rule method.
result = client.create_analysis_rule request

# The returned object is of type Google::Cloud::ContactCenterInsights::V1::AnalysisRule.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 3638

def create_analysis_rule request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRuleRequest

  # 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
   = @config.rpcs.create_analysis_rule..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_analysis_rule.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_analysis_rule.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @contact_center_insights_stub.call_rpc :create_analysis_rule, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_conversation(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::Conversation #create_conversation(parent: nil, conversation: nil, conversation_id: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::Conversation

Creates a conversation. Note that this method does not support audio transcription or redaction. Use conversations.upload instead.

Examples:

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

Overloads:

  • #create_conversation(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::Conversation

    Pass arguments to create_conversation via a request object, either of type Google::Cloud::ContactCenterInsights::V1::CreateConversationRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_conversation(parent: nil, conversation: nil, conversation_id: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::Conversation

    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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent resource of the conversation.

    • conversation (::Google::Cloud::ContactCenterInsights::V1::Conversation, ::Hash) (defaults to: nil)

      Required. The conversation resource to create.

    • conversation_id (::String) (defaults to: nil)

      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]-

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 276

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
   = @config.rpcs.create_conversation..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_conversation.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_conversation.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_feedback_label(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::FeedbackLabel #create_feedback_label(parent: nil, feedback_label_id: nil, feedback_label: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::FeedbackLabel

Create feedback label.

Examples:

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::CreateFeedbackLabelRequest.new

# Call the create_feedback_label method.
result = client.create_feedback_label request

# The returned object is of type Google::Cloud::ContactCenterInsights::V1::FeedbackLabel.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 6405

def create_feedback_label request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreateFeedbackLabelRequest

  # 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
   = @config.rpcs.create_feedback_label..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_feedback_label.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_feedback_label.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @contact_center_insights_stub.call_rpc :create_feedback_label, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_issue_model(request, options = nil) ⇒ ::Gapic::Operation #create_issue_model(parent: nil, issue_model: nil) ⇒ ::Gapic::Operation

Creates an issue model.

Examples:

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

Overloads:

  • #create_issue_model(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_issue_model via a request object, either of type Google::Cloud::ContactCenterInsights::V1::CreateIssueModelRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_issue_model(parent: nil, issue_model: nil) ⇒ ::Gapic::Operation

    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).

    Parameters:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 1672

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
   = @config.rpcs.create_issue_model..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_issue_model.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_issue_model.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_phrase_matcher(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher #create_phrase_matcher(parent: nil, phrase_matcher: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher

Creates a phrase matcher.

Examples:

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

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 2928

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
   = @config.rpcs.create_phrase_matcher..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_phrase_matcher.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_phrase_matcher.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_qa_question(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::QaQuestion #create_qa_question(parent: nil, qa_question: nil, qa_question_id: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::QaQuestion

Create a QaQuestion.

Examples:

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::CreateQaQuestionRequest.new

# Call the create_qa_question method.
result = client.create_qa_question request

# The returned object is of type Google::Cloud::ContactCenterInsights::V1::QaQuestion.
p result

Overloads:

  • #create_qa_question(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::QaQuestion

    Pass arguments to create_qa_question via a request object, either of type Google::Cloud::ContactCenterInsights::V1::CreateQaQuestionRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::ContactCenterInsights::V1::CreateQaQuestionRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_qa_question(parent: nil, qa_question: nil, qa_question_id: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::QaQuestion

    Pass arguments to create_qa_question 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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent resource of the QaQuestion.

    • qa_question (::Google::Cloud::ContactCenterInsights::V1::QaQuestion, ::Hash) (defaults to: nil)

      Required. The QaQuestion to create.

    • qa_question_id (::String) (defaults to: nil)

      Optional. A unique ID for the new question. This ID will become the final component of the question's resource name. If no ID is specified, a server-generated ID will be used.

      This value should be 4-64 characters and must match the regular expression ^[a-z0-9-]{4,64}$. Valid characters are [a-z][0-9]-.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 4841

def create_qa_question request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreateQaQuestionRequest

  # 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
   = @config.rpcs.create_qa_question..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_qa_question.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_qa_question.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @contact_center_insights_stub.call_rpc :create_qa_question, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_qa_scorecard(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::QaScorecard #create_qa_scorecard(parent: nil, qa_scorecard: nil, qa_scorecard_id: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::QaScorecard

Create a QaScorecard.

Examples:

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::CreateQaScorecardRequest.new

# Call the create_qa_scorecard method.
result = client.create_qa_scorecard request

# The returned object is of type Google::Cloud::ContactCenterInsights::V1::QaScorecard.
p result

Overloads:

  • #create_qa_scorecard(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::QaScorecard

    Pass arguments to create_qa_scorecard via a request object, either of type Google::Cloud::ContactCenterInsights::V1::CreateQaScorecardRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::ContactCenterInsights::V1::CreateQaScorecardRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_qa_scorecard(parent: nil, qa_scorecard: nil, qa_scorecard_id: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::QaScorecard

    Pass arguments to create_qa_scorecard 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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent resource of the QaScorecard.

    • qa_scorecard (::Google::Cloud::ContactCenterInsights::V1::QaScorecard, ::Hash) (defaults to: nil)

      Required. The QaScorecard to create.

    • qa_scorecard_id (::String) (defaults to: nil)

      Optional. A unique ID for the new QaScorecard. This ID will become the final component of the QaScorecard's resource name. If no ID is specified, a server-generated ID will be used.

      This value should be 4-64 characters and must match the regular expression ^[a-z0-9-]{4,64}$. Valid characters are [a-z][0-9]-.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 5301

def create_qa_scorecard request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreateQaScorecardRequest

  # 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
   = @config.rpcs.create_qa_scorecard..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_qa_scorecard.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_qa_scorecard.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @contact_center_insights_stub.call_rpc :create_qa_scorecard, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_qa_scorecard_revision(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::QaScorecardRevision #create_qa_scorecard_revision(parent: nil, qa_scorecard_revision: nil, qa_scorecard_revision_id: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::QaScorecardRevision

Creates a QaScorecardRevision.

Examples:

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::CreateQaScorecardRevisionRequest.new

# Call the create_qa_scorecard_revision method.
result = client.create_qa_scorecard_revision request

# The returned object is of type Google::Cloud::ContactCenterInsights::V1::QaScorecardRevision.
p result

Overloads:

  • #create_qa_scorecard_revision(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::QaScorecardRevision

    Pass arguments to create_qa_scorecard_revision via a request object, either of type Google::Cloud::ContactCenterInsights::V1::CreateQaScorecardRevisionRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::ContactCenterInsights::V1::CreateQaScorecardRevisionRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_qa_scorecard_revision(parent: nil, qa_scorecard_revision: nil, qa_scorecard_revision_id: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::QaScorecardRevision

    Pass arguments to create_qa_scorecard_revision 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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent resource of the QaScorecardRevision.

    • qa_scorecard_revision (::Google::Cloud::ContactCenterInsights::V1::QaScorecardRevision, ::Hash) (defaults to: nil)

      Required. The QaScorecardRevision to create.

    • qa_scorecard_revision_id (::String) (defaults to: nil)

      Optional. A unique ID for the new QaScorecardRevision. This ID will become the final component of the QaScorecardRevision's resource name. If no ID is specified, a server-generated ID will be used.

      This value should be 4-64 characters and must match the regular expression ^[a-z0-9-]{4,64}$. Valid characters are [a-z][0-9]-.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 5760

def create_qa_scorecard_revision request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreateQaScorecardRevisionRequest

  # 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
   = @config.rpcs.create_qa_scorecard_revision..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_qa_scorecard_revision.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_qa_scorecard_revision.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @contact_center_insights_stub.call_rpc :create_qa_scorecard_revision, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_view(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::View #create_view(parent: nil, view: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::View

Creates a view.

Examples:

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

Overloads:

  • #create_view(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::View

    Pass arguments to create_view via a request object, either of type Google::Cloud::ContactCenterInsights::V1::CreateViewRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_view(parent: nil, view: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::View

    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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent resource of the view. Required. The location to create a view for. Format: projects/<Project ID>/locations/<Location ID> or projects/<Project Number>/locations/<Location ID>

    • view (::Google::Cloud::ContactCenterInsights::V1::View, ::Hash) (defaults to: nil)

      Required. The view resource to create.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 4273

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
   = @config.rpcs.create_view..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_view.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_view.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_analysis(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_analysis(name: nil) ⇒ ::Google::Protobuf::Empty

Deletes an analysis.

Examples:

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

Overloads:

  • #delete_analysis(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_analysis via a request object, either of type DeleteAnalysisRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_analysis(name: nil) ⇒ ::Google::Protobuf::Empty

    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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the analysis to delete.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 1154

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
   = @config.rpcs.delete_analysis..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_analysis.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_analysis.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_analysis_rule(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_analysis_rule(name: nil) ⇒ ::Google::Protobuf::Empty

Deletes a analysis rule.

Examples:

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::DeleteAnalysisRuleRequest.new

# Call the delete_analysis_rule method.
result = client.delete_analysis_rule request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_analysis_rule(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_analysis_rule via a request object, either of type DeleteAnalysisRuleRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRuleRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_analysis_rule(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_analysis_rule 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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the analysis rule to delete.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 3997

def delete_analysis_rule request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRuleRequest

  # 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
   = @config.rpcs.delete_analysis_rule..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_analysis_rule.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_analysis_rule.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @contact_center_insights_stub.call_rpc :delete_analysis_rule, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_conversation(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_conversation(name: nil, force: nil) ⇒ ::Google::Protobuf::Empty

Deletes a conversation.

Examples:

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

Overloads:

  • #delete_conversation(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_conversation via a request object, either of type DeleteConversationRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_conversation(name: nil, force: nil) ⇒ ::Google::Protobuf::Empty

    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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the conversation to delete.

    • force (::Boolean) (defaults to: nil)

      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.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 784

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
   = @config.rpcs.delete_conversation..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_conversation.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_conversation.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_feedback_label(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_feedback_label(name: nil) ⇒ ::Google::Protobuf::Empty

Delete feedback label.

Examples:

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::DeleteFeedbackLabelRequest.new

# Call the delete_feedback_label method.
result = client.delete_feedback_label request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_feedback_label(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_feedback_label via a request object, either of type DeleteFeedbackLabelRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::ContactCenterInsights::V1::DeleteFeedbackLabelRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_feedback_label(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_feedback_label 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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the feedback label to delete.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 6778

def delete_feedback_label request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteFeedbackLabelRequest

  # 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
   = @config.rpcs.delete_feedback_label..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_feedback_label.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_feedback_label.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @contact_center_insights_stub.call_rpc :delete_feedback_label, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_issue(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_issue(name: nil) ⇒ ::Google::Protobuf::Empty

Deletes an issue.

Examples:

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

Overloads:

  • #delete_issue(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_issue via a request object, either of type DeleteIssueRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_issue(name: nil) ⇒ ::Google::Protobuf::Empty

    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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the issue to delete.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 2753

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
   = @config.rpcs.delete_issue..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_issue.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_issue.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_issue_model(request, options = nil) ⇒ ::Gapic::Operation #delete_issue_model(name: nil) ⇒ ::Gapic::Operation

Deletes an issue model.

Examples:

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

Overloads:

  • #delete_issue_model(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_issue_model via a request object, either of type DeleteIssueModelRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_issue_model(name: nil) ⇒ ::Gapic::Operation

    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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the issue model to delete.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 2023

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
   = @config.rpcs.delete_issue_model..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_issue_model.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_issue_model.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_phrase_matcher(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_phrase_matcher(name: nil) ⇒ ::Google::Protobuf::Empty

Deletes a phrase matcher.

Examples:

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

Overloads:

  • #delete_phrase_matcher(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_phrase_matcher via a request object, either of type DeletePhraseMatcherRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_phrase_matcher(name: nil) ⇒ ::Google::Protobuf::Empty

    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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the phrase matcher to delete.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 3201

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
   = @config.rpcs.delete_phrase_matcher..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_phrase_matcher.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_phrase_matcher.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_qa_question(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_qa_question(name: nil) ⇒ ::Google::Protobuf::Empty

Deletes a QaQuestion.

Examples:

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::DeleteQaQuestionRequest.new

# Call the delete_qa_question method.
result = client.delete_qa_question request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_qa_question(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_qa_question via a request object, either of type DeleteQaQuestionRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::ContactCenterInsights::V1::DeleteQaQuestionRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_qa_question(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_qa_question 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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the QaQuestion to delete.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 5107

def delete_qa_question request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteQaQuestionRequest

  # 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
   = @config.rpcs.delete_qa_question..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_qa_question.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_qa_question.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @contact_center_insights_stub.call_rpc :delete_qa_question, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_qa_scorecard(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_qa_scorecard(name: nil, force: nil) ⇒ ::Google::Protobuf::Empty

Deletes a QaScorecard.

Examples:

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::DeleteQaScorecardRequest.new

# Call the delete_qa_scorecard method.
result = client.delete_qa_scorecard request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_qa_scorecard(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_qa_scorecard via a request object, either of type DeleteQaScorecardRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::ContactCenterInsights::V1::DeleteQaScorecardRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_qa_scorecard(name: nil, force: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_qa_scorecard 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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the QaScorecard to delete.

    • force (::Boolean) (defaults to: nil)

      Optional. If set to true, all of this QaScorecard's child resources will also be deleted. Otherwise, the request will only succeed if it has none.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 5566

def delete_qa_scorecard request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteQaScorecardRequest

  # 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
   = @config.rpcs.delete_qa_scorecard..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_qa_scorecard.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_qa_scorecard.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @contact_center_insights_stub.call_rpc :delete_qa_scorecard, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_qa_scorecard_revision(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_qa_scorecard_revision(name: nil, force: nil) ⇒ ::Google::Protobuf::Empty

Deletes a QaScorecardRevision.

Examples:

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::DeleteQaScorecardRevisionRequest.new

# Call the delete_qa_scorecard_revision method.
result = client.delete_qa_scorecard_revision request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_qa_scorecard_revision(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_qa_scorecard_revision via a request object, either of type DeleteQaScorecardRevisionRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::ContactCenterInsights::V1::DeleteQaScorecardRevisionRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_qa_scorecard_revision(name: nil, force: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_qa_scorecard_revision 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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the QaScorecardRevision to delete.

    • force (::Boolean) (defaults to: nil)

      Optional. If set to true, all of this QaScorecardRevision's child resources will also be deleted. Otherwise, the request will only succeed if it has none.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 6209

def delete_qa_scorecard_revision request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteQaScorecardRevisionRequest

  # 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
   = @config.rpcs.delete_qa_scorecard_revision..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_qa_scorecard_revision.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_qa_scorecard_revision.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @contact_center_insights_stub.call_rpc :delete_qa_scorecard_revision, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_view(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_view(name: nil) ⇒ ::Google::Protobuf::Empty

Deletes a view.

Examples:

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

Overloads:

  • #delete_view(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_view via a request object, either of type DeleteViewRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_view(name: nil) ⇒ ::Google::Protobuf::Empty

    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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the view to delete.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 4630

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
   = @config.rpcs.delete_view..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_view.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_view.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#deploy_issue_model(request, options = nil) ⇒ ::Gapic::Operation #deploy_issue_model(name: nil) ⇒ ::Gapic::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.

Examples:

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

Overloads:

  • #deploy_issue_model(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to deploy_issue_model via a request object, either of type DeployIssueModelRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #deploy_issue_model(name: nil) ⇒ ::Gapic::Operation

    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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The issue model to deploy.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 2118

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
   = @config.rpcs.deploy_issue_model..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.deploy_issue_model.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.deploy_issue_model.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#deploy_qa_scorecard_revision(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::QaScorecardRevision #deploy_qa_scorecard_revision(name: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::QaScorecardRevision

Deploy a QaScorecardRevision.

Examples:

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::DeployQaScorecardRevisionRequest.new

# Call the deploy_qa_scorecard_revision method.
result = client.deploy_qa_scorecard_revision request

# The returned object is of type Google::Cloud::ContactCenterInsights::V1::QaScorecardRevision.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 6035

def deploy_qa_scorecard_revision request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeployQaScorecardRevisionRequest

  # 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
   = @config.rpcs.deploy_qa_scorecard_revision..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.deploy_qa_scorecard_revision.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.deploy_qa_scorecard_revision.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @contact_center_insights_stub.call_rpc :deploy_qa_scorecard_revision, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#export_insights_data(request, options = nil) ⇒ ::Gapic::Operation #export_insights_data(big_query_destination: nil, parent: nil, filter: nil, kms_key: nil, write_disposition: nil) ⇒ ::Gapic::Operation

Export insights data to a destination defined in the request body.

Examples:

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

Overloads:

  • #export_insights_data(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to export_insights_data via a request object, either of type ExportInsightsDataRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #export_insights_data(big_query_destination: nil, parent: nil, filter: nil, kms_key: nil, write_disposition: nil) ⇒ ::Gapic::Operation

    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).

    Parameters:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 1576

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
   = @config.rpcs.export_insights_data..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.export_insights_data.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.export_insights_data.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#export_issue_model(request, options = nil) ⇒ ::Gapic::Operation #export_issue_model(gcs_destination: nil, name: nil) ⇒ ::Gapic::Operation

Exports an issue model to the provided destination.

Examples:

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

Overloads:

  • #export_issue_model(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to export_issue_model via a request object, either of type ExportIssueModelRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #export_issue_model(gcs_destination: nil, name: nil) ⇒ ::Gapic::Operation

    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).

    Parameters:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 2309

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
   = @config.rpcs.export_issue_model..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.export_issue_model.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.export_issue_model.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_analysis(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::Analysis #get_analysis(name: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::Analysis

Gets an analysis.

Examples:

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

Overloads:

  • #get_analysis(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::Analysis

    Pass arguments to get_analysis via a request object, either of type GetAnalysisRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_analysis(name: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::Analysis

    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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the analysis to get.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 966

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
   = @config.rpcs.get_analysis..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_analysis.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_analysis.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_analysis_rule(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::AnalysisRule #get_analysis_rule(name: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::AnalysisRule

Get a analysis rule.

Examples:

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::GetAnalysisRuleRequest.new

# Call the get_analysis_rule method.
result = client.get_analysis_rule request

# The returned object is of type Google::Cloud::ContactCenterInsights::V1::AnalysisRule.
p result

Overloads:

  • #get_analysis_rule(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::AnalysisRule

    Pass arguments to get_analysis_rule via a request object, either of type GetAnalysisRuleRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::ContactCenterInsights::V1::GetAnalysisRuleRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_analysis_rule(name: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::AnalysisRule

    Pass arguments to get_analysis_rule 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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the AnalysisRule to get.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 3723

def get_analysis_rule request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetAnalysisRuleRequest

  # 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
   = @config.rpcs.get_analysis_rule..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_analysis_rule.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_analysis_rule.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @contact_center_insights_stub.call_rpc :get_analysis_rule, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_conversation(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::Conversation #get_conversation(name: nil, view: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::Conversation

Gets a conversation.

Examples:

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

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 574

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
   = @config.rpcs.get_conversation..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_conversation.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_conversation.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_encryption_spec(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::EncryptionSpec #get_encryption_spec(name: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::EncryptionSpec

Gets location-level encryption key specification.

Examples:

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

Overloads:

  • #get_encryption_spec(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::EncryptionSpec

    Pass arguments to get_encryption_spec via a request object, either of type GetEncryptionSpecRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_encryption_spec(name: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::EncryptionSpec

    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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the encryption spec resource to get.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 4082

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
   = @config.rpcs.get_encryption_spec..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_encryption_spec.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_encryption_spec.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_feedback_label(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::FeedbackLabel #get_feedback_label(name: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::FeedbackLabel

Get feedback label.

Examples:

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::GetFeedbackLabelRequest.new

# Call the get_feedback_label method.
result = client.get_feedback_label request

# The returned object is of type Google::Cloud::ContactCenterInsights::V1::FeedbackLabel.
p result

Overloads:

  • #get_feedback_label(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::FeedbackLabel

    Pass arguments to get_feedback_label via a request object, either of type GetFeedbackLabelRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::ContactCenterInsights::V1::GetFeedbackLabelRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_feedback_label(name: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::FeedbackLabel

    Pass arguments to get_feedback_label 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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the feedback label to get.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 6606

def get_feedback_label request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetFeedbackLabelRequest

  # 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
   = @config.rpcs.get_feedback_label..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_feedback_label.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_feedback_label.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @contact_center_insights_stub.call_rpc :get_feedback_label, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_issue(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::Issue #get_issue(name: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::Issue

Gets an issue.

Examples:

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

Overloads:

  • #get_issue(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::Issue

    Pass arguments to get_issue via a request object, either of type GetIssueRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_issue(name: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::Issue

    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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the issue to get.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 2496

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
   = @config.rpcs.get_issue..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_issue.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_issue.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_issue_model(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::IssueModel #get_issue_model(name: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::IssueModel

Gets an issue model.

Examples:

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

Overloads:

  • #get_issue_model(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::IssueModel

    Pass arguments to get_issue_model via a request object, either of type GetIssueModelRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_issue_model(name: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::IssueModel

    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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the issue model to get.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 1846

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
   = @config.rpcs.get_issue_model..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_issue_model.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_issue_model.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_phrase_matcher(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher #get_phrase_matcher(name: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher

Gets a phrase matcher.

Examples:

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

Overloads:

  • #get_phrase_matcher(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher

    Pass arguments to get_phrase_matcher via a request object, either of type GetPhraseMatcherRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_phrase_matcher(name: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher

    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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the phrase matcher to get.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 3013

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
   = @config.rpcs.get_phrase_matcher..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_phrase_matcher.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_phrase_matcher.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_qa_question(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::QaQuestion #get_qa_question(name: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::QaQuestion

Gets a QaQuestion.

Examples:

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::GetQaQuestionRequest.new

# Call the get_qa_question method.
result = client.get_qa_question request

# The returned object is of type Google::Cloud::ContactCenterInsights::V1::QaQuestion.
p result

Overloads:

  • #get_qa_question(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::QaQuestion

    Pass arguments to get_qa_question via a request object, either of type GetQaQuestionRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::ContactCenterInsights::V1::GetQaQuestionRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_qa_question(name: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::QaQuestion

    Pass arguments to get_qa_question 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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the QaQuestion to get.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 4926

def get_qa_question request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetQaQuestionRequest

  # 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
   = @config.rpcs.get_qa_question..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_qa_question.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_qa_question.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @contact_center_insights_stub.call_rpc :get_qa_question, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_qa_scorecard(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::QaScorecard #get_qa_scorecard(name: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::QaScorecard

Gets a QaScorecard.

Examples:

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::GetQaScorecardRequest.new

# Call the get_qa_scorecard method.
result = client.get_qa_scorecard request

# The returned object is of type Google::Cloud::ContactCenterInsights::V1::QaScorecard.
p result

Overloads:

  • #get_qa_scorecard(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::QaScorecard

    Pass arguments to get_qa_scorecard via a request object, either of type GetQaScorecardRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::ContactCenterInsights::V1::GetQaScorecardRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_qa_scorecard(name: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::QaScorecard

    Pass arguments to get_qa_scorecard 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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the QaScorecard to get.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 5386

def get_qa_scorecard request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetQaScorecardRequest

  # 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
   = @config.rpcs.get_qa_scorecard..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_qa_scorecard.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_qa_scorecard.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @contact_center_insights_stub.call_rpc :get_qa_scorecard, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_qa_scorecard_revision(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::QaScorecardRevision #get_qa_scorecard_revision(name: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::QaScorecardRevision

Gets a QaScorecardRevision.

Examples:

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::GetQaScorecardRevisionRequest.new

# Call the get_qa_scorecard_revision method.
result = client.get_qa_scorecard_revision request

# The returned object is of type Google::Cloud::ContactCenterInsights::V1::QaScorecardRevision.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 5845

def get_qa_scorecard_revision request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetQaScorecardRevisionRequest

  # 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
   = @config.rpcs.get_qa_scorecard_revision..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_qa_scorecard_revision.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_qa_scorecard_revision.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @contact_center_insights_stub.call_rpc :get_qa_scorecard_revision, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_settings(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::Settings #get_settings(name: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::Settings

Gets project-level settings.

Examples:

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

Overloads:

  • #get_settings(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::Settings

    Pass arguments to get_settings via a request object, either of type GetSettingsRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_settings(name: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::Settings

    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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the settings resource to get.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 3461

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
   = @config.rpcs.get_settings..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_settings.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_settings.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_view(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::View #get_view(name: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::View

Gets a view.

Examples:

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

Overloads:

  • #get_view(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::View

    Pass arguments to get_view via a request object, either of type GetViewRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_view(name: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::View

    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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the view to get.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 4358

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
   = @config.rpcs.get_view..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_view.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_view.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#import_issue_model(request, options = nil) ⇒ ::Gapic::Operation #import_issue_model(gcs_source: nil, parent: nil, create_new_model: nil) ⇒ ::Gapic::Operation

Imports an issue model from a Cloud Storage bucket.

Examples:

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

Overloads:

  • #import_issue_model(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to import_issue_model via a request object, either of type ImportIssueModelRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #import_issue_model(gcs_source: nil, parent: nil, create_new_model: nil) ⇒ ::Gapic::Operation

    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).

    Parameters:

    • gcs_source (::Google::Cloud::ContactCenterInsights::V1::ImportIssueModelRequest::GcsSource, ::Hash) (defaults to: nil)

      Google Cloud Storage source message.

    • parent (::String) (defaults to: nil)

      Required. The parent resource of the issue model.

    • create_new_model (::Boolean) (defaults to: nil)

      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.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 2409

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
   = @config.rpcs.import_issue_model..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.import_issue_model.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.import_issue_model.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#ingest_conversations(request, options = nil) ⇒ ::Gapic::Operation #ingest_conversations(gcs_source: nil, transcript_object_config: nil, parent: nil, conversation_config: nil, redaction_config: nil, speech_config: nil, sample_size: nil) ⇒ ::Gapic::Operation

Imports conversations and processes them according to the user's configuration.

Examples:

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

Overloads:

  • #ingest_conversations(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to ingest_conversations via a request object, either of type IngestConversationsRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #ingest_conversations(gcs_source: nil, transcript_object_config: nil, parent: nil, conversation_config: nil, redaction_config: nil, speech_config: nil, sample_size: nil) ⇒ ::Gapic::Operation

    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).

    Parameters:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 1471

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
   = @config.rpcs.ingest_conversations..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.ingest_conversations.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.ingest_conversations.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#initialize_encryption_spec(request, options = nil) ⇒ ::Gapic::Operation #initialize_encryption_spec(encryption_spec: nil) ⇒ ::Gapic::Operation

Initializes a location-level encryption key specification. An error will result if the location has resources already created before the initialization. After the encryption specification is initialized at a location, it is immutable and all newly created resources under the location will be encrypted with the existing specification.

Examples:

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

Overloads:

  • #initialize_encryption_spec(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to initialize_encryption_spec via a request object, either of type InitializeEncryptionSpecRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #initialize_encryption_spec(encryption_spec: nil) ⇒ ::Gapic::Operation

    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).

    Parameters:

    • encryption_spec (::Google::Cloud::ContactCenterInsights::V1::EncryptionSpec, ::Hash) (defaults to: nil)

      Required. The encryption spec used for CMEK encryption. It is required that the kms key is in the same region as the endpoint. The same key will be used for all provisioned resources, if encryption is available. If the kms_key_name field is left empty, no encryption will be enforced.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 4181

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
   = @config.rpcs.initialize_encryption_spec..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.initialize_encryption_spec.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.initialize_encryption_spec.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_all_feedback_labels(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::FeedbackLabel> #list_all_feedback_labels(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::FeedbackLabel>

List all feedback labels by project number.

Examples:

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::ListAllFeedbackLabelsRequest.new

# Call the list_all_feedback_labels method.
result = client.list_all_feedback_labels 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::FeedbackLabel.
  p item
end

Overloads:

  • #list_all_feedback_labels(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::FeedbackLabel>

    Pass arguments to list_all_feedback_labels via a request object, either of type ListAllFeedbackLabelsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::ContactCenterInsights::V1::ListAllFeedbackLabelsRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_all_feedback_labels(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::FeedbackLabel>

    Pass arguments to list_all_feedback_labels 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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent resource of all feedback labels per project.

    • page_size (::Integer) (defaults to: nil)

      Optional. The maximum number of feedback labels to return in the response. A valid page size ranges from 0 to 100,000 inclusive. If the page size is zero or unspecified, a default page size of 100 will be chosen. Note that a call might return fewer results than the requested page size.

    • page_token (::String) (defaults to: nil)

      Optional. The value returned by the last ListAllFeedbackLabelsResponse. This value indicates that this is a continuation of a prior ListAllFeedbackLabels call and that the system should return the next page of data.

    • filter (::String) (defaults to: nil)

      Optional. A filter to reduce results to a specific subset in the entire project. Supports disjunctions (OR) and conjunctions (AND).

      Supported fields:

      • issue_model_id
      • qa_question_id
      • min_create_time
      • max_create_time
      • min_update_time
      • max_update_time
      • feedback_label_type: QUALITY_AI, TOPIC_MODELING

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 6890

def list_all_feedback_labels request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListAllFeedbackLabelsRequest

  # 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
   = @config.rpcs.list_all_feedback_labels..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_all_feedback_labels.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_all_feedback_labels.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @contact_center_insights_stub.call_rpc :list_all_feedback_labels, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @contact_center_insights_stub, :list_all_feedback_labels, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_analyses(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::Analysis> #list_analyses(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::Analysis>

Lists analyses.

Examples:

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

Overloads:

  • #list_analyses(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::Analysis>

    Pass arguments to list_analyses via a request object, either of type ListAnalysesRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_analyses(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::Analysis>

    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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent resource of the analyses.

    • page_size (::Integer) (defaults to: nil)

      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.

    • page_token (::String) (defaults to: nil)

      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.

    • filter (::String) (defaults to: nil)

      A filter to reduce results to a specific subset. Useful for querying conversations with specific properties.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 1067

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
   = @config.rpcs.list_analyses..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_analyses.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_analyses.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_analysis_rules(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::AnalysisRule> #list_analysis_rules(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::AnalysisRule>

Lists analysis rules.

Examples:

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::ListAnalysisRulesRequest.new

# Call the list_analysis_rules method.
result = client.list_analysis_rules 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::AnalysisRule.
  p item
end

Overloads:

  • #list_analysis_rules(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::AnalysisRule>

    Pass arguments to list_analysis_rules via a request object, either of type ListAnalysisRulesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::ContactCenterInsights::V1::ListAnalysisRulesRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_analysis_rules(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::AnalysisRule>

    Pass arguments to list_analysis_rules 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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent resource of the analysis rules.

    • page_size (::Integer) (defaults to: nil)

      Optional. The maximum number of analysis rule to return in the response. If this value is zero, the service will select a default size. A call may return fewer objects than requested. A non-empty next_page_token in the response indicates that more data is available.

    • page_token (::String) (defaults to: nil)

      Optional. The value returned by the last ListAnalysisRulesResponse; indicates that this is a continuation of a prior ListAnalysisRules call and the system should return the next page of data.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 3821

def list_analysis_rules request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListAnalysisRulesRequest

  # 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
   = @config.rpcs.list_analysis_rules..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_analysis_rules.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_analysis_rules.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @contact_center_insights_stub.call_rpc :list_analysis_rules, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @contact_center_insights_stub, :list_analysis_rules, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_conversations(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::Conversation> #list_conversations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::Conversation>

Lists conversations.

Examples:

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

Overloads:

  • #list_conversations(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::Conversation>

    Pass arguments to list_conversations via a request object, either of type ListConversationsRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_conversations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::Conversation>

    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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent resource of the conversation.

    • page_size (::Integer) (defaults to: nil)

      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.

    • page_token (::String) (defaults to: nil)

      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.

    • filter (::String) (defaults to: nil)

      A filter to reduce results to a specific subset. Useful for querying conversations with specific properties.

    • order_by (::String) (defaults to: nil)

      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.

    • view (::Google::Cloud::ContactCenterInsights::V1::ConversationView) (defaults to: nil)

      The level of details of the conversation. Default is BASIC.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 693

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
   = @config.rpcs.list_conversations..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_conversations.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_conversations.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_feedback_labels(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::FeedbackLabel> #list_feedback_labels(parent: nil, filter: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::FeedbackLabel>

List feedback labels.

Examples:

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::ListFeedbackLabelsRequest.new

# Call the list_feedback_labels method.
result = client.list_feedback_labels 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::FeedbackLabel.
  p item
end

Overloads:

  • #list_feedback_labels(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::FeedbackLabel>

    Pass arguments to list_feedback_labels via a request object, either of type ListFeedbackLabelsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::ContactCenterInsights::V1::ListFeedbackLabelsRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_feedback_labels(parent: nil, filter: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::FeedbackLabel>

    Pass arguments to list_feedback_labels 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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent resource of the feedback labels.

    • filter (::String) (defaults to: nil)

      Optional. A filter to reduce results to a specific subset. Supports disjunctions (OR) and conjunctions (AND). Automatically sorts by conversation ID. To sort by all feedback labels in a project see ListAllFeedbackLabels.

      Supported fields:

      • issue_model_id
      • qa_question_id
      • qa_scorecard_id
      • min_create_time
      • max_create_time
      • min_update_time
      • max_update_time
      • feedback_label_type: QUALITY_AI, TOPIC_MODELING
    • page_size (::Integer) (defaults to: nil)

      Optional. The maximum number of feedback labels to return in the response. A valid page size ranges from 0 to 100,000 inclusive. If the page size is zero or unspecified, a default page size of 100 will be chosen. Note that a call might return fewer results than the requested page size.

    • page_token (::String) (defaults to: nil)

      Optional. The value returned by the last ListFeedbackLabelsResponse. This value indicates that this is a continuation of a prior ListFeedbackLabels call and that the system should return the next page of data.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 6519

def list_feedback_labels request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListFeedbackLabelsRequest

  # 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
   = @config.rpcs.list_feedback_labels..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_feedback_labels.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_feedback_labels.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @contact_center_insights_stub.call_rpc :list_feedback_labels, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @contact_center_insights_stub, :list_feedback_labels, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_issue_models(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsResponse #list_issue_models(parent: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsResponse

Lists issue models.

Examples:

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

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 1931

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
   = @config.rpcs.list_issue_models..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_issue_models.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_issue_models.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_issues(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::ListIssuesResponse #list_issues(parent: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::ListIssuesResponse

Lists issues.

Examples:

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

Overloads:

  • #list_issues(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::ListIssuesResponse

    Pass arguments to list_issues via a request object, either of type ListIssuesRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_issues(parent: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::ListIssuesResponse

    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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent resource of the issue.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 2581

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
   = @config.rpcs.list_issues..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_issues.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_issues.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_phrase_matchers(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher> #list_phrase_matchers(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher>

Lists phrase matchers.

Examples:

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

Overloads:

  • #list_phrase_matchers(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher>

    Pass arguments to list_phrase_matchers via a request object, either of type ListPhraseMatchersRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_phrase_matchers(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher>

    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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent resource of the phrase matcher.

    • page_size (::Integer) (defaults to: nil)

      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.

    • page_token (::String) (defaults to: nil)

      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.

    • filter (::String) (defaults to: nil)

      A filter to reduce results to a specific subset. Useful for querying phrase matchers with specific properties.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 3114

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
   = @config.rpcs.list_phrase_matchers..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_phrase_matchers.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_phrase_matchers.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_qa_questions(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::QaQuestion> #list_qa_questions(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::QaQuestion>

Lists QaQuestions.

Examples:

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::ListQaQuestionsRequest.new

# Call the list_qa_questions method.
result = client.list_qa_questions 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::QaQuestion.
  p item
end

Overloads:

  • #list_qa_questions(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::QaQuestion>

    Pass arguments to list_qa_questions via a request object, either of type ListQaQuestionsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::ContactCenterInsights::V1::ListQaQuestionsRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_qa_questions(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::QaQuestion>

    Pass arguments to list_qa_questions 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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent resource of the questions.

    • page_size (::Integer) (defaults to: nil)

      Optional. The maximum number of questions to return in the response. If the value is zero, the service will select a default size. A call might return fewer objects than requested. A non-empty next_page_token in the response indicates that more data is available.

    • page_token (::String) (defaults to: nil)

      Optional. The value returned by the last ListQaQuestionsResponse. This value indicates that this is a continuation of a prior ListQaQuestions call and that the system should return the next page of data.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 5205

def list_qa_questions request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListQaQuestionsRequest

  # 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
   = @config.rpcs.list_qa_questions..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_qa_questions.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_qa_questions.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @contact_center_insights_stub.call_rpc :list_qa_questions, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @contact_center_insights_stub, :list_qa_questions, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_qa_scorecard_revisions(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::QaScorecardRevision> #list_qa_scorecard_revisions(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::QaScorecardRevision>

Lists all revisions under the parent QaScorecard.

Examples:

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::ListQaScorecardRevisionsRequest.new

# Call the list_qa_scorecard_revisions method.
result = client.list_qa_scorecard_revisions 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::QaScorecardRevision.
  p item
end

Overloads:

  • #list_qa_scorecard_revisions(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::QaScorecardRevision>

    Pass arguments to list_qa_scorecard_revisions via a request object, either of type ListQaScorecardRevisionsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::ContactCenterInsights::V1::ListQaScorecardRevisionsRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_qa_scorecard_revisions(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::QaScorecardRevision>

    Pass arguments to list_qa_scorecard_revisions 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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent resource of the scorecard revisions. To list all revisions of all scorecards, substitute the QaScorecard ID with a '-' character.

    • page_size (::Integer) (defaults to: nil)

      Optional. The maximum number of scorecard revisions to return in the response. If the value is zero, the service will select a default size. A call might return fewer objects than requested. A non-empty next_page_token in the response indicates that more data is available.

    • page_token (::String) (defaults to: nil)

      Optional. The value returned by the last ListQaScorecardRevisionsResponse. This value indicates that this is a continuation of a prior ListQaScorecardRevisions call and that the system should return the next page of data.

    • filter (::String) (defaults to: nil)

      Optional. A filter to reduce results to a specific subset. Useful for querying scorecard revisions with specific properties.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 6313

def list_qa_scorecard_revisions request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListQaScorecardRevisionsRequest

  # 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
   = @config.rpcs.list_qa_scorecard_revisions..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_qa_scorecard_revisions.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_qa_scorecard_revisions.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @contact_center_insights_stub.call_rpc :list_qa_scorecard_revisions, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @contact_center_insights_stub, :list_qa_scorecard_revisions, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_qa_scorecards(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::QaScorecard> #list_qa_scorecards(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::QaScorecard>

Lists QaScorecards.

Examples:

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::ListQaScorecardsRequest.new

# Call the list_qa_scorecards method.
result = client.list_qa_scorecards 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::QaScorecard.
  p item
end

Overloads:

  • #list_qa_scorecards(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::QaScorecard>

    Pass arguments to list_qa_scorecards via a request object, either of type ListQaScorecardsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::ContactCenterInsights::V1::ListQaScorecardsRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_qa_scorecards(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::QaScorecard>

    Pass arguments to list_qa_scorecards 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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent resource of the scorecards.

    • page_size (::Integer) (defaults to: nil)

      Optional. The maximum number of scorecards to return in the response. If the value is zero, the service will select a default size. A call might return fewer objects than requested. A non-empty next_page_token in the response indicates that more data is available.

    • page_token (::String) (defaults to: nil)

      Optional. The value returned by the last ListQaScorecardsResponse. This value indicates that this is a continuation of a prior ListQaScorecards call and that the system should return the next page of data.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 5664

def list_qa_scorecards request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListQaScorecardsRequest

  # 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
   = @config.rpcs.list_qa_scorecards..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_qa_scorecards.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_qa_scorecards.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @contact_center_insights_stub.call_rpc :list_qa_scorecards, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @contact_center_insights_stub, :list_qa_scorecards, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_views(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::View> #list_views(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::View>

Lists views.

Examples:

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

Overloads:

  • #list_views(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::View>

    Pass arguments to list_views via a request object, either of type ListViewsRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_views(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::View>

    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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent resource of the views.

    • page_size (::Integer) (defaults to: nil)

      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.

    • page_token (::String) (defaults to: nil)

      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.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 4456

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
   = @config.rpcs.list_views..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_views.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_views.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#loggerLogger

The logger used for request/response debug logging.

Returns:

  • (Logger)


215
216
217
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 215

def logger
  @contact_center_insights_stub.logger
end

#query_metrics(request, options = nil) ⇒ ::Gapic::Operation #query_metrics(location: nil, filter: nil, time_granularity: nil, dimensions: nil, measure_mask: nil) ⇒ ::Gapic::Operation

Query metrics.

Examples:

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::QueryMetricsRequest.new

# Call the query_metrics method.
result = client.query_metrics 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

Overloads:

  • #query_metrics(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to query_metrics via a request object, either of type QueryMetricsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::ContactCenterInsights::V1::QueryMetricsRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #query_metrics(location: nil, filter: nil, time_granularity: nil, dimensions: nil, measure_mask: nil) ⇒ ::Gapic::Operation

    Pass arguments to query_metrics 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).

    Parameters:

    • location (::String) (defaults to: nil)

      Required. The location of the data. "projects/{project}/locations/{location}"

    • filter (::String) (defaults to: nil)

      Required. Filter to select a subset of conversations to compute the metrics. Must specify a window of the conversation create time to compute the metrics. The returned metrics will be from the range [DATE(starting create time), DATE(ending create time)).

    • time_granularity (::Google::Cloud::ContactCenterInsights::V1::QueryMetricsRequest::TimeGranularity) (defaults to: nil)

      The time granularity of each data point in the time series. Defaults to NONE if this field is unspecified.

    • dimensions (::Array<::Google::Cloud::ContactCenterInsights::V1::Dimension, ::Hash>) (defaults to: nil)

      The dimensions that determine the grouping key for the query. Defaults to no dimension if this field is unspecified. If a dimension is specified, its key must also be specified. Each dimension's key must be unique.

      If a time granularity is also specified, metric values in the dimension will be bucketed by this granularity.

      Up to one dimension is supported for now.

    • measure_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Measures to return. Defaults to all measures if this field is unspecified. A valid mask should traverse from the measure field from the response. For example, a path from a measure mask to get the conversation count is "conversation_measure.count".

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 4745

def query_metrics request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::QueryMetricsRequest

  # 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
   = @config.rpcs.query_metrics..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.query_metrics.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.query_metrics.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @contact_center_insights_stub.call_rpc :query_metrics, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#tune_qa_scorecard_revision(request, options = nil) ⇒ ::Gapic::Operation #tune_qa_scorecard_revision(parent: nil, filter: nil, validate_only: nil) ⇒ ::Gapic::Operation

Fine tune one or more QaModels.

Examples:

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::TuneQaScorecardRevisionRequest.new

# Call the tune_qa_scorecard_revision method.
result = client.tune_qa_scorecard_revision 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

Overloads:

  • #tune_qa_scorecard_revision(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to tune_qa_scorecard_revision via a request object, either of type TuneQaScorecardRevisionRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::ContactCenterInsights::V1::TuneQaScorecardRevisionRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #tune_qa_scorecard_revision(parent: nil, filter: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to tune_qa_scorecard_revision 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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent resource for new fine tuning job instance.

    • filter (::String) (defaults to: nil)

      Required. Filter for selecting the feedback labels that needs to be used for training. This filter can be used to limit the feedback labels used for tuning to a feedback labels created or updated for a specific time-window etc.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. Run in validate only mode, no fine tuning will actually run. Data quality validations like training data distributions will run. Even when set to false, the data quality validations will still run but once the validations complete we will proceed with the fine tune, if applicable.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 5948

def tune_qa_scorecard_revision request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::TuneQaScorecardRevisionRequest

  # 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
   = @config.rpcs.tune_qa_scorecard_revision..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.tune_qa_scorecard_revision.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.tune_qa_scorecard_revision.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @contact_center_insights_stub.call_rpc :tune_qa_scorecard_revision, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#undeploy_issue_model(request, options = nil) ⇒ ::Gapic::Operation #undeploy_issue_model(name: nil) ⇒ ::Gapic::Operation

Undeploys an issue model. An issue model can not be used in analysis after it has been undeployed.

Examples:

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

Overloads:

  • #undeploy_issue_model(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to undeploy_issue_model via a request object, either of type UndeployIssueModelRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #undeploy_issue_model(name: nil) ⇒ ::Gapic::Operation

    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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The issue model to undeploy.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 2213

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
   = @config.rpcs.undeploy_issue_model..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.undeploy_issue_model.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.undeploy_issue_model.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#undeploy_qa_scorecard_revision(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::QaScorecardRevision #undeploy_qa_scorecard_revision(name: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::QaScorecardRevision

Undeploy a QaScorecardRevision.

Examples:

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::UndeployQaScorecardRevisionRequest.new

# Call the undeploy_qa_scorecard_revision method.
result = client.undeploy_qa_scorecard_revision request

# The returned object is of type Google::Cloud::ContactCenterInsights::V1::QaScorecardRevision.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 6120

def undeploy_qa_scorecard_revision request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UndeployQaScorecardRevisionRequest

  # 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
   = @config.rpcs.undeploy_qa_scorecard_revision..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.undeploy_qa_scorecard_revision.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.undeploy_qa_scorecard_revision.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @contact_center_insights_stub.call_rpc :undeploy_qa_scorecard_revision, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#universe_domainString

The effective universe domain

Returns:

  • (String)


110
111
112
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 110

def universe_domain
  @contact_center_insights_stub.universe_domain
end

#update_analysis_rule(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::AnalysisRule #update_analysis_rule(analysis_rule: nil, update_mask: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::AnalysisRule

Updates a analysis rule.

Examples:

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::UpdateAnalysisRuleRequest.new

# Call the update_analysis_rule method.
result = client.update_analysis_rule request

# The returned object is of type Google::Cloud::ContactCenterInsights::V1::AnalysisRule.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 3912

def update_analysis_rule request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateAnalysisRuleRequest

  # 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
   = @config.rpcs.update_analysis_rule..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.analysis_rule&.name
    header_params["analysis_rule.name"] = request.analysis_rule.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_analysis_rule.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_analysis_rule.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @contact_center_insights_stub.call_rpc :update_analysis_rule, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_conversation(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::Conversation #update_conversation(conversation: nil, update_mask: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::Conversation

Updates a conversation.

Examples:

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

Overloads:

  • #update_conversation(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::Conversation

    Pass arguments to update_conversation via a request object, either of type UpdateConversationRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_conversation(conversation: nil, update_mask: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::Conversation

    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).

    Parameters:

    • conversation (::Google::Cloud::ContactCenterInsights::V1::Conversation, ::Hash) (defaults to: nil)

      Required. The new values for the conversation.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      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

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 487

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
   = @config.rpcs.update_conversation..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_conversation.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_conversation.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_feedback_label(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::FeedbackLabel #update_feedback_label(feedback_label: nil, update_mask: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::FeedbackLabel

Update feedback label.

Examples:

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::UpdateFeedbackLabelRequest.new

# Call the update_feedback_label method.
result = client.update_feedback_label request

# The returned object is of type Google::Cloud::ContactCenterInsights::V1::FeedbackLabel.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 6693

def update_feedback_label request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateFeedbackLabelRequest

  # 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
   = @config.rpcs.update_feedback_label..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.feedback_label&.name
    header_params["feedback_label.name"] = request.feedback_label.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_feedback_label.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_feedback_label.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @contact_center_insights_stub.call_rpc :update_feedback_label, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_issue(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::Issue #update_issue(issue: nil, update_mask: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::Issue

Updates an issue.

Examples:

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

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 2668

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
   = @config.rpcs.update_issue..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_issue.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_issue.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_issue_model(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::IssueModel #update_issue_model(issue_model: nil, update_mask: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::IssueModel

Updates an issue model.

Examples:

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

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 1761

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
   = @config.rpcs.update_issue_model..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_issue_model.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_issue_model.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_phrase_matcher(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher #update_phrase_matcher(phrase_matcher: nil, update_mask: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher

Updates a phrase matcher.

Examples:

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

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 3288

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
   = @config.rpcs.update_phrase_matcher..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_phrase_matcher.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_phrase_matcher.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_qa_question(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::QaQuestion #update_qa_question(qa_question: nil, update_mask: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::QaQuestion

Updates a QaQuestion.

Examples:

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::UpdateQaQuestionRequest.new

# Call the update_qa_question method.
result = client.update_qa_question request

# The returned object is of type Google::Cloud::ContactCenterInsights::V1::QaQuestion.
p result

Overloads:

  • #update_qa_question(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::QaQuestion

    Pass arguments to update_qa_question via a request object, either of type UpdateQaQuestionRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::ContactCenterInsights::V1::UpdateQaQuestionRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_qa_question(qa_question: nil, update_mask: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::QaQuestion

    Pass arguments to update_qa_question 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).

    Parameters:

    • qa_question (::Google::Cloud::ContactCenterInsights::V1::QaQuestion, ::Hash) (defaults to: nil)

      Required. The QaQuestion to update.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. The list of fields to be updated. All possible fields can be updated by passing *, or a subset of the following updateable fields can be provided:

      • abbreviation
      • answer_choices
      • answer_instructions
      • order
      • question_body
      • tags

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 5022

def update_qa_question request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateQaQuestionRequest

  # 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
   = @config.rpcs.update_qa_question..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.qa_question&.name
    header_params["qa_question.name"] = request.qa_question.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_qa_question.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_qa_question.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @contact_center_insights_stub.call_rpc :update_qa_question, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_qa_scorecard(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::QaScorecard #update_qa_scorecard(qa_scorecard: nil, update_mask: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::QaScorecard

Updates a QaScorecard.

Examples:

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::UpdateQaScorecardRequest.new

# Call the update_qa_scorecard method.
result = client.update_qa_scorecard request

# The returned object is of type Google::Cloud::ContactCenterInsights::V1::QaScorecard.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 5478

def update_qa_scorecard request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateQaScorecardRequest

  # 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
   = @config.rpcs.update_qa_scorecard..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.qa_scorecard&.name
    header_params["qa_scorecard.name"] = request.qa_scorecard.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_qa_scorecard.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_qa_scorecard.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @contact_center_insights_stub.call_rpc :update_qa_scorecard, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_settings(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::Settings #update_settings(settings: nil, update_mask: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::Settings

Updates project-level settings.

Examples:

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

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 3548

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
   = @config.rpcs.update_settings..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_settings.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_settings.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_view(request, options = nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::View #update_view(view: nil, update_mask: nil) ⇒ ::Google::Cloud::ContactCenterInsights::V1::View

Updates a view.

Examples:

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

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 4545

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
   = @config.rpcs.update_view..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_view.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_view.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#upload_conversation(request, options = nil) ⇒ ::Gapic::Operation #upload_conversation(parent: nil, conversation: nil, conversation_id: nil, redaction_config: nil, speech_config: nil) ⇒ ::Gapic::Operation

Create a long-running conversation upload operation. This method differs from CreateConversation by allowing audio transcription and optional DLP redaction.

Examples:

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

Overloads:

  • #upload_conversation(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to upload_conversation via a request object, either of type UploadConversationRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #upload_conversation(parent: nil, conversation: nil, conversation_id: nil, redaction_config: nil, speech_config: nil) ⇒ ::Gapic::Operation

    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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent resource of the conversation.

    • conversation (::Google::Cloud::ContactCenterInsights::V1::Conversation, ::Hash) (defaults to: nil)

      Required. The conversation resource to create.

    • conversation_id (::String) (defaults to: nil)

      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]-

    • redaction_config (::Google::Cloud::ContactCenterInsights::V1::RedactionConfig, ::Hash) (defaults to: nil)

      Optional. DLP settings for transcript redaction. Will default to the config specified in Settings.

    • speech_config (::Google::Cloud::ContactCenterInsights::V1::SpeechConfig, ::Hash) (defaults to: nil)

      Optional. Speech-to-Text configuration. Will default to the config specified in Settings.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb', line 385

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
   = @config.rpcs.upload_conversation..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"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
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.upload_conversation.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.upload_conversation.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end