google-cloud-contact_center_insights-v1 0.11.0 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 51121ba9d3f12c04fc8ff054f3b00fe2332c32dc1ed58bfb0886a2b75ee8e292
4
- data.tar.gz: 24401e47f4517c23800f5f9eff1bd1e1f71ff61ce2068adcf8412eb8d2bff93f
3
+ metadata.gz: b2e8806467adb8026553fe6fe3460d50f52f63b42ff878d50ce4ff602b28aa72
4
+ data.tar.gz: a3342786addd45af791dc5f228fef5cab12ca73c62ac532521a413ea308d3c78
5
5
  SHA512:
6
- metadata.gz: 6abac7ae8f60daf76ef6fa385b7f1759dc261e79fbfdfb09d4b85112976bd1a2620093f91bd2b1fc457d2dd614f2f9945d196832d91fcc942cb9f78aff056644
7
- data.tar.gz: 45c808e27d4b02fe440f1386a4aa8c19d9213da5b0d2f345528ce1c51dd9a5a207d163c7c781d8fa5fa96c6b2faf535e2b96ff9fd0d316fc3ee49e5ffee33f35
6
+ metadata.gz: d34e9396aca68eb6199319d46b267104b7ab46aef4536884415ef1b7c1b16dc312d8a10c84739c3e17a3cf62c2a942bd6dde9e7fb7f0e12008d3b3599890cdee
7
+ data.tar.gz: 5da5ea195cf1765d85269485118dc6e1d9358c271d6d1be618d339664ebf817d4aa26849d16c43400a37aeb1c5fcf41b4451338c95c81c790b8b311a09201bd3
data/README.md CHANGED
@@ -47,7 +47,7 @@ for general usage information.
47
47
 
48
48
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
49
  The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
- or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
50
+ or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
51
51
  that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
52
  and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
53
53
 
@@ -256,6 +256,113 @@ module Google
256
256
  raise ::Google::Cloud::Error.from_error(e)
257
257
  end
258
258
 
259
+ ##
260
+ # Create a longrunning conversation upload operation. This method differs
261
+ # from CreateConversation by allowing audio transcription and optional DLP
262
+ # redaction.
263
+ #
264
+ # @overload upload_conversation(request, options = nil)
265
+ # Pass arguments to `upload_conversation` via a request object, either of type
266
+ # {::Google::Cloud::ContactCenterInsights::V1::UploadConversationRequest} or an equivalent Hash.
267
+ #
268
+ # @param request [::Google::Cloud::ContactCenterInsights::V1::UploadConversationRequest, ::Hash]
269
+ # A request object representing the call parameters. Required. To specify no
270
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
271
+ # @param options [::Gapic::CallOptions, ::Hash]
272
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
273
+ #
274
+ # @overload upload_conversation(parent: nil, conversation: nil, conversation_id: nil, redaction_config: nil)
275
+ # Pass arguments to `upload_conversation` via keyword arguments. Note that at
276
+ # least one keyword argument is required. To specify no parameters, or to keep all
277
+ # the default parameter values, pass an empty Hash as a request object (see above).
278
+ #
279
+ # @param parent [::String]
280
+ # Required. The parent resource of the conversation.
281
+ # @param conversation [::Google::Cloud::ContactCenterInsights::V1::Conversation, ::Hash]
282
+ # Required. The conversation resource to create.
283
+ # @param conversation_id [::String]
284
+ # Optional. A unique ID for the new conversation. This ID will become the
285
+ # final component of the conversation's resource name. If no ID is specified,
286
+ # a server-generated ID will be used.
287
+ #
288
+ # This value should be 4-64 characters and must match the regular
289
+ # expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-`
290
+ # @param redaction_config [::Google::Cloud::ContactCenterInsights::V1::RedactionConfig, ::Hash]
291
+ # Optional. DLP settings for transcript redaction. Optional, will default to
292
+ # the config specified in Settings.
293
+ #
294
+ # @yield [response, operation] Access the result along with the RPC operation
295
+ # @yieldparam response [::Gapic::Operation]
296
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
297
+ #
298
+ # @return [::Gapic::Operation]
299
+ #
300
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
301
+ #
302
+ # @example Basic example
303
+ # require "google/cloud/contact_center_insights/v1"
304
+ #
305
+ # # Create a client object. The client can be reused for multiple calls.
306
+ # client = Google::Cloud::ContactCenterInsights::V1::ContactCenterInsights::Client.new
307
+ #
308
+ # # Create a request. To set request fields, pass in keyword arguments.
309
+ # request = Google::Cloud::ContactCenterInsights::V1::UploadConversationRequest.new
310
+ #
311
+ # # Call the upload_conversation method.
312
+ # result = client.upload_conversation request
313
+ #
314
+ # # The returned object is of type Gapic::Operation. You can use it to
315
+ # # check the status of an operation, cancel it, or wait for results.
316
+ # # Here is how to wait for a response.
317
+ # result.wait_until_done! timeout: 60
318
+ # if result.response?
319
+ # p result.response
320
+ # else
321
+ # puts "No response received."
322
+ # end
323
+ #
324
+ def upload_conversation request, options = nil
325
+ raise ::ArgumentError, "request must be provided" if request.nil?
326
+
327
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ContactCenterInsights::V1::UploadConversationRequest
328
+
329
+ # Converts hash and nil to an options object
330
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
331
+
332
+ # Customize the options with defaults
333
+ metadata = @config.rpcs.upload_conversation.metadata.to_h
334
+
335
+ # Set x-goog-api-client and x-goog-user-project headers
336
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
337
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
338
+ gapic_version: ::Google::Cloud::ContactCenterInsights::V1::VERSION
339
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
340
+
341
+ header_params = {}
342
+ if request.parent
343
+ header_params["parent"] = request.parent
344
+ end
345
+
346
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
347
+ metadata[:"x-goog-request-params"] ||= request_params_header
348
+
349
+ options.apply_defaults timeout: @config.rpcs.upload_conversation.timeout,
350
+ metadata: metadata,
351
+ retry_policy: @config.rpcs.upload_conversation.retry_policy
352
+
353
+ options.apply_defaults timeout: @config.timeout,
354
+ metadata: @config.metadata,
355
+ retry_policy: @config.retry_policy
356
+
357
+ @contact_center_insights_stub.call_rpc :upload_conversation, request, options: options do |response, operation|
358
+ response = ::Gapic::Operation.new response, @operations_client, options: options
359
+ yield response, operation if block_given?
360
+ return response
361
+ end
362
+ rescue ::GRPC::BadStatus => e
363
+ raise ::Google::Cloud::Error.from_error(e)
364
+ end
365
+
259
366
  ##
260
367
  # Updates a conversation.
261
368
  #
@@ -3549,9 +3656,9 @@ module Google
3549
3656
  # * (`String`) The path to a service account key file in JSON format
3550
3657
  # * (`Hash`) A service account key as a Hash
3551
3658
  # * (`Google::Auth::Credentials`) A googleauth credentials object
3552
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
3659
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
3553
3660
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
3554
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
3661
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
3555
3662
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
3556
3663
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
3557
3664
  # * (`nil`) indicating no credentials
@@ -3652,6 +3759,11 @@ module Google
3652
3759
  #
3653
3760
  attr_reader :create_conversation
3654
3761
  ##
3762
+ # RPC-specific configuration for `upload_conversation`
3763
+ # @return [::Gapic::Config::Method]
3764
+ #
3765
+ attr_reader :upload_conversation
3766
+ ##
3655
3767
  # RPC-specific configuration for `update_conversation`
3656
3768
  # @return [::Gapic::Config::Method]
3657
3769
  #
@@ -3836,6 +3948,8 @@ module Google
3836
3948
  def initialize parent_rpcs = nil
3837
3949
  create_conversation_config = parent_rpcs.create_conversation if parent_rpcs.respond_to? :create_conversation
3838
3950
  @create_conversation = ::Gapic::Config::Method.new create_conversation_config
3951
+ upload_conversation_config = parent_rpcs.upload_conversation if parent_rpcs.respond_to? :upload_conversation
3952
+ @upload_conversation = ::Gapic::Config::Method.new upload_conversation_config
3839
3953
  update_conversation_config = parent_rpcs.update_conversation if parent_rpcs.respond_to? :update_conversation
3840
3954
  @update_conversation = ::Gapic::Config::Method.new update_conversation_config
3841
3955
  get_conversation_config = parent_rpcs.get_conversation if parent_rpcs.respond_to? :get_conversation
@@ -620,9 +620,9 @@ module Google
620
620
  # * (`String`) The path to a service account key file in JSON format
621
621
  # * (`Hash`) A service account key as a Hash
622
622
  # * (`Google::Auth::Credentials`) A googleauth credentials object
623
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
623
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
624
624
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
625
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
625
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
626
626
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
627
627
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
628
628
  # * (`nil`) indicating no credentials