class Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client
Client
for the ContactCenterInsights
service.
An API that lets users analyze and explore their business conversation data.
Attributes
@private
Get the associated client for long-running operations.
@return [::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Operations]
Public Class Methods
Configure the ContactCenterInsights
Client
class.
See {::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client::Configuration} for a description of the configuration fields.
@example
# Modify the configuration for all ContactCenterInsights clients ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.configure do |config| config.timeout = 10.0 end
@yield [config] Configure the Client
client. @yieldparam config [Client::Configuration]
@return [Client::Configuration]
# File lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb, line 56 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
Create a new ContactCenterInsights
client object.
@example
# Create a client using the default configuration client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # Create a client using a custom configuration client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| config.timeout = 10.0 end
@yield [config] Configure the ContactCenterInsights
client. @yieldparam config [Client::Configuration]
# File lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb, line 114 def initialize # These require statements are intentionally placed here to initialize # the gRPC module only when it's required. # See https://github.com/googleapis/toolkit/issues/446 require "gapic/grpc" require "google/cloud/contactcenterinsights/v1/contact_center_insights_services_pb" # Create the configuration object @config = Configuration.new Client.configure # Yield the configuration if needed yield @config if block_given? # Create credentials credentials = @config.credentials # Use self-signed JWT if the endpoint is unchanged from default, # but only if the default endpoint does not have a region prefix. enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint && !@config.endpoint.split(".").first.include?("-") credentials ||= Credentials.default scope: @config.scope, enable_self_signed_jwt: enable_self_signed_jwt if credentials.is_a?(::String) || credentials.is_a?(::Hash) credentials = Credentials.new credentials, scope: @config.scope end @quota_project_id = @config.quota_project @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id @operations_client = Operations.new do |config| config.credentials = credentials config.endpoint = @config.endpoint end @contact_center_insights_stub = ::Gapic::ServiceStub.new( ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Stub, credentials: credentials, endpoint: @config.endpoint, channel_args: @config.channel_args, interceptors: @config.interceptors ) end
Public Instance Methods
Gets an issue model's statistics.
@overload calculate_issue_model_stats
(request, options = nil)
Pass arguments to `calculate_issue_model_stats` via a request object, either of type {::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsRequest} or an equivalent Hash. @param request [::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload calculate_issue_model_stats
(issue_model: nil)
Pass arguments to `calculate_issue_model_stats` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). @param issue_model [::String] Required. The resource name of the issue model to query against.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsResponse] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsResponse]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb, line 1624 def calculate_issue_model_stats request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.calculate_issue_model_stats.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "issue_model" => request.issue_model } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.calculate_issue_model_stats.timeout, metadata: metadata, retry_policy: @config.rpcs.calculate_issue_model_stats.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :calculate_issue_model_stats, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Gets conversation statistics.
@overload calculate_stats
(request, options = nil)
Pass arguments to `calculate_stats` via a request object, either of type {::Google::Cloud::ContactCenterInsights::V1::CalculateStatsRequest} or an equivalent Hash. @param request [::Google::Cloud::ContactCenterInsights::V1::CalculateStatsRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload calculate_stats
(location: nil, filter: nil)
Pass arguments to `calculate_stats` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). @param location [::String] Required. The location of the conversations. @param filter [::String] A filter to reduce results to a specific subset. This field is useful for getting statistics about conversations with specific properties.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::CalculateStatsResponse] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::ContactCenterInsights::V1::CalculateStatsResponse]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb, line 1985 def calculate_stats request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CalculateStatsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.calculate_stats.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "location" => request.location } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.calculate_stats.timeout, metadata: metadata, retry_policy: @config.rpcs.calculate_stats.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :calculate_stats, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Configure the ContactCenterInsights
Client
instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on {Client.configure}.
See {::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client::Configuration} for a description of the configuration fields.
@yield [config] Configure the Client
client. @yieldparam config [Client::Configuration]
@return [Client::Configuration]
# File lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb, line 93 def configure yield @config if block_given? @config end
Creates an analysis. The long running operation is done when the analysis has completed.
@overload create_analysis
(request, options = nil)
Pass arguments to `create_analysis` via a request object, either of type {::Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRequest} or an equivalent Hash. @param request [::Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload create_analysis
(parent: nil, analysis: nil)
Pass arguments to `create_analysis` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). @param parent [::String] Required. The parent resource of the analysis. @param analysis [::Google::Cloud::ContactCenterInsights::V1::Analysis, ::Hash] Required. The analysis to create.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Gapic::Operation]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb, line 568 def create_analysis request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.create_analysis.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.create_analysis.timeout, metadata: metadata, retry_policy: @config.rpcs.create_analysis.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :create_analysis, request, options: options do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Creates a conversation.
@overload create_conversation
(request, options = nil)
Pass arguments to `create_conversation` via a request object, either of type {::Google::Cloud::ContactCenterInsights::V1::CreateConversationRequest} or an equivalent Hash. @param request [::Google::Cloud::ContactCenterInsights::V1::CreateConversationRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload create_conversation
(parent: nil, conversation: nil, conversation_id: nil)
Pass arguments to `create_conversation` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). @param parent [::String] Required. The parent resource of the conversation. @param conversation [::Google::Cloud::ContactCenterInsights::V1::Conversation, ::Hash] Required. The conversation resource to create. @param conversation_id [::String] A unique ID for the new conversation. This ID will become the final component of the conversation's resource name. If no ID is specified, a server-generated ID will be used. This value should be 4-32 characters and must match the regular expression /^[a-z0-9-]\\{4,32}$/. Valid characters are /[a-z][0-9]-/
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::Conversation] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::ContactCenterInsights::V1::Conversation]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb, line 202 def create_conversation request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreateConversationRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.create_conversation.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.create_conversation.timeout, metadata: metadata, retry_policy: @config.rpcs.create_conversation.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :create_conversation, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Creates an issue model.
@overload create_issue_model
(request, options = nil)
Pass arguments to `create_issue_model` via a request object, either of type {::Google::Cloud::ContactCenterInsights::V1::CreateIssueModelRequest} or an equivalent Hash. @param request [::Google::Cloud::ContactCenterInsights::V1::CreateIssueModelRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload create_issue_model
(parent: nil, issue_model: nil)
Pass arguments to `create_issue_model` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). @param parent [::String] Required. The parent resource of the issue model. @param issue_model [::Google::Cloud::ContactCenterInsights::V1::IssueModel, ::Hash] Required. The issue model to create.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Gapic::Operation]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb, line 934 def create_issue_model request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreateIssueModelRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.create_issue_model.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.create_issue_model.timeout, metadata: metadata, retry_policy: @config.rpcs.create_issue_model.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :create_issue_model, request, options: options do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Creates a phrase matcher.
@overload create_phrase_matcher
(request, options = nil)
Pass arguments to `create_phrase_matcher` via a request object, either of type {::Google::Cloud::ContactCenterInsights::V1::CreatePhraseMatcherRequest} or an equivalent Hash. @param request [::Google::Cloud::ContactCenterInsights::V1::CreatePhraseMatcherRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload create_phrase_matcher
(parent: nil, phrase_matcher: nil)
Pass arguments to `create_phrase_matcher` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). @param parent [::String] Required. The parent resource of the phrase matcher. Required. The location to create a phrase matcher for. Format: `projects/<Project ID>/locations/<Location ID>` or `projects/<Project Number>/locations/<Location ID>` @param phrase_matcher [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher, ::Hash] Required. The phrase matcher resource to create.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb, line 1697 def create_phrase_matcher request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreatePhraseMatcherRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.create_phrase_matcher.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.create_phrase_matcher.timeout, metadata: metadata, retry_policy: @config.rpcs.create_phrase_matcher.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :create_phrase_matcher, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Deletes an analysis.
@overload delete_analysis
(request, options = nil)
Pass arguments to `delete_analysis` via a request object, either of type {::Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRequest} or an equivalent Hash. @param request [::Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload delete_analysis
(name: nil)
Pass arguments to `delete_analysis` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). @param name [::String] Required. The name of the analysis to delete.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Protobuf::Empty] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Protobuf::Empty]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb, line 786 def delete_analysis request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.delete_analysis.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.delete_analysis.timeout, metadata: metadata, retry_policy: @config.rpcs.delete_analysis.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :delete_analysis, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Deletes a conversation.
@overload delete_conversation
(request, options = nil)
Pass arguments to `delete_conversation` via a request object, either of type {::Google::Cloud::ContactCenterInsights::V1::DeleteConversationRequest} or an equivalent Hash. @param request [::Google::Cloud::ContactCenterInsights::V1::DeleteConversationRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload delete_conversation
(name: nil, force: nil)
Pass arguments to `delete_conversation` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). @param name [::String] Required. The name of the conversation to delete. @param force [::Boolean] If set to true, all of this conversation's analyses will also be deleted. Otherwise, the request will only succeed if the conversation has no analyses.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Protobuf::Empty] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Protobuf::Empty]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb, line 497 def delete_conversation request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteConversationRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.delete_conversation.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.delete_conversation.timeout, metadata: metadata, retry_policy: @config.rpcs.delete_conversation.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :delete_conversation, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Deletes an issue model.
@overload delete_issue_model
(request, options = nil)
Pass arguments to `delete_issue_model` via a request object, either of type {::Google::Cloud::ContactCenterInsights::V1::DeleteIssueModelRequest} or an equivalent Hash. @param request [::Google::Cloud::ContactCenterInsights::V1::DeleteIssueModelRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload delete_issue_model
(name: nil)
Pass arguments to `delete_issue_model` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). @param name [::String] Required. The name of the issue model to delete.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Gapic::Operation]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb, line 1209 def delete_issue_model request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteIssueModelRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.delete_issue_model.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.delete_issue_model.timeout, metadata: metadata, retry_policy: @config.rpcs.delete_issue_model.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :delete_issue_model, request, options: options do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Deletes a phrase matcher.
@overload delete_phrase_matcher
(request, options = nil)
Pass arguments to `delete_phrase_matcher` via a request object, either of type {::Google::Cloud::ContactCenterInsights::V1::DeletePhraseMatcherRequest} or an equivalent Hash. @param request [::Google::Cloud::ContactCenterInsights::V1::DeletePhraseMatcherRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload delete_phrase_matcher
(name: nil)
Pass arguments to `delete_phrase_matcher` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). @param name [::String] Required. The name of the phrase matcher to delete.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Protobuf::Empty] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Protobuf::Empty]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb, line 1914 def delete_phrase_matcher request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeletePhraseMatcherRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.delete_phrase_matcher.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.delete_phrase_matcher.timeout, metadata: metadata, retry_policy: @config.rpcs.delete_phrase_matcher.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :delete_phrase_matcher, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Deploys an issue model. Returns an error if a model is already deployed. An issue model can only be used in analysis after it has been deployed.
@overload deploy_issue_model
(request, options = nil)
Pass arguments to `deploy_issue_model` via a request object, either of type {::Google::Cloud::ContactCenterInsights::V1::DeployIssueModelRequest} or an equivalent Hash. @param request [::Google::Cloud::ContactCenterInsights::V1::DeployIssueModelRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload deploy_issue_model
(name: nil)
Pass arguments to `deploy_issue_model` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). @param name [::String] Required. The issue model to deploy.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Gapic::Operation]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb, line 1279 def deploy_issue_model request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeployIssueModelRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.deploy_issue_model.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.deploy_issue_model.timeout, metadata: metadata, retry_policy: @config.rpcs.deploy_issue_model.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :deploy_issue_model, request, options: options do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Export insights data to a destination defined in the request body.
@overload export_insights_data
(request, options = nil)
Pass arguments to `export_insights_data` via a request object, either of type {::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest} or an equivalent Hash. @param request [::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload export_insights_data
(big_query_destination: nil, parent: nil, filter: nil, kms_key: nil)
Pass arguments to `export_insights_data` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). @param big_query_destination [::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest::BigQueryDestination, ::Hash] Specified if sink is a BigQuery table. @param parent [::String] Required. The parent resource to export data from. @param filter [::String] A filter to reduce results to a specific subset. Useful for exporting conversations with specific properties. @param kms_key [::String] A fully qualified KMS key name for BigQuery tables protected by CMEK. Format: projects/\\{project}/locations/\\{location}/keyRings/\\{keyring}/cryptoKeys/\\{key}/cryptoKeyVersions/\\{version}
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Gapic::Operation]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb, line 863 def export_insights_data request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.export_insights_data.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.export_insights_data.timeout, metadata: metadata, retry_policy: @config.rpcs.export_insights_data.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :export_insights_data, request, options: options do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Gets an analysis.
@overload get_analysis
(request, options = nil)
Pass arguments to `get_analysis` via a request object, either of type {::Google::Cloud::ContactCenterInsights::V1::GetAnalysisRequest} or an equivalent Hash. @param request [::Google::Cloud::ContactCenterInsights::V1::GetAnalysisRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload get_analysis
(name: nil)
Pass arguments to `get_analysis` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). @param name [::String] Required. The name of the analysis to get.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::Analysis] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::ContactCenterInsights::V1::Analysis]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb, line 637 def get_analysis request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetAnalysisRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.get_analysis.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.get_analysis.timeout, metadata: metadata, retry_policy: @config.rpcs.get_analysis.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :get_analysis, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Gets a conversation.
@overload get_conversation
(request, options = nil)
Pass arguments to `get_conversation` via a request object, either of type {::Google::Cloud::ContactCenterInsights::V1::GetConversationRequest} or an equivalent Hash. @param request [::Google::Cloud::ContactCenterInsights::V1::GetConversationRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload get_conversation
(name: nil, view: nil)
Pass arguments to `get_conversation` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). @param name [::String] Required. The name of the conversation to get. @param view [::Google::Cloud::ContactCenterInsights::V1::ConversationView] The level of details of the conversation. Default is `FULL`.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::Conversation] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::ContactCenterInsights::V1::Conversation]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb, line 342 def get_conversation request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetConversationRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.get_conversation.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.get_conversation.timeout, metadata: metadata, retry_policy: @config.rpcs.get_conversation.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :get_conversation, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Gets an issue.
@overload get_issue
(request, options = nil)
Pass arguments to `get_issue` via a request object, either of type {::Google::Cloud::ContactCenterInsights::V1::GetIssueRequest} or an equivalent Hash. @param request [::Google::Cloud::ContactCenterInsights::V1::GetIssueRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload get_issue
(name: nil)
Pass arguments to `get_issue` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). @param name [::String] Required. The name of the issue to get.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::Issue] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::ContactCenterInsights::V1::Issue]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb, line 1418 def get_issue request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetIssueRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.get_issue.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.get_issue.timeout, metadata: metadata, retry_policy: @config.rpcs.get_issue.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :get_issue, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Gets an issue model.
@overload get_issue_model
(request, options = nil)
Pass arguments to `get_issue_model` via a request object, either of type {::Google::Cloud::ContactCenterInsights::V1::GetIssueModelRequest} or an equivalent Hash. @param request [::Google::Cloud::ContactCenterInsights::V1::GetIssueModelRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload get_issue_model
(name: nil)
Pass arguments to `get_issue_model` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). @param name [::String] Required. The name of the issue model to get.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::IssueModel] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::ContactCenterInsights::V1::IssueModel]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb, line 1073 def get_issue_model request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetIssueModelRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.get_issue_model.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.get_issue_model.timeout, metadata: metadata, retry_policy: @config.rpcs.get_issue_model.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :get_issue_model, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Gets a phrase matcher.
@overload get_phrase_matcher
(request, options = nil)
Pass arguments to `get_phrase_matcher` via a request object, either of type {::Google::Cloud::ContactCenterInsights::V1::GetPhraseMatcherRequest} or an equivalent Hash. @param request [::Google::Cloud::ContactCenterInsights::V1::GetPhraseMatcherRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload get_phrase_matcher
(name: nil)
Pass arguments to `get_phrase_matcher` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). @param name [::String] Required. The name of the phrase matcher to get.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb, line 1765 def get_phrase_matcher request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetPhraseMatcherRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.get_phrase_matcher.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.get_phrase_matcher.timeout, metadata: metadata, retry_policy: @config.rpcs.get_phrase_matcher.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :get_phrase_matcher, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Gets project-level settings.
@overload get_settings
(request, options = nil)
Pass arguments to `get_settings` via a request object, either of type {::Google::Cloud::ContactCenterInsights::V1::GetSettingsRequest} or an equivalent Hash. @param request [::Google::Cloud::ContactCenterInsights::V1::GetSettingsRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload get_settings
(name: nil)
Pass arguments to `get_settings` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). @param name [::String] Required. The name of the settings resource to get.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::Settings] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::ContactCenterInsights::V1::Settings]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb, line 2053 def get_settings request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetSettingsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.get_settings.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.get_settings.timeout, metadata: metadata, retry_policy: @config.rpcs.get_settings.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :get_settings, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Lists analyses.
@overload list_analyses
(request, options = nil)
Pass arguments to `list_analyses` via a request object, either of type {::Google::Cloud::ContactCenterInsights::V1::ListAnalysesRequest} or an equivalent Hash. @param request [::Google::Cloud::ContactCenterInsights::V1::ListAnalysesRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload list_analyses
(parent: nil, page_size: nil, page_token: nil, filter: nil)
Pass arguments to `list_analyses` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). @param parent [::String] Required. The parent resource of the analyses. @param page_size [::Integer] The maximum number of analyses to return in the response. If this value is zero, the service will select a default size. A call might return fewer objects than requested. A non-empty `next_page_token` in the response indicates that more data is available. @param page_token [::String] The value returned by the last `ListAnalysesResponse`; indicates that this is a continuation of a prior `ListAnalyses` call and the system should return the next page of data. @param filter [::String] A filter to reduce results to a specific subset. Useful for querying conversations with specific properties.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::Analysis>] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::Analysis>]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb, line 717 def list_analyses request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListAnalysesRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.list_analyses.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.list_analyses.timeout, metadata: metadata, retry_policy: @config.rpcs.list_analyses.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :list_analyses, request, options: options do |response, operation| response = ::Gapic::PagedEnumerable.new @contact_center_insights_stub, :list_analyses, request, response, operation, options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Lists conversations.
@overload list_conversations
(request, options = nil)
Pass arguments to `list_conversations` via a request object, either of type {::Google::Cloud::ContactCenterInsights::V1::ListConversationsRequest} or an equivalent Hash. @param request [::Google::Cloud::ContactCenterInsights::V1::ListConversationsRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload list_conversations
(parent: nil, page_size: nil, page_token: nil, filter: nil, view: nil)
Pass arguments to `list_conversations` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). @param parent [::String] Required. The parent resource of the conversation. @param page_size [::Integer] The maximum number of conversations to return in the response. A valid page size ranges from 0 to 1,000 inclusive. If the page size is zero or unspecified, a default page size of 100 will be chosen. Note that a call might return fewer results than the requested page size. @param page_token [::String] The value returned by the last `ListConversationsResponse`. This value indicates that this is a continuation of a prior `ListConversations` call and that the system should return the next page of data. @param filter [::String] A filter to reduce results to a specific subset. Useful for querying conversations with specific properties. @param view [::Google::Cloud::ContactCenterInsights::V1::ConversationView] The level of details of the conversation. Default is `BASIC`.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::Conversation>] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::Conversation>]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb, line 424 def list_conversations request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListConversationsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.list_conversations.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.list_conversations.timeout, metadata: metadata, retry_policy: @config.rpcs.list_conversations.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :list_conversations, request, options: options do |response, operation| response = ::Gapic::PagedEnumerable.new @contact_center_insights_stub, :list_conversations, request, response, operation, options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Lists issue models.
@overload list_issue_models
(request, options = nil)
Pass arguments to `list_issue_models` via a request object, either of type {::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsRequest} or an equivalent Hash. @param request [::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload list_issue_models
(parent: nil)
Pass arguments to `list_issue_models` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). @param parent [::String] Required. The parent resource of the issue model.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsResponse] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsResponse]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb, line 1141 def list_issue_models request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.list_issue_models.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.list_issue_models.timeout, metadata: metadata, retry_policy: @config.rpcs.list_issue_models.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :list_issue_models, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Lists issues.
@overload list_issues
(request, options = nil)
Pass arguments to `list_issues` via a request object, either of type {::Google::Cloud::ContactCenterInsights::V1::ListIssuesRequest} or an equivalent Hash. @param request [::Google::Cloud::ContactCenterInsights::V1::ListIssuesRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload list_issues
(parent: nil)
Pass arguments to `list_issues` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). @param parent [::String] Required. The parent resource of the issue.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::ListIssuesResponse] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::ContactCenterInsights::V1::ListIssuesResponse]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb, line 1486 def list_issues request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListIssuesRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.list_issues.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.list_issues.timeout, metadata: metadata, retry_policy: @config.rpcs.list_issues.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :list_issues, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Lists phrase matchers.
@overload list_phrase_matchers
(request, options = nil)
Pass arguments to `list_phrase_matchers` via a request object, either of type {::Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersRequest} or an equivalent Hash. @param request [::Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload list_phrase_matchers
(parent: nil, page_size: nil, page_token: nil, filter: nil)
Pass arguments to `list_phrase_matchers` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). @param parent [::String] Required. The parent resource of the phrase matcher. @param page_size [::Integer] The maximum number of phrase matchers to return in the response. If this value is zero, the service will select a default size. A call might return fewer objects than requested. A non-empty `next_page_token` in the response indicates that more data is available. @param page_token [::String] The value returned by the last `ListPhraseMatchersResponse`. This value indicates that this is a continuation of a prior `ListPhraseMatchers` call and that the system should return the next page of data. @param filter [::String] A filter to reduce results to a specific subset. Useful for querying phrase matchers with specific properties.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher>] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher>]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb, line 1845 def list_phrase_matchers request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.list_phrase_matchers.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.list_phrase_matchers.timeout, metadata: metadata, retry_policy: @config.rpcs.list_phrase_matchers.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :list_phrase_matchers, request, options: options do |response, operation| response = ::Gapic::PagedEnumerable.new @contact_center_insights_stub, :list_phrase_matchers, request, response, operation, options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Undeploys an issue model. An issue model can not be used in analysis after it has been undeployed.
@overload undeploy_issue_model
(request, options = nil)
Pass arguments to `undeploy_issue_model` via a request object, either of type {::Google::Cloud::ContactCenterInsights::V1::UndeployIssueModelRequest} or an equivalent Hash. @param request [::Google::Cloud::ContactCenterInsights::V1::UndeployIssueModelRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload undeploy_issue_model
(name: nil)
Pass arguments to `undeploy_issue_model` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). @param name [::String] Required. The issue model to undeploy.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::Operation] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Gapic::Operation]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb, line 1349 def undeploy_issue_model request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UndeployIssueModelRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.undeploy_issue_model.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.undeploy_issue_model.timeout, metadata: metadata, retry_policy: @config.rpcs.undeploy_issue_model.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :undeploy_issue_model, request, options: options do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Updates a conversation.
@overload update_conversation
(request, options = nil)
Pass arguments to `update_conversation` via a request object, either of type {::Google::Cloud::ContactCenterInsights::V1::UpdateConversationRequest} or an equivalent Hash. @param request [::Google::Cloud::ContactCenterInsights::V1::UpdateConversationRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload update_conversation
(conversation: nil, update_mask: nil)
Pass arguments to `update_conversation` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). @param conversation [::Google::Cloud::ContactCenterInsights::V1::Conversation, ::Hash] Required. The new values for the conversation. @param update_mask [::Google::Protobuf::FieldMask, ::Hash] The list of fields to be updated.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::Conversation] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::ContactCenterInsights::V1::Conversation]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb, line 272 def update_conversation request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateConversationRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.update_conversation.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "conversation.name" => request.conversation.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.update_conversation.timeout, metadata: metadata, retry_policy: @config.rpcs.update_conversation.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :update_conversation, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Updates an issue.
@overload update_issue
(request, options = nil)
Pass arguments to `update_issue` via a request object, either of type {::Google::Cloud::ContactCenterInsights::V1::UpdateIssueRequest} or an equivalent Hash. @param request [::Google::Cloud::ContactCenterInsights::V1::UpdateIssueRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload update_issue
(issue: nil, update_mask: nil)
Pass arguments to `update_issue` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). @param issue [::Google::Cloud::ContactCenterInsights::V1::Issue, ::Hash] Required. The new values for the issue. @param update_mask [::Google::Protobuf::FieldMask, ::Hash] The list of fields to be updated.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::Issue] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::ContactCenterInsights::V1::Issue]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb, line 1556 def update_issue request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateIssueRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.update_issue.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "issue.name" => request.issue.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.update_issue.timeout, metadata: metadata, retry_policy: @config.rpcs.update_issue.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :update_issue, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Updates an issue model.
@overload update_issue_model
(request, options = nil)
Pass arguments to `update_issue_model` via a request object, either of type {::Google::Cloud::ContactCenterInsights::V1::UpdateIssueModelRequest} or an equivalent Hash. @param request [::Google::Cloud::ContactCenterInsights::V1::UpdateIssueModelRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload update_issue_model
(issue_model: nil, update_mask: nil)
Pass arguments to `update_issue_model` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). @param issue_model [::Google::Cloud::ContactCenterInsights::V1::IssueModel, ::Hash] Required. The new values for the issue model. @param update_mask [::Google::Protobuf::FieldMask, ::Hash] The list of fields to be updated.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::IssueModel] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::ContactCenterInsights::V1::IssueModel]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb, line 1005 def update_issue_model request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateIssueModelRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.update_issue_model.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "issue_model.name" => request.issue_model.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.update_issue_model.timeout, metadata: metadata, retry_policy: @config.rpcs.update_issue_model.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :update_issue_model, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Updates project-level settings.
@overload update_settings
(request, options = nil)
Pass arguments to `update_settings` via a request object, either of type {::Google::Cloud::ContactCenterInsights::V1::UpdateSettingsRequest} or an equivalent Hash. @param request [::Google::Cloud::ContactCenterInsights::V1::UpdateSettingsRequest, ::Hash] A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload update_settings
(settings: nil, update_mask: nil)
Pass arguments to `update_settings` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). @param settings [::Google::Cloud::ContactCenterInsights::V1::Settings, ::Hash] Required. The new settings values. @param update_mask [::Google::Protobuf::FieldMask, ::Hash] Required. The list of fields to be updated.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::Settings] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::ContactCenterInsights::V1::Settings]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/contact_center_insights/v1/contact_center_insights/client.rb, line 2123 def update_settings request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateSettingsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.update_settings.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "settings.name" => request.settings.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.update_settings.timeout, metadata: metadata, retry_policy: @config.rpcs.update_settings.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :update_settings, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end