# frozen_string_literal: true # Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Auto-generated by gapic-generator-ruby. DO NOT EDIT! require "google/cloud/errors" require "google/cloud/contactcenterinsights/v1/contact_center_insights_pb" module Google module Cloud module ContactCenterInsights module V1 module ContactCenterInsights ## # Client for the ContactCenterInsights service. # # An API that lets users analyze and explore their business conversation data. # class Client # @private API_VERSION = "" # @private DEFAULT_ENDPOINT_TEMPLATE = "contactcenterinsights.$UNIVERSE_DOMAIN$" include Paths # @private attr_reader :contact_center_insights_stub ## # Configure the ContactCenterInsights Client class. # # See {::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client::Configuration} # for a description of the configuration fields. # # @example # # # Modify the configuration for all ContactCenterInsights clients # ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.configure do |config| # config.timeout = 10.0 # end # # @yield [config] Configure the Client client. # @yieldparam config [Client::Configuration] # # @return [Client::Configuration] # def self.configure @configure ||= begin namespace = ["Google", "Cloud", "ContactCenterInsights", "V1"] parent_config = while namespace.any? parent_name = namespace.join "::" parent_const = const_get parent_name break parent_const.configure if parent_const.respond_to? :configure namespace.pop end default_config = Client::Configuration.new parent_config default_config.timeout = 60.0 default_config.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config end yield @configure if block_given? @configure end ## # Configure the ContactCenterInsights Client instance. # # The configuration is set to the derived mode, meaning that values can be changed, # but structural changes (adding new fields, etc.) are not allowed. Structural changes # should be made on {Client.configure}. # # See {::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client::Configuration} # for a description of the configuration fields. # # @yield [config] Configure the Client client. # @yieldparam config [Client::Configuration] # # @return [Client::Configuration] # def configure yield @config if block_given? @config end ## # The effective universe domain # # @return [String] # def universe_domain @contact_center_insights_stub.universe_domain end ## # Create a new ContactCenterInsights client object. # # @example # # # Create a client using the default configuration # client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a client using a custom configuration # client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| # config.timeout = 10.0 # end # # @yield [config] Configure the ContactCenterInsights client. # @yieldparam config [Client::Configuration] # def initialize # These require statements are intentionally placed here to initialize # the gRPC module only when it's required. # See https://github.com/googleapis/toolkit/issues/446 require "gapic/grpc" require "google/cloud/contactcenterinsights/v1/contact_center_insights_services_pb" # Create the configuration object @config = Configuration.new Client.configure # Yield the configuration if needed yield @config if block_given? # Create credentials credentials = @config.credentials # Use self-signed JWT if the endpoint is unchanged from default, # but only if the default endpoint does not have a region prefix. enable_self_signed_jwt = @config.endpoint.nil? || (@config.endpoint == Configuration::DEFAULT_ENDPOINT && !@config.endpoint.split(".").first.include?("-")) credentials ||= Credentials.default scope: @config.scope, enable_self_signed_jwt: enable_self_signed_jwt if credentials.is_a?(::String) || credentials.is_a?(::Hash) credentials = Credentials.new credentials, scope: @config.scope end @quota_project_id = @config.quota_project @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id @operations_client = Operations.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @config.endpoint config.universe_domain = @config.universe_domain end @contact_center_insights_stub = ::Gapic::ServiceStub.new( ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Stub, credentials: credentials, endpoint: @config.endpoint, endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, universe_domain: @config.universe_domain, channel_args: @config.channel_args, interceptors: @config.interceptors, channel_pool_config: @config.channel_pool ) end ## # Get the associated client for long-running operations. # # @return [::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Operations] # attr_reader :operations_client # Service calls ## # Creates a conversation. # # @overload create_conversation(request, options = nil) # Pass arguments to `create_conversation` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::CreateConversationRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::CreateConversationRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload create_conversation(parent: nil, conversation: nil, conversation_id: nil) # Pass arguments to `create_conversation` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] # Required. The parent resource of the conversation. # @param conversation [::Google::Cloud::ContactCenterInsights::V1::Conversation, ::Hash] # Required. The conversation resource to create. # @param conversation_id [::String] # A unique ID for the new conversation. This ID will become the final # component of the conversation's resource name. If no ID is specified, a # server-generated ID will be used. # # This value should be 4-64 characters and must match the regular # expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-` # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::Conversation] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Cloud::ContactCenterInsights::V1::Conversation] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::CreateConversationRequest.new # # # Call the create_conversation method. # result = client.create_conversation request # # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Conversation. # p result # def create_conversation request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreateConversationRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.create_conversation.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.create_conversation.timeout, metadata: metadata, retry_policy: @config.rpcs.create_conversation.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :create_conversation, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Create a longrunning conversation upload operation. This method differs # from CreateConversation by allowing audio transcription and optional DLP # redaction. # # @overload upload_conversation(request, options = nil) # Pass arguments to `upload_conversation` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::UploadConversationRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::UploadConversationRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload upload_conversation(parent: nil, conversation: nil, conversation_id: nil, redaction_config: nil, speech_config: nil) # Pass arguments to `upload_conversation` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] # Required. The parent resource of the conversation. # @param conversation [::Google::Cloud::ContactCenterInsights::V1::Conversation, ::Hash] # Required. The conversation resource to create. # @param conversation_id [::String] # Optional. A unique ID for the new conversation. This ID will become the # final component of the conversation's resource name. If no ID is specified, # a server-generated ID will be used. # # This value should be 4-64 characters and must match the regular # expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-` # @param redaction_config [::Google::Cloud::ContactCenterInsights::V1::RedactionConfig, ::Hash] # Optional. DLP settings for transcript redaction. Will default to the config # specified in Settings. # @param speech_config [::Google::Cloud::ContactCenterInsights::V1::SpeechConfig, ::Hash] # Optional. Speech-to-Text configuration. Will default to the config # specified in Settings. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Gapic::Operation] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::UploadConversationRequest.new # # # Call the upload_conversation method. # result = client.upload_conversation request # # # The returned object is of type Gapic::Operation. You can use it to # # check the status of an operation, cancel it, or wait for results. # # Here is how to wait for a response. # result.wait_until_done! timeout: 60 # if result.response? # p result.response # else # puts "No response received." # end # def upload_conversation request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UploadConversationRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.upload_conversation.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.upload_conversation.timeout, metadata: metadata, retry_policy: @config.rpcs.upload_conversation.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :upload_conversation, request, options: options do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Updates a conversation. # # @overload update_conversation(request, options = nil) # Pass arguments to `update_conversation` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::UpdateConversationRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::UpdateConversationRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload update_conversation(conversation: nil, update_mask: nil) # Pass arguments to `update_conversation` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param conversation [::Google::Cloud::ContactCenterInsights::V1::Conversation, ::Hash] # Required. The new values for the conversation. # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] # The list of fields to be updated. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::Conversation] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Cloud::ContactCenterInsights::V1::Conversation] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::UpdateConversationRequest.new # # # Call the update_conversation method. # result = client.update_conversation request # # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Conversation. # p result # def update_conversation request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateConversationRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.update_conversation.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.conversation&.name header_params["conversation.name"] = request.conversation.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.update_conversation.timeout, metadata: metadata, retry_policy: @config.rpcs.update_conversation.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :update_conversation, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Gets a conversation. # # @overload get_conversation(request, options = nil) # Pass arguments to `get_conversation` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::GetConversationRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::GetConversationRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload get_conversation(name: nil, view: nil) # Pass arguments to `get_conversation` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the conversation to get. # @param view [::Google::Cloud::ContactCenterInsights::V1::ConversationView] # The level of details of the conversation. Default is `FULL`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::Conversation] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Cloud::ContactCenterInsights::V1::Conversation] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::GetConversationRequest.new # # # Call the get_conversation method. # result = client.get_conversation request # # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Conversation. # p result # def get_conversation request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetConversationRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.get_conversation.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.get_conversation.timeout, metadata: metadata, retry_policy: @config.rpcs.get_conversation.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :get_conversation, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Lists conversations. # # @overload list_conversations(request, options = nil) # Pass arguments to `list_conversations` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::ListConversationsRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::ListConversationsRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload list_conversations(parent: nil, page_size: nil, page_token: nil, filter: nil, 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. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::ListConversationsRequest.new # # # Call the list_conversations method. # result = client.list_conversations request # # # The returned object is of type Gapic::PagedEnumerable. You can iterate # # over elements, and API calls will be issued to fetch pages as needed. # result.each do |item| # # Each element is of type ::Google::Cloud::ContactCenterInsights::V1::Conversation. # p item # end # def list_conversations request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListConversationsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.list_conversations.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.list_conversations.timeout, metadata: metadata, retry_policy: @config.rpcs.list_conversations.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :list_conversations, request, options: options do |response, operation| response = ::Gapic::PagedEnumerable.new @contact_center_insights_stub, :list_conversations, request, response, operation, options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Deletes a conversation. # # @overload delete_conversation(request, options = nil) # Pass arguments to `delete_conversation` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::DeleteConversationRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::DeleteConversationRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload delete_conversation(name: nil, force: nil) # Pass arguments to `delete_conversation` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the conversation to delete. # @param force [::Boolean] # If set to true, all of this conversation's analyses will also be deleted. # Otherwise, the request will only succeed if the conversation has no # analyses. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Protobuf::Empty] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Protobuf::Empty] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::DeleteConversationRequest.new # # # Call the delete_conversation method. # result = client.delete_conversation request # # # The returned object is of type Google::Protobuf::Empty. # p result # def delete_conversation request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteConversationRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.delete_conversation.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.delete_conversation.timeout, metadata: metadata, retry_policy: @config.rpcs.delete_conversation.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :delete_conversation, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Creates an analysis. The long running operation is done when the analysis # has completed. # # @overload create_analysis(request, options = nil) # Pass arguments to `create_analysis` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload create_analysis(parent: nil, analysis: nil) # Pass arguments to `create_analysis` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] # Required. The parent resource of the analysis. # @param analysis [::Google::Cloud::ContactCenterInsights::V1::Analysis, ::Hash] # Required. The analysis to create. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Gapic::Operation] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRequest.new # # # Call the create_analysis method. # result = client.create_analysis request # # # The returned object is of type Gapic::Operation. You can use it to # # check the status of an operation, cancel it, or wait for results. # # Here is how to wait for a response. # result.wait_until_done! timeout: 60 # if result.response? # p result.response # else # puts "No response received." # end # def create_analysis request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreateAnalysisRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.create_analysis.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.create_analysis.timeout, metadata: metadata, retry_policy: @config.rpcs.create_analysis.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :create_analysis, request, options: options do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Gets an analysis. # # @overload get_analysis(request, options = nil) # Pass arguments to `get_analysis` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::GetAnalysisRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::GetAnalysisRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload get_analysis(name: nil) # Pass arguments to `get_analysis` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the analysis to get. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::Analysis] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Cloud::ContactCenterInsights::V1::Analysis] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::GetAnalysisRequest.new # # # Call the get_analysis method. # result = client.get_analysis request # # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Analysis. # p result # def get_analysis request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetAnalysisRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.get_analysis.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.get_analysis.timeout, metadata: metadata, retry_policy: @config.rpcs.get_analysis.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :get_analysis, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Lists analyses. # # @overload list_analyses(request, options = nil) # Pass arguments to `list_analyses` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::ListAnalysesRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::ListAnalysesRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload list_analyses(parent: nil, page_size: nil, page_token: nil, filter: nil) # Pass arguments to `list_analyses` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] # Required. The parent resource of the analyses. # @param page_size [::Integer] # The maximum number of analyses to return in the response. If this # value is zero, the service will select a default size. A call might return # fewer objects than requested. A non-empty `next_page_token` in the response # indicates that more data is available. # @param page_token [::String] # The value returned by the last `ListAnalysesResponse`; indicates # that this is a continuation of a prior `ListAnalyses` call and # the system should return the next page of data. # @param filter [::String] # A filter to reduce results to a specific subset. Useful for querying # conversations with specific properties. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::Analysis>] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::Analysis>] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::ListAnalysesRequest.new # # # Call the list_analyses method. # result = client.list_analyses request # # # The returned object is of type Gapic::PagedEnumerable. You can iterate # # over elements, and API calls will be issued to fetch pages as needed. # result.each do |item| # # Each element is of type ::Google::Cloud::ContactCenterInsights::V1::Analysis. # p item # end # def list_analyses request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListAnalysesRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.list_analyses.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.list_analyses.timeout, metadata: metadata, retry_policy: @config.rpcs.list_analyses.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :list_analyses, request, options: options do |response, operation| response = ::Gapic::PagedEnumerable.new @contact_center_insights_stub, :list_analyses, request, response, operation, options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Deletes an analysis. # # @overload delete_analysis(request, options = nil) # Pass arguments to `delete_analysis` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload delete_analysis(name: nil) # Pass arguments to `delete_analysis` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the analysis to delete. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Protobuf::Empty] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Protobuf::Empty] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRequest.new # # # Call the delete_analysis method. # result = client.delete_analysis request # # # The returned object is of type Google::Protobuf::Empty. # p result # def delete_analysis request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteAnalysisRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.delete_analysis.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.delete_analysis.timeout, metadata: metadata, retry_policy: @config.rpcs.delete_analysis.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :delete_analysis, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Analyzes multiple conversations in a single request. # # @overload bulk_analyze_conversations(request, options = nil) # Pass arguments to `bulk_analyze_conversations` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::BulkAnalyzeConversationsRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::BulkAnalyzeConversationsRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload bulk_analyze_conversations(parent: nil, filter: nil, analysis_percentage: nil, annotator_selector: nil) # Pass arguments to `bulk_analyze_conversations` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] # Required. The parent resource to create analyses in. # @param filter [::String] # Required. Filter used to select the subset of conversations to analyze. # @param analysis_percentage [::Float] # Required. Percentage of selected conversation to analyze, between # [0, 100]. # @param annotator_selector [::Google::Cloud::ContactCenterInsights::V1::AnnotatorSelector, ::Hash] # To select the annotators to run and the phrase matchers to use # (if any). If not specified, all annotators will be run. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Gapic::Operation] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::BulkAnalyzeConversationsRequest.new # # # Call the bulk_analyze_conversations method. # result = client.bulk_analyze_conversations request # # # The returned object is of type Gapic::Operation. You can use it to # # check the status of an operation, cancel it, or wait for results. # # Here is how to wait for a response. # result.wait_until_done! timeout: 60 # if result.response? # p result.response # else # puts "No response received." # end # def bulk_analyze_conversations request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::BulkAnalyzeConversationsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.bulk_analyze_conversations.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.bulk_analyze_conversations.timeout, metadata: metadata, retry_policy: @config.rpcs.bulk_analyze_conversations.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :bulk_analyze_conversations, request, options: options do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Deletes multiple conversations in a single request. # # @overload bulk_delete_conversations(request, options = nil) # Pass arguments to `bulk_delete_conversations` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::BulkDeleteConversationsRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::BulkDeleteConversationsRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload bulk_delete_conversations(parent: nil, filter: nil, max_delete_count: nil, force: nil) # Pass arguments to `bulk_delete_conversations` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] # Required. The parent resource to delete conversations from. # Format: # projects/\\{project}/locations/\\{location} # @param filter [::String] # Filter used to select the subset of conversations to delete. # @param max_delete_count [::Integer] # Maximum number of conversations to delete. # @param force [::Boolean] # If set to true, all of this conversation's analyses will also be deleted. # Otherwise, the request will only succeed if the conversation has no # analyses. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Gapic::Operation] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::BulkDeleteConversationsRequest.new # # # Call the bulk_delete_conversations method. # result = client.bulk_delete_conversations request # # # The returned object is of type Gapic::Operation. You can use it to # # check the status of an operation, cancel it, or wait for results. # # Here is how to wait for a response. # result.wait_until_done! timeout: 60 # if result.response? # p result.response # else # puts "No response received." # end # def bulk_delete_conversations request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::BulkDeleteConversationsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.bulk_delete_conversations.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.bulk_delete_conversations.timeout, metadata: metadata, retry_policy: @config.rpcs.bulk_delete_conversations.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :bulk_delete_conversations, request, options: options do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Imports conversations and processes them according to the user's # configuration. # # @overload ingest_conversations(request, options = nil) # Pass arguments to `ingest_conversations` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload ingest_conversations(gcs_source: nil, transcript_object_config: nil, parent: nil, conversation_config: nil, redaction_config: nil, speech_config: nil) # Pass arguments to `ingest_conversations` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param gcs_source [::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest::GcsSource, ::Hash] # A cloud storage bucket source. Note that any previously ingested objects # from the source will be skipped to avoid duplication. # @param transcript_object_config [::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest::TranscriptObjectConfig, ::Hash] # Configuration for when `source` contains conversation transcripts. # @param parent [::String] # Required. The parent resource for new conversations. # @param conversation_config [::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest::ConversationConfig, ::Hash] # Configuration that applies to all conversations. # @param redaction_config [::Google::Cloud::ContactCenterInsights::V1::RedactionConfig, ::Hash] # Optional. DLP settings for transcript redaction. Optional, will default to # the config specified in Settings. # @param speech_config [::Google::Cloud::ContactCenterInsights::V1::SpeechConfig, ::Hash] # Optional. Default Speech-to-Text configuration. Optional, will default to # the config specified in Settings. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Gapic::Operation] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest.new # # # Call the ingest_conversations method. # result = client.ingest_conversations request # # # The returned object is of type Gapic::Operation. You can use it to # # check the status of an operation, cancel it, or wait for results. # # Here is how to wait for a response. # result.wait_until_done! timeout: 60 # if result.response? # p result.response # else # puts "No response received." # end # def ingest_conversations request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::IngestConversationsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.ingest_conversations.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.ingest_conversations.timeout, metadata: metadata, retry_policy: @config.rpcs.ingest_conversations.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :ingest_conversations, request, options: options do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Export insights data to a destination defined in the request body. # # @overload export_insights_data(request, options = nil) # Pass arguments to `export_insights_data` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload export_insights_data(big_query_destination: nil, parent: nil, filter: nil, kms_key: nil, write_disposition: nil) # Pass arguments to `export_insights_data` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param big_query_destination [::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest::BigQueryDestination, ::Hash] # Specified if sink is a BigQuery table. # @param parent [::String] # Required. The parent resource to export data from. # @param filter [::String] # A filter to reduce results to a specific subset. Useful for exporting # conversations with specific properties. # @param kms_key [::String] # A fully qualified KMS key name for BigQuery tables protected by CMEK. # Format: # projects/\\{project}/locations/\\{location}/keyRings/\\{keyring}/cryptoKeys/\\{key}/cryptoKeyVersions/\\{version} # @param write_disposition [::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest::WriteDisposition] # Options for what to do if the destination table already exists. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Gapic::Operation] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest.new # # # Call the export_insights_data method. # result = client.export_insights_data request # # # The returned object is of type Gapic::Operation. You can use it to # # check the status of an operation, cancel it, or wait for results. # # Here is how to wait for a response. # result.wait_until_done! timeout: 60 # if result.response? # p result.response # else # puts "No response received." # end # def export_insights_data request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ExportInsightsDataRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.export_insights_data.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.export_insights_data.timeout, metadata: metadata, retry_policy: @config.rpcs.export_insights_data.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :export_insights_data, request, options: options do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Creates an issue model. # # @overload create_issue_model(request, options = nil) # Pass arguments to `create_issue_model` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::CreateIssueModelRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::CreateIssueModelRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload create_issue_model(parent: nil, issue_model: nil) # Pass arguments to `create_issue_model` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] # Required. The parent resource of the issue model. # @param issue_model [::Google::Cloud::ContactCenterInsights::V1::IssueModel, ::Hash] # Required. The issue model to create. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Gapic::Operation] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::CreateIssueModelRequest.new # # # Call the create_issue_model method. # result = client.create_issue_model request # # # The returned object is of type Gapic::Operation. You can use it to # # check the status of an operation, cancel it, or wait for results. # # Here is how to wait for a response. # result.wait_until_done! timeout: 60 # if result.response? # p result.response # else # puts "No response received." # end # def create_issue_model request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreateIssueModelRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.create_issue_model.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.create_issue_model.timeout, metadata: metadata, retry_policy: @config.rpcs.create_issue_model.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :create_issue_model, request, options: options do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Updates an issue model. # # @overload update_issue_model(request, options = nil) # Pass arguments to `update_issue_model` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::UpdateIssueModelRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::UpdateIssueModelRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload update_issue_model(issue_model: nil, update_mask: nil) # Pass arguments to `update_issue_model` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param issue_model [::Google::Cloud::ContactCenterInsights::V1::IssueModel, ::Hash] # Required. The new values for the issue model. # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] # The list of fields to be updated. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::IssueModel] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Cloud::ContactCenterInsights::V1::IssueModel] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::UpdateIssueModelRequest.new # # # Call the update_issue_model method. # result = client.update_issue_model request # # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::IssueModel. # p result # def update_issue_model request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateIssueModelRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.update_issue_model.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.issue_model&.name header_params["issue_model.name"] = request.issue_model.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.update_issue_model.timeout, metadata: metadata, retry_policy: @config.rpcs.update_issue_model.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :update_issue_model, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Gets an issue model. # # @overload get_issue_model(request, options = nil) # Pass arguments to `get_issue_model` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::GetIssueModelRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::GetIssueModelRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload get_issue_model(name: nil) # Pass arguments to `get_issue_model` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the issue model to get. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::IssueModel] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Cloud::ContactCenterInsights::V1::IssueModel] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::GetIssueModelRequest.new # # # Call the get_issue_model method. # result = client.get_issue_model request # # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::IssueModel. # p result # def get_issue_model request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetIssueModelRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.get_issue_model.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.get_issue_model.timeout, metadata: metadata, retry_policy: @config.rpcs.get_issue_model.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :get_issue_model, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Lists issue models. # # @overload list_issue_models(request, options = nil) # Pass arguments to `list_issue_models` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload list_issue_models(parent: nil) # Pass arguments to `list_issue_models` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] # Required. The parent resource of the issue model. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsResponse] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsResponse] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::ListIssueModelsRequest.new # # # Call the list_issue_models method. # result = client.list_issue_models request # # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::ListIssueModelsResponse. # p result # def list_issue_models request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListIssueModelsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.list_issue_models.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.list_issue_models.timeout, metadata: metadata, retry_policy: @config.rpcs.list_issue_models.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :list_issue_models, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Deletes an issue model. # # @overload delete_issue_model(request, options = nil) # Pass arguments to `delete_issue_model` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::DeleteIssueModelRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::DeleteIssueModelRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload delete_issue_model(name: nil) # Pass arguments to `delete_issue_model` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the issue model to delete. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Gapic::Operation] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::DeleteIssueModelRequest.new # # # Call the delete_issue_model method. # result = client.delete_issue_model request # # # The returned object is of type Gapic::Operation. You can use it to # # check the status of an operation, cancel it, or wait for results. # # Here is how to wait for a response. # result.wait_until_done! timeout: 60 # if result.response? # p result.response # else # puts "No response received." # end # def delete_issue_model request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteIssueModelRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.delete_issue_model.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.delete_issue_model.timeout, metadata: metadata, retry_policy: @config.rpcs.delete_issue_model.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :delete_issue_model, request, options: options do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Deploys an issue model. Returns an error if a model is already deployed. # An issue model can only be used in analysis after it has been deployed. # # @overload deploy_issue_model(request, options = nil) # Pass arguments to `deploy_issue_model` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::DeployIssueModelRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::DeployIssueModelRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload deploy_issue_model(name: nil) # Pass arguments to `deploy_issue_model` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The issue model to deploy. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Gapic::Operation] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::DeployIssueModelRequest.new # # # Call the deploy_issue_model method. # result = client.deploy_issue_model request # # # The returned object is of type Gapic::Operation. You can use it to # # check the status of an operation, cancel it, or wait for results. # # Here is how to wait for a response. # result.wait_until_done! timeout: 60 # if result.response? # p result.response # else # puts "No response received." # end # def deploy_issue_model request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeployIssueModelRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.deploy_issue_model.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.deploy_issue_model.timeout, metadata: metadata, retry_policy: @config.rpcs.deploy_issue_model.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :deploy_issue_model, request, options: options do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Undeploys an issue model. # An issue model can not be used in analysis after it has been undeployed. # # @overload undeploy_issue_model(request, options = nil) # Pass arguments to `undeploy_issue_model` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::UndeployIssueModelRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::UndeployIssueModelRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload undeploy_issue_model(name: nil) # Pass arguments to `undeploy_issue_model` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The issue model to undeploy. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Gapic::Operation] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::UndeployIssueModelRequest.new # # # Call the undeploy_issue_model method. # result = client.undeploy_issue_model request # # # The returned object is of type Gapic::Operation. You can use it to # # check the status of an operation, cancel it, or wait for results. # # Here is how to wait for a response. # result.wait_until_done! timeout: 60 # if result.response? # p result.response # else # puts "No response received." # end # def undeploy_issue_model request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UndeployIssueModelRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.undeploy_issue_model.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.undeploy_issue_model.timeout, metadata: metadata, retry_policy: @config.rpcs.undeploy_issue_model.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :undeploy_issue_model, request, options: options do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Gets an issue. # # @overload get_issue(request, options = nil) # Pass arguments to `get_issue` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::GetIssueRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::GetIssueRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload get_issue(name: nil) # Pass arguments to `get_issue` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the issue to get. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::Issue] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Cloud::ContactCenterInsights::V1::Issue] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::GetIssueRequest.new # # # Call the get_issue method. # result = client.get_issue request # # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Issue. # p result # def get_issue request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetIssueRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.get_issue.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.get_issue.timeout, metadata: metadata, retry_policy: @config.rpcs.get_issue.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :get_issue, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Lists issues. # # @overload list_issues(request, options = nil) # Pass arguments to `list_issues` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::ListIssuesRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::ListIssuesRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload list_issues(parent: nil) # Pass arguments to `list_issues` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] # Required. The parent resource of the issue. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::ListIssuesResponse] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Cloud::ContactCenterInsights::V1::ListIssuesResponse] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::ListIssuesRequest.new # # # Call the list_issues method. # result = client.list_issues request # # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::ListIssuesResponse. # p result # def list_issues request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListIssuesRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.list_issues.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.list_issues.timeout, metadata: metadata, retry_policy: @config.rpcs.list_issues.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :list_issues, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Updates an issue. # # @overload update_issue(request, options = nil) # Pass arguments to `update_issue` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::UpdateIssueRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::UpdateIssueRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload update_issue(issue: nil, update_mask: nil) # Pass arguments to `update_issue` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param issue [::Google::Cloud::ContactCenterInsights::V1::Issue, ::Hash] # Required. The new values for the issue. # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] # The list of fields to be updated. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::Issue] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Cloud::ContactCenterInsights::V1::Issue] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::UpdateIssueRequest.new # # # Call the update_issue method. # result = client.update_issue request # # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Issue. # p result # def update_issue request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateIssueRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.update_issue.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.issue&.name header_params["issue.name"] = request.issue.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.update_issue.timeout, metadata: metadata, retry_policy: @config.rpcs.update_issue.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :update_issue, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Deletes an issue. # # @overload delete_issue(request, options = nil) # Pass arguments to `delete_issue` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::DeleteIssueRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::DeleteIssueRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload delete_issue(name: nil) # Pass arguments to `delete_issue` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the issue to delete. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Protobuf::Empty] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Protobuf::Empty] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::DeleteIssueRequest.new # # # Call the delete_issue method. # result = client.delete_issue request # # # The returned object is of type Google::Protobuf::Empty. # p result # def delete_issue request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteIssueRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.delete_issue.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.delete_issue.timeout, metadata: metadata, retry_policy: @config.rpcs.delete_issue.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :delete_issue, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Gets an issue model's statistics. # # @overload calculate_issue_model_stats(request, options = nil) # Pass arguments to `calculate_issue_model_stats` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload calculate_issue_model_stats(issue_model: nil) # Pass arguments to `calculate_issue_model_stats` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param issue_model [::String] # Required. The resource name of the issue model to query against. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsResponse] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsResponse] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsRequest.new # # # Call the calculate_issue_model_stats method. # result = client.calculate_issue_model_stats request # # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsResponse. # p result # def calculate_issue_model_stats request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CalculateIssueModelStatsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.calculate_issue_model_stats.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.issue_model header_params["issue_model"] = request.issue_model end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.calculate_issue_model_stats.timeout, metadata: metadata, retry_policy: @config.rpcs.calculate_issue_model_stats.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :calculate_issue_model_stats, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Creates a phrase matcher. # # @overload create_phrase_matcher(request, options = nil) # Pass arguments to `create_phrase_matcher` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::CreatePhraseMatcherRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::CreatePhraseMatcherRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload create_phrase_matcher(parent: nil, phrase_matcher: nil) # Pass arguments to `create_phrase_matcher` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] # Required. The parent resource of the phrase matcher. Required. The location # to create a phrase matcher for. Format: `projects//locations/` or `projects//locations/` # @param phrase_matcher [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher, ::Hash] # Required. The phrase matcher resource to create. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::CreatePhraseMatcherRequest.new # # # Call the create_phrase_matcher method. # result = client.create_phrase_matcher request # # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::PhraseMatcher. # p result # def create_phrase_matcher request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreatePhraseMatcherRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.create_phrase_matcher.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.create_phrase_matcher.timeout, metadata: metadata, retry_policy: @config.rpcs.create_phrase_matcher.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :create_phrase_matcher, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Gets a phrase matcher. # # @overload get_phrase_matcher(request, options = nil) # Pass arguments to `get_phrase_matcher` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::GetPhraseMatcherRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::GetPhraseMatcherRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload get_phrase_matcher(name: nil) # Pass arguments to `get_phrase_matcher` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the phrase matcher to get. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::GetPhraseMatcherRequest.new # # # Call the get_phrase_matcher method. # result = client.get_phrase_matcher request # # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::PhraseMatcher. # p result # def get_phrase_matcher request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetPhraseMatcherRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.get_phrase_matcher.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.get_phrase_matcher.timeout, metadata: metadata, retry_policy: @config.rpcs.get_phrase_matcher.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :get_phrase_matcher, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Lists phrase matchers. # # @overload list_phrase_matchers(request, options = nil) # Pass arguments to `list_phrase_matchers` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload list_phrase_matchers(parent: nil, page_size: nil, page_token: nil, filter: nil) # Pass arguments to `list_phrase_matchers` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] # Required. The parent resource of the phrase matcher. # @param page_size [::Integer] # The maximum number of phrase matchers to return in the response. If this # value is zero, the service will select a default size. A call might return # fewer objects than requested. A non-empty `next_page_token` in the response # indicates that more data is available. # @param page_token [::String] # The value returned by the last `ListPhraseMatchersResponse`. This value # indicates that this is a continuation of a prior `ListPhraseMatchers` call # and that the system should return the next page of data. # @param filter [::String] # A filter to reduce results to a specific subset. Useful for querying # phrase matchers with specific properties. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher>] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher>] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersRequest.new # # # Call the list_phrase_matchers method. # result = client.list_phrase_matchers request # # # The returned object is of type Gapic::PagedEnumerable. You can iterate # # over elements, and API calls will be issued to fetch pages as needed. # result.each do |item| # # Each element is of type ::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher. # p item # end # def list_phrase_matchers request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListPhraseMatchersRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.list_phrase_matchers.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.list_phrase_matchers.timeout, metadata: metadata, retry_policy: @config.rpcs.list_phrase_matchers.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :list_phrase_matchers, request, options: options do |response, operation| response = ::Gapic::PagedEnumerable.new @contact_center_insights_stub, :list_phrase_matchers, request, response, operation, options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Deletes a phrase matcher. # # @overload delete_phrase_matcher(request, options = nil) # Pass arguments to `delete_phrase_matcher` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::DeletePhraseMatcherRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::DeletePhraseMatcherRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload delete_phrase_matcher(name: nil) # Pass arguments to `delete_phrase_matcher` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the phrase matcher to delete. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Protobuf::Empty] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Protobuf::Empty] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::DeletePhraseMatcherRequest.new # # # Call the delete_phrase_matcher method. # result = client.delete_phrase_matcher request # # # The returned object is of type Google::Protobuf::Empty. # p result # def delete_phrase_matcher request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeletePhraseMatcherRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.delete_phrase_matcher.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.delete_phrase_matcher.timeout, metadata: metadata, retry_policy: @config.rpcs.delete_phrase_matcher.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :delete_phrase_matcher, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Updates a phrase matcher. # # @overload update_phrase_matcher(request, options = nil) # Pass arguments to `update_phrase_matcher` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::UpdatePhraseMatcherRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::UpdatePhraseMatcherRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload update_phrase_matcher(phrase_matcher: nil, update_mask: nil) # Pass arguments to `update_phrase_matcher` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param phrase_matcher [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher, ::Hash] # Required. The new values for the phrase matcher. # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] # The list of fields to be updated. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Cloud::ContactCenterInsights::V1::PhraseMatcher] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::UpdatePhraseMatcherRequest.new # # # Call the update_phrase_matcher method. # result = client.update_phrase_matcher request # # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::PhraseMatcher. # p result # def update_phrase_matcher request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdatePhraseMatcherRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.update_phrase_matcher.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.phrase_matcher&.name header_params["phrase_matcher.name"] = request.phrase_matcher.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.update_phrase_matcher.timeout, metadata: metadata, retry_policy: @config.rpcs.update_phrase_matcher.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :update_phrase_matcher, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Gets conversation statistics. # # @overload calculate_stats(request, options = nil) # Pass arguments to `calculate_stats` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::CalculateStatsRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::CalculateStatsRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload calculate_stats(location: nil, filter: nil) # Pass arguments to `calculate_stats` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param location [::String] # Required. The location of the conversations. # @param filter [::String] # A filter to reduce results to a specific subset. This field is useful for # getting statistics about conversations with specific properties. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::CalculateStatsResponse] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Cloud::ContactCenterInsights::V1::CalculateStatsResponse] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::CalculateStatsRequest.new # # # Call the calculate_stats method. # result = client.calculate_stats request # # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::CalculateStatsResponse. # p result # def calculate_stats request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CalculateStatsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.calculate_stats.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.location header_params["location"] = request.location end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.calculate_stats.timeout, metadata: metadata, retry_policy: @config.rpcs.calculate_stats.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :calculate_stats, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Gets project-level settings. # # @overload get_settings(request, options = nil) # Pass arguments to `get_settings` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::GetSettingsRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::GetSettingsRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload get_settings(name: nil) # Pass arguments to `get_settings` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the settings resource to get. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::Settings] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Cloud::ContactCenterInsights::V1::Settings] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::GetSettingsRequest.new # # # Call the get_settings method. # result = client.get_settings request # # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Settings. # p result # def get_settings request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetSettingsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.get_settings.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.get_settings.timeout, metadata: metadata, retry_policy: @config.rpcs.get_settings.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :get_settings, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Updates project-level settings. # # @overload update_settings(request, options = nil) # Pass arguments to `update_settings` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::UpdateSettingsRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::UpdateSettingsRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload update_settings(settings: nil, update_mask: nil) # Pass arguments to `update_settings` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param settings [::Google::Cloud::ContactCenterInsights::V1::Settings, ::Hash] # Required. The new settings values. # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] # Required. The list of fields to be updated. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::Settings] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Cloud::ContactCenterInsights::V1::Settings] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::UpdateSettingsRequest.new # # # Call the update_settings method. # result = client.update_settings request # # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::Settings. # p result # def update_settings request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateSettingsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.update_settings.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.settings&.name header_params["settings.name"] = request.settings.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.update_settings.timeout, metadata: metadata, retry_policy: @config.rpcs.update_settings.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :update_settings, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Creates a view. # # @overload create_view(request, options = nil) # Pass arguments to `create_view` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::CreateViewRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::CreateViewRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload create_view(parent: nil, view: nil) # Pass arguments to `create_view` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] # Required. The parent resource of the view. Required. The location to create # a view for. # Format: `projects//locations/` or # `projects//locations/` # @param view [::Google::Cloud::ContactCenterInsights::V1::View, ::Hash] # Required. The view resource to create. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::View] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Cloud::ContactCenterInsights::V1::View] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::CreateViewRequest.new # # # Call the create_view method. # result = client.create_view request # # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::View. # p result # def create_view request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::CreateViewRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.create_view.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.create_view.timeout, metadata: metadata, retry_policy: @config.rpcs.create_view.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :create_view, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Gets a view. # # @overload get_view(request, options = nil) # Pass arguments to `get_view` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::GetViewRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::GetViewRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload get_view(name: nil) # Pass arguments to `get_view` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the view to get. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::View] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Cloud::ContactCenterInsights::V1::View] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::GetViewRequest.new # # # Call the get_view method. # result = client.get_view request # # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::View. # p result # def get_view request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::GetViewRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.get_view.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.get_view.timeout, metadata: metadata, retry_policy: @config.rpcs.get_view.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :get_view, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Lists views. # # @overload list_views(request, options = nil) # Pass arguments to `list_views` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::ListViewsRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::ListViewsRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload list_views(parent: nil, page_size: nil, page_token: nil) # Pass arguments to `list_views` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] # Required. The parent resource of the views. # @param page_size [::Integer] # The maximum number of views to return in the response. If this # value is zero, the service will select a default size. A call may return # fewer objects than requested. A non-empty `next_page_token` in the response # indicates that more data is available. # @param page_token [::String] # The value returned by the last `ListViewsResponse`; indicates # that this is a continuation of a prior `ListViews` call and # the system should return the next page of data. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::View>] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Gapic::PagedEnumerable<::Google::Cloud::ContactCenterInsights::V1::View>] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::ListViewsRequest.new # # # Call the list_views method. # result = client.list_views request # # # The returned object is of type Gapic::PagedEnumerable. You can iterate # # over elements, and API calls will be issued to fetch pages as needed. # result.each do |item| # # Each element is of type ::Google::Cloud::ContactCenterInsights::V1::View. # p item # end # def list_views request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::ListViewsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.list_views.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.list_views.timeout, metadata: metadata, retry_policy: @config.rpcs.list_views.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :list_views, request, options: options do |response, operation| response = ::Gapic::PagedEnumerable.new @contact_center_insights_stub, :list_views, request, response, operation, options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Updates a view. # # @overload update_view(request, options = nil) # Pass arguments to `update_view` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::UpdateViewRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::UpdateViewRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload update_view(view: nil, update_mask: nil) # Pass arguments to `update_view` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param view [::Google::Cloud::ContactCenterInsights::V1::View, ::Hash] # Required. The new view. # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] # The list of fields to be updated. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::ContactCenterInsights::V1::View] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Cloud::ContactCenterInsights::V1::View] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::UpdateViewRequest.new # # # Call the update_view method. # result = client.update_view request # # # The returned object is of type Google::Cloud::ContactCenterInsights::V1::View. # p result # def update_view request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UpdateViewRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.update_view.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.view&.name header_params["view.name"] = request.view.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.update_view.timeout, metadata: metadata, retry_policy: @config.rpcs.update_view.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :update_view, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Deletes a view. # # @overload delete_view(request, options = nil) # Pass arguments to `delete_view` via a request object, either of type # {::Google::Cloud::ContactCenterInsights::V1::DeleteViewRequest} or an equivalent Hash. # # @param request [::Google::Cloud::ContactCenterInsights::V1::DeleteViewRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload delete_view(name: nil) # Pass arguments to `delete_view` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the view to delete. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Protobuf::Empty] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Protobuf::Empty] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/cloud/contact_center_insights/v1" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Cloud::ContactCenterInsights::V1::DeleteViewRequest.new # # # Call the delete_view method. # result = client.delete_view request # # # The returned object is of type Google::Protobuf::Empty. # p result # def delete_view request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::DeleteViewRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.delete_view.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.delete_view.timeout, metadata: metadata, retry_policy: @config.rpcs.delete_view.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @contact_center_insights_stub.call_rpc :delete_view, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Configuration class for the ContactCenterInsights API. # # This class represents the configuration for ContactCenterInsights, # providing control over timeouts, retry behavior, logging, transport # parameters, and other low-level controls. Certain parameters can also be # applied individually to specific RPCs. See # {::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client::Configuration::Rpcs} # for a list of RPCs that can be configured independently. # # Configuration can be applied globally to all clients, or to a single client # on construction. # # @example # # # Modify the global config, setting the timeout for # # create_conversation to 20 seconds, # # and all remaining timeouts to 10 seconds. # ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.configure do |config| # config.timeout = 10.0 # config.rpcs.create_conversation.timeout = 20.0 # end # # # Apply the above configuration only to a new client. # client = ::Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new do |config| # config.timeout = 10.0 # config.rpcs.create_conversation.timeout = 20.0 # end # # @!attribute [rw] endpoint # A custom service endpoint, as a hostname or hostname:port. The default is # nil, indicating to use the default endpoint in the current universe domain. # @return [::String,nil] # @!attribute [rw] credentials # Credentials to send with calls. You may provide any of the following types: # * (`String`) The path to a service account key file in JSON format # * (`Hash`) A service account key as a Hash # * (`Google::Auth::Credentials`) A googleauth credentials object # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) # * (`Signet::OAuth2::Client`) A signet oauth2 client object # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) # * (`GRPC::Core::Channel`) a gRPC channel with included credentials # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object # * (`nil`) indicating no credentials # @return [::Object] # @!attribute [rw] scope # The OAuth scopes # @return [::Array<::String>] # @!attribute [rw] lib_name # The library name as recorded in instrumentation and logging # @return [::String] # @!attribute [rw] lib_version # The library version as recorded in instrumentation and logging # @return [::String] # @!attribute [rw] channel_args # Extra parameters passed to the gRPC channel. Note: this is ignored if a # `GRPC::Core::Channel` object is provided as the credential. # @return [::Hash] # @!attribute [rw] interceptors # An array of interceptors that are run before calls are executed. # @return [::Array<::GRPC::ClientInterceptor>] # @!attribute [rw] timeout # The call timeout in seconds. # @return [::Numeric] # @!attribute [rw] metadata # Additional gRPC headers to be sent with the call. # @return [::Hash{::Symbol=>::String}] # @!attribute [rw] retry_policy # The retry policy. The value is a hash with the following keys: # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. # * `:retry_codes` (*type:* `Array`) - The error codes that should # trigger a retry. # @return [::Hash] # @!attribute [rw] quota_project # A separate project against which to charge quota. # @return [::String] # @!attribute [rw] universe_domain # The universe domain within which to make requests. This determines the # default endpoint URL. The default value of nil uses the environment # universe (usually the default "googleapis.com" universe). # @return [::String,nil] # class Configuration extend ::Gapic::Config # @private # The endpoint specific to the default "googleapis.com" universe. Deprecated. DEFAULT_ENDPOINT = "contactcenterinsights.googleapis.com" config_attr :endpoint, nil, ::String, nil config_attr :credentials, nil do |value| allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC allowed.any? { |klass| klass === value } end config_attr :scope, nil, ::String, ::Array, nil config_attr :lib_name, nil, ::String, nil config_attr :lib_version, nil, ::String, nil config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) config_attr :interceptors, nil, ::Array, nil config_attr :timeout, nil, ::Numeric, nil config_attr :metadata, nil, ::Hash, nil config_attr :retry_policy, nil, ::Hash, ::Proc, nil config_attr :quota_project, nil, ::String, nil config_attr :universe_domain, nil, ::String, nil # @private def initialize parent_config = nil @parent_config = parent_config unless parent_config.nil? yield self if block_given? end ## # Configurations for individual RPCs # @return [Rpcs] # def rpcs @rpcs ||= begin parent_rpcs = nil parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) Rpcs.new parent_rpcs end end ## # Configuration for the channel pool # @return [::Gapic::ServiceStub::ChannelPool::Configuration] # def channel_pool @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new end ## # Configuration RPC class for the ContactCenterInsights API. # # Includes fields providing the configuration for each RPC in this service. # Each configuration object is of type `Gapic::Config::Method` and includes # the following configuration fields: # # * `timeout` (*type:* `Numeric`) - The call timeout in seconds # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields # include the following keys: # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. # * `:retry_codes` (*type:* `Array`) - The error codes that should # trigger a retry. # class Rpcs ## # RPC-specific configuration for `create_conversation` # @return [::Gapic::Config::Method] # attr_reader :create_conversation ## # RPC-specific configuration for `upload_conversation` # @return [::Gapic::Config::Method] # attr_reader :upload_conversation ## # RPC-specific configuration for `update_conversation` # @return [::Gapic::Config::Method] # attr_reader :update_conversation ## # RPC-specific configuration for `get_conversation` # @return [::Gapic::Config::Method] # attr_reader :get_conversation ## # RPC-specific configuration for `list_conversations` # @return [::Gapic::Config::Method] # attr_reader :list_conversations ## # RPC-specific configuration for `delete_conversation` # @return [::Gapic::Config::Method] # attr_reader :delete_conversation ## # RPC-specific configuration for `create_analysis` # @return [::Gapic::Config::Method] # attr_reader :create_analysis ## # RPC-specific configuration for `get_analysis` # @return [::Gapic::Config::Method] # attr_reader :get_analysis ## # RPC-specific configuration for `list_analyses` # @return [::Gapic::Config::Method] # attr_reader :list_analyses ## # RPC-specific configuration for `delete_analysis` # @return [::Gapic::Config::Method] # attr_reader :delete_analysis ## # RPC-specific configuration for `bulk_analyze_conversations` # @return [::Gapic::Config::Method] # attr_reader :bulk_analyze_conversations ## # RPC-specific configuration for `bulk_delete_conversations` # @return [::Gapic::Config::Method] # attr_reader :bulk_delete_conversations ## # RPC-specific configuration for `ingest_conversations` # @return [::Gapic::Config::Method] # attr_reader :ingest_conversations ## # RPC-specific configuration for `export_insights_data` # @return [::Gapic::Config::Method] # attr_reader :export_insights_data ## # RPC-specific configuration for `create_issue_model` # @return [::Gapic::Config::Method] # attr_reader :create_issue_model ## # RPC-specific configuration for `update_issue_model` # @return [::Gapic::Config::Method] # attr_reader :update_issue_model ## # RPC-specific configuration for `get_issue_model` # @return [::Gapic::Config::Method] # attr_reader :get_issue_model ## # RPC-specific configuration for `list_issue_models` # @return [::Gapic::Config::Method] # attr_reader :list_issue_models ## # RPC-specific configuration for `delete_issue_model` # @return [::Gapic::Config::Method] # attr_reader :delete_issue_model ## # RPC-specific configuration for `deploy_issue_model` # @return [::Gapic::Config::Method] # attr_reader :deploy_issue_model ## # RPC-specific configuration for `undeploy_issue_model` # @return [::Gapic::Config::Method] # attr_reader :undeploy_issue_model ## # RPC-specific configuration for `get_issue` # @return [::Gapic::Config::Method] # attr_reader :get_issue ## # RPC-specific configuration for `list_issues` # @return [::Gapic::Config::Method] # attr_reader :list_issues ## # RPC-specific configuration for `update_issue` # @return [::Gapic::Config::Method] # attr_reader :update_issue ## # RPC-specific configuration for `delete_issue` # @return [::Gapic::Config::Method] # attr_reader :delete_issue ## # RPC-specific configuration for `calculate_issue_model_stats` # @return [::Gapic::Config::Method] # attr_reader :calculate_issue_model_stats ## # RPC-specific configuration for `create_phrase_matcher` # @return [::Gapic::Config::Method] # attr_reader :create_phrase_matcher ## # RPC-specific configuration for `get_phrase_matcher` # @return [::Gapic::Config::Method] # attr_reader :get_phrase_matcher ## # RPC-specific configuration for `list_phrase_matchers` # @return [::Gapic::Config::Method] # attr_reader :list_phrase_matchers ## # RPC-specific configuration for `delete_phrase_matcher` # @return [::Gapic::Config::Method] # attr_reader :delete_phrase_matcher ## # RPC-specific configuration for `update_phrase_matcher` # @return [::Gapic::Config::Method] # attr_reader :update_phrase_matcher ## # RPC-specific configuration for `calculate_stats` # @return [::Gapic::Config::Method] # attr_reader :calculate_stats ## # RPC-specific configuration for `get_settings` # @return [::Gapic::Config::Method] # attr_reader :get_settings ## # RPC-specific configuration for `update_settings` # @return [::Gapic::Config::Method] # attr_reader :update_settings ## # RPC-specific configuration for `create_view` # @return [::Gapic::Config::Method] # attr_reader :create_view ## # RPC-specific configuration for `get_view` # @return [::Gapic::Config::Method] # attr_reader :get_view ## # RPC-specific configuration for `list_views` # @return [::Gapic::Config::Method] # attr_reader :list_views ## # RPC-specific configuration for `update_view` # @return [::Gapic::Config::Method] # attr_reader :update_view ## # RPC-specific configuration for `delete_view` # @return [::Gapic::Config::Method] # attr_reader :delete_view # @private def initialize parent_rpcs = nil create_conversation_config = parent_rpcs.create_conversation if parent_rpcs.respond_to? :create_conversation @create_conversation = ::Gapic::Config::Method.new create_conversation_config upload_conversation_config = parent_rpcs.upload_conversation if parent_rpcs.respond_to? :upload_conversation @upload_conversation = ::Gapic::Config::Method.new upload_conversation_config update_conversation_config = parent_rpcs.update_conversation if parent_rpcs.respond_to? :update_conversation @update_conversation = ::Gapic::Config::Method.new update_conversation_config get_conversation_config = parent_rpcs.get_conversation if parent_rpcs.respond_to? :get_conversation @get_conversation = ::Gapic::Config::Method.new get_conversation_config list_conversations_config = parent_rpcs.list_conversations if parent_rpcs.respond_to? :list_conversations @list_conversations = ::Gapic::Config::Method.new list_conversations_config delete_conversation_config = parent_rpcs.delete_conversation if parent_rpcs.respond_to? :delete_conversation @delete_conversation = ::Gapic::Config::Method.new delete_conversation_config create_analysis_config = parent_rpcs.create_analysis if parent_rpcs.respond_to? :create_analysis @create_analysis = ::Gapic::Config::Method.new create_analysis_config get_analysis_config = parent_rpcs.get_analysis if parent_rpcs.respond_to? :get_analysis @get_analysis = ::Gapic::Config::Method.new get_analysis_config list_analyses_config = parent_rpcs.list_analyses if parent_rpcs.respond_to? :list_analyses @list_analyses = ::Gapic::Config::Method.new list_analyses_config delete_analysis_config = parent_rpcs.delete_analysis if parent_rpcs.respond_to? :delete_analysis @delete_analysis = ::Gapic::Config::Method.new delete_analysis_config bulk_analyze_conversations_config = parent_rpcs.bulk_analyze_conversations if parent_rpcs.respond_to? :bulk_analyze_conversations @bulk_analyze_conversations = ::Gapic::Config::Method.new bulk_analyze_conversations_config bulk_delete_conversations_config = parent_rpcs.bulk_delete_conversations if parent_rpcs.respond_to? :bulk_delete_conversations @bulk_delete_conversations = ::Gapic::Config::Method.new bulk_delete_conversations_config ingest_conversations_config = parent_rpcs.ingest_conversations if parent_rpcs.respond_to? :ingest_conversations @ingest_conversations = ::Gapic::Config::Method.new ingest_conversations_config export_insights_data_config = parent_rpcs.export_insights_data if parent_rpcs.respond_to? :export_insights_data @export_insights_data = ::Gapic::Config::Method.new export_insights_data_config create_issue_model_config = parent_rpcs.create_issue_model if parent_rpcs.respond_to? :create_issue_model @create_issue_model = ::Gapic::Config::Method.new create_issue_model_config update_issue_model_config = parent_rpcs.update_issue_model if parent_rpcs.respond_to? :update_issue_model @update_issue_model = ::Gapic::Config::Method.new update_issue_model_config get_issue_model_config = parent_rpcs.get_issue_model if parent_rpcs.respond_to? :get_issue_model @get_issue_model = ::Gapic::Config::Method.new get_issue_model_config list_issue_models_config = parent_rpcs.list_issue_models if parent_rpcs.respond_to? :list_issue_models @list_issue_models = ::Gapic::Config::Method.new list_issue_models_config delete_issue_model_config = parent_rpcs.delete_issue_model if parent_rpcs.respond_to? :delete_issue_model @delete_issue_model = ::Gapic::Config::Method.new delete_issue_model_config deploy_issue_model_config = parent_rpcs.deploy_issue_model if parent_rpcs.respond_to? :deploy_issue_model @deploy_issue_model = ::Gapic::Config::Method.new deploy_issue_model_config undeploy_issue_model_config = parent_rpcs.undeploy_issue_model if parent_rpcs.respond_to? :undeploy_issue_model @undeploy_issue_model = ::Gapic::Config::Method.new undeploy_issue_model_config get_issue_config = parent_rpcs.get_issue if parent_rpcs.respond_to? :get_issue @get_issue = ::Gapic::Config::Method.new get_issue_config list_issues_config = parent_rpcs.list_issues if parent_rpcs.respond_to? :list_issues @list_issues = ::Gapic::Config::Method.new list_issues_config update_issue_config = parent_rpcs.update_issue if parent_rpcs.respond_to? :update_issue @update_issue = ::Gapic::Config::Method.new update_issue_config delete_issue_config = parent_rpcs.delete_issue if parent_rpcs.respond_to? :delete_issue @delete_issue = ::Gapic::Config::Method.new delete_issue_config calculate_issue_model_stats_config = parent_rpcs.calculate_issue_model_stats if parent_rpcs.respond_to? :calculate_issue_model_stats @calculate_issue_model_stats = ::Gapic::Config::Method.new calculate_issue_model_stats_config create_phrase_matcher_config = parent_rpcs.create_phrase_matcher if parent_rpcs.respond_to? :create_phrase_matcher @create_phrase_matcher = ::Gapic::Config::Method.new create_phrase_matcher_config get_phrase_matcher_config = parent_rpcs.get_phrase_matcher if parent_rpcs.respond_to? :get_phrase_matcher @get_phrase_matcher = ::Gapic::Config::Method.new get_phrase_matcher_config list_phrase_matchers_config = parent_rpcs.list_phrase_matchers if parent_rpcs.respond_to? :list_phrase_matchers @list_phrase_matchers = ::Gapic::Config::Method.new list_phrase_matchers_config delete_phrase_matcher_config = parent_rpcs.delete_phrase_matcher if parent_rpcs.respond_to? :delete_phrase_matcher @delete_phrase_matcher = ::Gapic::Config::Method.new delete_phrase_matcher_config update_phrase_matcher_config = parent_rpcs.update_phrase_matcher if parent_rpcs.respond_to? :update_phrase_matcher @update_phrase_matcher = ::Gapic::Config::Method.new update_phrase_matcher_config calculate_stats_config = parent_rpcs.calculate_stats if parent_rpcs.respond_to? :calculate_stats @calculate_stats = ::Gapic::Config::Method.new calculate_stats_config get_settings_config = parent_rpcs.get_settings if parent_rpcs.respond_to? :get_settings @get_settings = ::Gapic::Config::Method.new get_settings_config update_settings_config = parent_rpcs.update_settings if parent_rpcs.respond_to? :update_settings @update_settings = ::Gapic::Config::Method.new update_settings_config create_view_config = parent_rpcs.create_view if parent_rpcs.respond_to? :create_view @create_view = ::Gapic::Config::Method.new create_view_config get_view_config = parent_rpcs.get_view if parent_rpcs.respond_to? :get_view @get_view = ::Gapic::Config::Method.new get_view_config list_views_config = parent_rpcs.list_views if parent_rpcs.respond_to? :list_views @list_views = ::Gapic::Config::Method.new list_views_config update_view_config = parent_rpcs.update_view if parent_rpcs.respond_to? :update_view @update_view = ::Gapic::Config::Method.new update_view_config delete_view_config = parent_rpcs.delete_view if parent_rpcs.respond_to? :delete_view @delete_view = ::Gapic::Config::Method.new delete_view_config yield self if block_given? end end end end end end end end end