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

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

Overview

REST 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 REST client object.

Examples:


# Create a client using the default configuration
client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Client.new do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the ContactCenterInsights client.

Yield Parameters:



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
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 132

def initialize
  # Create the configuration object
  @config = Configuration.new Client.configure

  # Yield the configuration if needed
  yield @config if block_given?

  # Create credentials
  credentials = @config.credentials
  # Use self-signed JWT if the endpoint is unchanged from default,
  # but only if the default endpoint does not have a region prefix.
  enable_self_signed_jwt = @config.endpoint.nil? ||
                           (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
                           !@config.endpoint.split(".").first.include?("-"))
  credentials ||= Credentials.default scope: @config.scope,
                                      enable_self_signed_jwt: enable_self_signed_jwt
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
    credentials = Credentials.new credentials, scope: @config.scope
  end

  @quota_project_id = @config.quota_project
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id

  @operations_client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::Operations.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @config.endpoint
    config.universe_domain = @config.universe_domain
  end

  @contact_center_insights_stub = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Rest::ServiceStub.new(
    endpoint: @config.endpoint,
    endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
    universe_domain: @config.universe_domain,
    credentials: credentials,
    logger: @config.logger
  )

  @contact_center_insights_stub.logger(stub: true)&.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::Rest::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::Rest::Client (readonly)

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



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

def iam_policy_client
  @iam_policy_client
end

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

Get the associated client for long-running operations.



194
195
196
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 194

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::Rest::Client.configure do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:



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

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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::BulkAnalyzeConversationsRequest.new

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

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

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.

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Raises:

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

    if the REST call is aborted.



1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 1176

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.bulk_analyze_conversations request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::BulkDeleteConversationsRequest.new

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

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

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.

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Raises:

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

    if the REST call is aborted.



1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 1273

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.bulk_delete_conversations request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::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.

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Raises:

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

    if the REST call is aborted.



6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
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
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 6596

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.bulk_download_feedback_labels request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::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.

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Raises:

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

    if the REST call is aborted.



6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 6478

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.bulk_upload_feedback_labels request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsRequest.new

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

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

Overloads:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 2641

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.calculate_issue_model_stats request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::CalculateStatsRequest.new

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

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

Overloads:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 3137

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.calculate_stats request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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:



102
103
104
105
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 102

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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRequest.new

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

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

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.

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Raises:

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

    if the REST call is aborted.



829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 829

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.create_analysis request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



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
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 3378

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.create_analysis_rule request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::CreateConversationRequest.new

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

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

Overloads:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



268
269
270
271
272
273
274
275
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
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 268

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.create_conversation request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 5935

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.create_feedback_label request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::CreateIssueModelRequest.new

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

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

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.

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Raises:

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

    if the REST call is aborted.



1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
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
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 1566

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.create_issue_model request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::CreatePhraseMatcherRequest.new

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

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

Overloads:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 2724

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.create_phrase_matcher request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 4490

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.create_qa_question request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 4915

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.create_qa_scorecard request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 5339

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.create_qa_scorecard_revision request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::CreateViewRequest.new

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

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

Overloads:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 3964

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.create_view request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRequest.new

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

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

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.

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



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
1109
1110
1111
1112
1113
1114
1115
1116
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 1083

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.delete_analysis request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::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.

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 3709

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.delete_analysis_rule request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::DeleteConversationRequest.new

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

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

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.

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 741

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.delete_conversation request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::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.

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 6280

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.delete_feedback_label request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::DeleteIssueRequest.new

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

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

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.

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 2563

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.delete_issue request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::DeleteIssueModelRequest.new

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

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

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.

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Raises:

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

    if the REST call is aborted.



1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 1889

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.delete_issue_model request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::DeletePhraseMatcherRequest.new

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

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

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.

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 2976

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.delete_phrase_matcher request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::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.

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 4735

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.delete_qa_question request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::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.

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 5159

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.delete_qa_scorecard request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::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.

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



5753
5754
5755
5756
5757
5758
5759
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
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 5753

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.delete_qa_scorecard_revision request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::DeleteViewRequest.new

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

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

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.

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 4293

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.delete_view request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::DeployIssueModelRequest.new

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

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

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.

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Raises:

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

    if the REST call is aborted.



1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 1977

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.deploy_issue_model request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 5593

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.deploy_qa_scorecard_revision request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest.new

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

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

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.

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Raises:

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

    if the REST call is aborted.



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/rest/client.rb', line 1477

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.export_insights_data request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::ExportIssueModelRequest.new

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

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

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.

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Raises:

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

    if the REST call is aborted.



2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 2154

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.export_issue_model request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::GetAnalysisRequest.new

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

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

Overloads:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 909

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.get_analysis request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



3456
3457
3458
3459
3460
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
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 3456

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.get_analysis_rule request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::GetConversationRequest.new

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

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

Overloads:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 545

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.get_conversation request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::GetEncryptionSpecRequest.new

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

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

Overloads:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 3787

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.get_encryption_spec request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



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
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 6122

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.get_feedback_label request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::GetIssueRequest.new

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

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

Overloads:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 2327

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.get_issue request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::GetIssueModelRequest.new

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

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

Overloads:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 1726

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.get_issue_model request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::GetPhraseMatcherRequest.new

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

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

Overloads:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 2802

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.get_phrase_matcher request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 4568

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.get_qa_question request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 4993

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.get_qa_scorecard request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 5417

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.get_qa_scorecard_revision request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::GetSettingsRequest.new

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

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

Overloads:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



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
3241
3242
3243
3244
3245
3246
3247
3248
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 3215

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.get_settings request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::GetViewRequest.new

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

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

Overloads:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 4042

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.get_view request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::ImportIssueModelRequest.new

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

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

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.

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Raises:

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

    if the REST call is aborted.



2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 2247

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.import_issue_model request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest.new

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

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

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.

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Raises:

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

    if the REST call is aborted.



1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 1379

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.ingest_conversations request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::InitializeEncryptionSpecRequest.new

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

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

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.

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Raises:

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

    if the REST call is aborted.



3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 3879

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.initialize_encryption_spec request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_all_feedback_labels(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::FeedbackLabel> #list_all_feedback_labels(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::Rest::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::Rest::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:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 6385

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.list_all_feedback_labels request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @contact_center_insights_stub, :list_all_feedback_labels, "feedback_labels", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_analyses(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::Analysis> #list_analyses(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::Rest::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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::ListAnalysesRequest.new

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

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::ContactCenterInsights::V1::Analysis.
  p item
end

Overloads:

  • #list_analyses(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::Analysis>

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

  • #list_analyses(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::Rest::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).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 1003

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.list_analyses request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @contact_center_insights_stub, :list_analyses, "analyses", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_analysis_rules(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::AnalysisRule> #list_analysis_rules(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::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::Rest::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:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



3547
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
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 3547

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.list_analysis_rules request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @contact_center_insights_stub, :list_analysis_rules, "analysis_rules", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_conversations(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::Conversation> #list_conversations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) ⇒ ::Gapic::Rest::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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::ListConversationsRequest.new

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

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::ContactCenterInsights::V1::Conversation.
  p item
end

Overloads:

  • #list_conversations(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::Conversation>

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

  • #list_conversations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) ⇒ ::Gapic::Rest::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).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 657

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.list_conversations request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @contact_center_insights_stub, :list_conversations, "conversations", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_feedback_labels(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::FeedbackLabel> #list_feedback_labels(parent: nil, filter: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::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::Rest::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:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



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
6075
6076
6077
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 6042

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.list_feedback_labels request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @contact_center_insights_stub, :list_feedback_labels, "feedback_labels", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::ListIssueModelsRequest.new

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

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

Overloads:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 1804

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.list_issue_models request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::ListIssuesRequest.new

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

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

Overloads:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



2405
2406
2407
2408
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
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 2405

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.list_issues request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_phrase_matchers(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher> #list_phrase_matchers(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::Rest::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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersRequest.new

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

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher.
  p item
end

Overloads:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 2896

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.list_phrase_matchers request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @contact_center_insights_stub, :list_phrase_matchers, "phrase_matchers", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_qa_questions(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::QaQuestion> #list_qa_questions(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::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::Rest::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:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 4826

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.list_qa_questions request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @contact_center_insights_stub, :list_qa_questions, "qa_questions", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_qa_scorecard_revisions(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::QaScorecardRevision> #list_qa_scorecard_revisions(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::Rest::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::Rest::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:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



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
5885
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 5850

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.list_qa_scorecard_revisions request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @contact_center_insights_stub, :list_qa_scorecard_revisions, "qa_scorecard_revisions", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_qa_scorecards(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::QaScorecard> #list_qa_scorecards(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::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::Rest::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:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 5250

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.list_qa_scorecards request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @contact_center_insights_stub, :list_qa_scorecards, "qa_scorecards", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_views(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::View> #list_views(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::ListViewsRequest.new

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

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::ContactCenterInsights::V1::View.
  p item
end

Overloads:

  • #list_views(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::View>

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

  • #list_views(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::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).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 4133

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.list_views request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @contact_center_insights_stub, :list_views, "views", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#loggerLogger

The logger used for request/response debug logging.



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

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::Rest::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.

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Raises:

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

    if the REST call is aborted.



4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 4401

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.query_metrics request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::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.

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Raises:

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

    if the REST call is aborted.



5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 5513

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.tune_qa_scorecard_revision request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::UndeployIssueModelRequest.new

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

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

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.

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Raises:

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

    if the REST call is aborted.



2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 2065

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.undeploy_issue_model request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



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
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 5671

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.undeploy_qa_scorecard_revision request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#universe_domainString

The effective universe domain



112
113
114
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 112

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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



3631
3632
3633
3634
3635
3636
3637
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
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 3631

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.update_analysis_rule request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::UpdateConversationRequest.new

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

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

Overloads:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 465

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.update_conversation request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



6202
6203
6204
6205
6206
6207
6208
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
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 6202

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.update_feedback_label request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::UpdateIssueRequest.new

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

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

Overloads:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 2485

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.update_issue request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::UpdateIssueModelRequest.new

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

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

Overloads:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 1648

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.update_issue_model request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::UpdatePhraseMatcherRequest.new

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

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

Overloads:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 3056

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.update_phrase_matcher request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 4657

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.update_qa_question request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 5078

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.update_qa_scorecard request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::UpdateSettingsRequest.new

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

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

Overloads:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



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
3328
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 3295

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.update_settings request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::UpdateViewRequest.new

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

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

Overloads:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Raises:

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

    if the REST call is aborted.



4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 4215

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.update_view request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ContactCenterInsights::V1::UploadConversationRequest.new

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

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

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.

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Raises:

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

    if the REST call is aborted.



370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
# File 'lib/google/cloud/contact_center_insights/v1/contact_center_insights/rest/client.rb', line 370

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.upload_conversation request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end