google-cloud-recaptcha_enterprise-v1 0.4.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -41,13 +41,12 @@ module Google
41
41
  # See {::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client::Configuration}
42
42
  # for a description of the configuration fields.
43
43
  #
44
- # ## Example
44
+ # @example
45
45
  #
46
- # To modify the configuration for all RecaptchaEnterpriseService clients:
47
- #
48
- # ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.configure do |config|
49
- # config.timeout = 10.0
50
- # end
46
+ # # Modify the configuration for all RecaptchaEnterpriseService clients
47
+ # ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.configure do |config|
48
+ # config.timeout = 10.0
49
+ # end
51
50
  #
52
51
  # @yield [config] Configure the Client client.
53
52
  # @yieldparam config [Client::Configuration]
@@ -108,19 +107,15 @@ module Google
108
107
  ##
109
108
  # Create a new RecaptchaEnterpriseService client object.
110
109
  #
111
- # ## Examples
112
- #
113
- # To create a new RecaptchaEnterpriseService client with the default
114
- # configuration:
115
- #
116
- # client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new
110
+ # @example
117
111
  #
118
- # To create a new RecaptchaEnterpriseService client with a custom
119
- # configuration:
112
+ # # Create a client using the default configuration
113
+ # client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new
120
114
  #
121
- # client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config|
122
- # config.timeout = 10.0
123
- # end
115
+ # # Create a client using a custom configuration
116
+ # client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config|
117
+ # config.timeout = 10.0
118
+ # end
124
119
  #
125
120
  # @yield [config] Configure the RecaptchaEnterpriseService client.
126
121
  # @yieldparam config [Client::Configuration]
@@ -140,14 +135,13 @@ module Google
140
135
 
141
136
  # Create credentials
142
137
  credentials = @config.credentials
143
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
138
+ # Use self-signed JWT if the endpoint is unchanged from default,
144
139
  # but only if the default endpoint does not have a region prefix.
145
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
146
- @config.endpoint == Client.configure.endpoint &&
140
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
147
141
  !@config.endpoint.split(".").first.include?("-")
148
142
  credentials ||= Credentials.default scope: @config.scope,
149
143
  enable_self_signed_jwt: enable_self_signed_jwt
150
- if credentials.is_a?(String) || credentials.is_a?(Hash)
144
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
151
145
  credentials = Credentials.new credentials, scope: @config.scope
152
146
  end
153
147
  @quota_project_id = @config.quota_project
@@ -196,6 +190,21 @@ module Google
196
190
  #
197
191
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
198
192
  #
193
+ # @example Basic example
194
+ # require "google/cloud/recaptcha_enterprise/v1"
195
+ #
196
+ # # Create a client object. The client can be reused for multiple calls.
197
+ # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new
198
+ #
199
+ # # Create a request. To set request fields, pass in keyword arguments.
200
+ # request = Google::Cloud::RecaptchaEnterprise::V1::CreateAssessmentRequest.new
201
+ #
202
+ # # Call the create_assessment method.
203
+ # result = client.create_assessment request
204
+ #
205
+ # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Assessment.
206
+ # p result
207
+ #
199
208
  def create_assessment request, options = nil
200
209
  raise ::ArgumentError, "request must be provided" if request.nil?
201
210
 
@@ -213,16 +222,20 @@ module Google
213
222
  gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1::VERSION
214
223
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
215
224
 
216
- header_params = {
217
- "parent" => request.parent
218
- }
225
+ header_params = {}
226
+ if request.parent
227
+ header_params["parent"] = request.parent
228
+ end
229
+
219
230
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
220
231
  metadata[:"x-goog-request-params"] ||= request_params_header
221
232
 
222
233
  options.apply_defaults timeout: @config.rpcs.create_assessment.timeout,
223
234
  metadata: metadata,
224
235
  retry_policy: @config.rpcs.create_assessment.retry_policy
225
- options.apply_defaults metadata: @config.metadata,
236
+
237
+ options.apply_defaults timeout: @config.timeout,
238
+ metadata: @config.metadata,
226
239
  retry_policy: @config.retry_policy
227
240
 
228
241
  @recaptcha_enterprise_service_stub.call_rpc :create_assessment, request, options: options do |response, operation|
@@ -235,7 +248,7 @@ module Google
235
248
 
236
249
  ##
237
250
  # Annotates a previously created Assessment to provide additional information
238
- # on whether the event turned out to be authentic or fradulent.
251
+ # on whether the event turned out to be authentic or fraudulent.
239
252
  #
240
253
  # @overload annotate_assessment(request, options = nil)
241
254
  # Pass arguments to `annotate_assessment` via a request object, either of type
@@ -247,7 +260,7 @@ module Google
247
260
  # @param options [::Gapic::CallOptions, ::Hash]
248
261
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
249
262
  #
250
- # @overload annotate_assessment(name: nil, annotation: nil)
263
+ # @overload annotate_assessment(name: nil, annotation: nil, reasons: nil, hashed_account_id: nil)
251
264
  # Pass arguments to `annotate_assessment` via keyword arguments. Note that at
252
265
  # least one keyword argument is required. To specify no parameters, or to keep all
253
266
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -256,7 +269,17 @@ module Google
256
269
  # Required. The resource name of the Assessment, in the format
257
270
  # "projects/\\{project}/assessments/\\{assessment}".
258
271
  # @param annotation [::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest::Annotation]
259
- # Required. The annotation that will be assigned to the Event.
272
+ # Optional. The annotation that will be assigned to the Event. This field can be left
273
+ # empty to provide reasons that apply to an event without concluding whether
274
+ # the event is legitimate or fraudulent.
275
+ # @param reasons [::Array<::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest::Reason>]
276
+ # Optional. Optional reasons for the annotation that will be assigned to the Event.
277
+ # @param hashed_account_id [::String]
278
+ # Optional. Optional unique stable hashed user identifier to apply to the assessment.
279
+ # This is an alternative to setting the hashed_account_id in
280
+ # CreateAssessment, for example when the account identifier is not yet known
281
+ # in the initial request. It is recommended that the identifier is hashed
282
+ # using hmac-sha256 with stable secret.
260
283
  #
261
284
  # @yield [response, operation] Access the result along with the RPC operation
262
285
  # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentResponse]
@@ -266,6 +289,21 @@ module Google
266
289
  #
267
290
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
268
291
  #
292
+ # @example Basic example
293
+ # require "google/cloud/recaptcha_enterprise/v1"
294
+ #
295
+ # # Create a client object. The client can be reused for multiple calls.
296
+ # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new
297
+ #
298
+ # # Create a request. To set request fields, pass in keyword arguments.
299
+ # request = Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest.new
300
+ #
301
+ # # Call the annotate_assessment method.
302
+ # result = client.annotate_assessment request
303
+ #
304
+ # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentResponse.
305
+ # p result
306
+ #
269
307
  def annotate_assessment request, options = nil
270
308
  raise ::ArgumentError, "request must be provided" if request.nil?
271
309
 
@@ -283,16 +321,20 @@ module Google
283
321
  gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1::VERSION
284
322
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
285
323
 
286
- header_params = {
287
- "name" => request.name
288
- }
324
+ header_params = {}
325
+ if request.name
326
+ header_params["name"] = request.name
327
+ end
328
+
289
329
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
290
330
  metadata[:"x-goog-request-params"] ||= request_params_header
291
331
 
292
332
  options.apply_defaults timeout: @config.rpcs.annotate_assessment.timeout,
293
333
  metadata: metadata,
294
334
  retry_policy: @config.rpcs.annotate_assessment.retry_policy
295
- options.apply_defaults metadata: @config.metadata,
335
+
336
+ options.apply_defaults timeout: @config.timeout,
337
+ metadata: @config.metadata,
296
338
  retry_policy: @config.retry_policy
297
339
 
298
340
  @recaptcha_enterprise_service_stub.call_rpc :annotate_assessment, request, options: options do |response, operation|
@@ -335,6 +377,21 @@ module Google
335
377
  #
336
378
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
337
379
  #
380
+ # @example Basic example
381
+ # require "google/cloud/recaptcha_enterprise/v1"
382
+ #
383
+ # # Create a client object. The client can be reused for multiple calls.
384
+ # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new
385
+ #
386
+ # # Create a request. To set request fields, pass in keyword arguments.
387
+ # request = Google::Cloud::RecaptchaEnterprise::V1::CreateKeyRequest.new
388
+ #
389
+ # # Call the create_key method.
390
+ # result = client.create_key request
391
+ #
392
+ # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Key.
393
+ # p result
394
+ #
338
395
  def create_key request, options = nil
339
396
  raise ::ArgumentError, "request must be provided" if request.nil?
340
397
 
@@ -352,16 +409,20 @@ module Google
352
409
  gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1::VERSION
353
410
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
354
411
 
355
- header_params = {
356
- "parent" => request.parent
357
- }
412
+ header_params = {}
413
+ if request.parent
414
+ header_params["parent"] = request.parent
415
+ end
416
+
358
417
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
359
418
  metadata[:"x-goog-request-params"] ||= request_params_header
360
419
 
361
420
  options.apply_defaults timeout: @config.rpcs.create_key.timeout,
362
421
  metadata: metadata,
363
422
  retry_policy: @config.rpcs.create_key.retry_policy
364
- options.apply_defaults metadata: @config.metadata,
423
+
424
+ options.apply_defaults timeout: @config.timeout,
425
+ metadata: @config.metadata,
365
426
  retry_policy: @config.retry_policy
366
427
 
367
428
  @recaptcha_enterprise_service_stub.call_rpc :create_key, request, options: options do |response, operation|
@@ -408,6 +469,27 @@ module Google
408
469
  #
409
470
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
410
471
  #
472
+ # @example Basic example
473
+ # require "google/cloud/recaptcha_enterprise/v1"
474
+ #
475
+ # # Create a client object. The client can be reused for multiple calls.
476
+ # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new
477
+ #
478
+ # # Create a request. To set request fields, pass in keyword arguments.
479
+ # request = Google::Cloud::RecaptchaEnterprise::V1::ListKeysRequest.new
480
+ #
481
+ # # Call the list_keys method.
482
+ # result = client.list_keys request
483
+ #
484
+ # # The returned object is of type Gapic::PagedEnumerable. You can
485
+ # # iterate over all elements by calling #each, and the enumerable
486
+ # # will lazily make API calls to fetch subsequent pages. Other
487
+ # # methods are also available for managing paging directly.
488
+ # result.each do |response|
489
+ # # Each element is of type ::Google::Cloud::RecaptchaEnterprise::V1::Key.
490
+ # p response
491
+ # end
492
+ #
411
493
  def list_keys request, options = nil
412
494
  raise ::ArgumentError, "request must be provided" if request.nil?
413
495
 
@@ -425,16 +507,20 @@ module Google
425
507
  gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1::VERSION
426
508
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
427
509
 
428
- header_params = {
429
- "parent" => request.parent
430
- }
510
+ header_params = {}
511
+ if request.parent
512
+ header_params["parent"] = request.parent
513
+ end
514
+
431
515
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
432
516
  metadata[:"x-goog-request-params"] ||= request_params_header
433
517
 
434
518
  options.apply_defaults timeout: @config.rpcs.list_keys.timeout,
435
519
  metadata: metadata,
436
520
  retry_policy: @config.rpcs.list_keys.retry_policy
437
- options.apply_defaults metadata: @config.metadata,
521
+
522
+ options.apply_defaults timeout: @config.timeout,
523
+ metadata: @config.metadata,
438
524
  retry_policy: @config.retry_policy
439
525
 
440
526
  @recaptcha_enterprise_service_stub.call_rpc :list_keys, request, options: options do |response, operation|
@@ -476,6 +562,21 @@ module Google
476
562
  #
477
563
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
478
564
  #
565
+ # @example Basic example
566
+ # require "google/cloud/recaptcha_enterprise/v1"
567
+ #
568
+ # # Create a client object. The client can be reused for multiple calls.
569
+ # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new
570
+ #
571
+ # # Create a request. To set request fields, pass in keyword arguments.
572
+ # request = Google::Cloud::RecaptchaEnterprise::V1::GetKeyRequest.new
573
+ #
574
+ # # Call the get_key method.
575
+ # result = client.get_key request
576
+ #
577
+ # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Key.
578
+ # p result
579
+ #
479
580
  def get_key request, options = nil
480
581
  raise ::ArgumentError, "request must be provided" if request.nil?
481
582
 
@@ -493,16 +594,20 @@ module Google
493
594
  gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1::VERSION
494
595
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
495
596
 
496
- header_params = {
497
- "name" => request.name
498
- }
597
+ header_params = {}
598
+ if request.name
599
+ header_params["name"] = request.name
600
+ end
601
+
499
602
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
500
603
  metadata[:"x-goog-request-params"] ||= request_params_header
501
604
 
502
605
  options.apply_defaults timeout: @config.rpcs.get_key.timeout,
503
606
  metadata: metadata,
504
607
  retry_policy: @config.rpcs.get_key.retry_policy
505
- options.apply_defaults metadata: @config.metadata,
608
+
609
+ options.apply_defaults timeout: @config.timeout,
610
+ metadata: @config.metadata,
506
611
  retry_policy: @config.retry_policy
507
612
 
508
613
  @recaptcha_enterprise_service_stub.call_rpc :get_key, request, options: options do |response, operation|
@@ -534,7 +639,7 @@ module Google
534
639
  # @param key [::Google::Cloud::RecaptchaEnterprise::V1::Key, ::Hash]
535
640
  # Required. The key to update.
536
641
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
537
- # Optional. The mask to control which field of the key get updated. If the mask is not
642
+ # Optional. The mask to control which fields of the key get updated. If the mask is not
538
643
  # present, all fields will be updated.
539
644
  #
540
645
  # @yield [response, operation] Access the result along with the RPC operation
@@ -545,6 +650,21 @@ module Google
545
650
  #
546
651
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
547
652
  #
653
+ # @example Basic example
654
+ # require "google/cloud/recaptcha_enterprise/v1"
655
+ #
656
+ # # Create a client object. The client can be reused for multiple calls.
657
+ # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new
658
+ #
659
+ # # Create a request. To set request fields, pass in keyword arguments.
660
+ # request = Google::Cloud::RecaptchaEnterprise::V1::UpdateKeyRequest.new
661
+ #
662
+ # # Call the update_key method.
663
+ # result = client.update_key request
664
+ #
665
+ # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Key.
666
+ # p result
667
+ #
548
668
  def update_key request, options = nil
549
669
  raise ::ArgumentError, "request must be provided" if request.nil?
550
670
 
@@ -562,16 +682,20 @@ module Google
562
682
  gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1::VERSION
563
683
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
564
684
 
565
- header_params = {
566
- "key.name" => request.key.name
567
- }
685
+ header_params = {}
686
+ if request.key&.name
687
+ header_params["key.name"] = request.key.name
688
+ end
689
+
568
690
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
569
691
  metadata[:"x-goog-request-params"] ||= request_params_header
570
692
 
571
693
  options.apply_defaults timeout: @config.rpcs.update_key.timeout,
572
694
  metadata: metadata,
573
695
  retry_policy: @config.rpcs.update_key.retry_policy
574
- options.apply_defaults metadata: @config.metadata,
696
+
697
+ options.apply_defaults timeout: @config.timeout,
698
+ metadata: @config.metadata,
575
699
  retry_policy: @config.retry_policy
576
700
 
577
701
  @recaptcha_enterprise_service_stub.call_rpc :update_key, request, options: options do |response, operation|
@@ -612,6 +736,21 @@ module Google
612
736
  #
613
737
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
614
738
  #
739
+ # @example Basic example
740
+ # require "google/cloud/recaptcha_enterprise/v1"
741
+ #
742
+ # # Create a client object. The client can be reused for multiple calls.
743
+ # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new
744
+ #
745
+ # # Create a request. To set request fields, pass in keyword arguments.
746
+ # request = Google::Cloud::RecaptchaEnterprise::V1::DeleteKeyRequest.new
747
+ #
748
+ # # Call the delete_key method.
749
+ # result = client.delete_key request
750
+ #
751
+ # # The returned object is of type Google::Protobuf::Empty.
752
+ # p result
753
+ #
615
754
  def delete_key request, options = nil
616
755
  raise ::ArgumentError, "request must be provided" if request.nil?
617
756
 
@@ -629,16 +768,20 @@ module Google
629
768
  gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1::VERSION
630
769
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
631
770
 
632
- header_params = {
633
- "name" => request.name
634
- }
771
+ header_params = {}
772
+ if request.name
773
+ header_params["name"] = request.name
774
+ end
775
+
635
776
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
636
777
  metadata[:"x-goog-request-params"] ||= request_params_header
637
778
 
638
779
  options.apply_defaults timeout: @config.rpcs.delete_key.timeout,
639
780
  metadata: metadata,
640
781
  retry_policy: @config.rpcs.delete_key.retry_policy
641
- options.apply_defaults metadata: @config.metadata,
782
+
783
+ options.apply_defaults timeout: @config.timeout,
784
+ metadata: @config.metadata,
642
785
  retry_policy: @config.retry_policy
643
786
 
644
787
  @recaptcha_enterprise_service_stub.call_rpc :delete_key, request, options: options do |response, operation|
@@ -649,6 +792,504 @@ module Google
649
792
  raise ::Google::Cloud::Error.from_error(e)
650
793
  end
651
794
 
795
+ ##
796
+ # Migrates an existing key from reCAPTCHA to reCAPTCHA Enterprise.
797
+ # Once a key is migrated, it can be used from either product. SiteVerify
798
+ # requests are billed as CreateAssessment calls. You must be
799
+ # authenticated as one of the current owners of the reCAPTCHA Site Key, and
800
+ # your user must have the reCAPTCHA Enterprise Admin IAM role in the
801
+ # destination project.
802
+ #
803
+ # @overload migrate_key(request, options = nil)
804
+ # Pass arguments to `migrate_key` via a request object, either of type
805
+ # {::Google::Cloud::RecaptchaEnterprise::V1::MigrateKeyRequest} or an equivalent Hash.
806
+ #
807
+ # @param request [::Google::Cloud::RecaptchaEnterprise::V1::MigrateKeyRequest, ::Hash]
808
+ # A request object representing the call parameters. Required. To specify no
809
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
810
+ # @param options [::Gapic::CallOptions, ::Hash]
811
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
812
+ #
813
+ # @overload migrate_key(name: nil)
814
+ # Pass arguments to `migrate_key` via keyword arguments. Note that at
815
+ # least one keyword argument is required. To specify no parameters, or to keep all
816
+ # the default parameter values, pass an empty Hash as a request object (see above).
817
+ #
818
+ # @param name [::String]
819
+ # Required. The name of the key to be migrated, in the format
820
+ # "projects/\\{project}/keys/\\{key}".
821
+ #
822
+ # @yield [response, operation] Access the result along with the RPC operation
823
+ # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1::Key]
824
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
825
+ #
826
+ # @return [::Google::Cloud::RecaptchaEnterprise::V1::Key]
827
+ #
828
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
829
+ #
830
+ # @example Basic example
831
+ # require "google/cloud/recaptcha_enterprise/v1"
832
+ #
833
+ # # Create a client object. The client can be reused for multiple calls.
834
+ # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new
835
+ #
836
+ # # Create a request. To set request fields, pass in keyword arguments.
837
+ # request = Google::Cloud::RecaptchaEnterprise::V1::MigrateKeyRequest.new
838
+ #
839
+ # # Call the migrate_key method.
840
+ # result = client.migrate_key request
841
+ #
842
+ # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Key.
843
+ # p result
844
+ #
845
+ def migrate_key request, options = nil
846
+ raise ::ArgumentError, "request must be provided" if request.nil?
847
+
848
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::MigrateKeyRequest
849
+
850
+ # Converts hash and nil to an options object
851
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
852
+
853
+ # Customize the options with defaults
854
+ metadata = @config.rpcs.migrate_key.metadata.to_h
855
+
856
+ # Set x-goog-api-client and x-goog-user-project headers
857
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
858
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
859
+ gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1::VERSION
860
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
861
+
862
+ header_params = {}
863
+ if request.name
864
+ header_params["name"] = request.name
865
+ end
866
+
867
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
868
+ metadata[:"x-goog-request-params"] ||= request_params_header
869
+
870
+ options.apply_defaults timeout: @config.rpcs.migrate_key.timeout,
871
+ metadata: metadata,
872
+ retry_policy: @config.rpcs.migrate_key.retry_policy
873
+
874
+ options.apply_defaults timeout: @config.timeout,
875
+ metadata: @config.metadata,
876
+ retry_policy: @config.retry_policy
877
+
878
+ @recaptcha_enterprise_service_stub.call_rpc :migrate_key, request, options: options do |response, operation|
879
+ yield response, operation if block_given?
880
+ return response
881
+ end
882
+ rescue ::GRPC::BadStatus => e
883
+ raise ::Google::Cloud::Error.from_error(e)
884
+ end
885
+
886
+ ##
887
+ # Get some aggregated metrics for a Key. This data can be used to build
888
+ # dashboards.
889
+ #
890
+ # @overload get_metrics(request, options = nil)
891
+ # Pass arguments to `get_metrics` via a request object, either of type
892
+ # {::Google::Cloud::RecaptchaEnterprise::V1::GetMetricsRequest} or an equivalent Hash.
893
+ #
894
+ # @param request [::Google::Cloud::RecaptchaEnterprise::V1::GetMetricsRequest, ::Hash]
895
+ # A request object representing the call parameters. Required. To specify no
896
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
897
+ # @param options [::Gapic::CallOptions, ::Hash]
898
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
899
+ #
900
+ # @overload get_metrics(name: nil)
901
+ # Pass arguments to `get_metrics` via keyword arguments. Note that at
902
+ # least one keyword argument is required. To specify no parameters, or to keep all
903
+ # the default parameter values, pass an empty Hash as a request object (see above).
904
+ #
905
+ # @param name [::String]
906
+ # Required. The name of the requested metrics, in the format
907
+ # "projects/\\{project}/keys/\\{key}/metrics".
908
+ #
909
+ # @yield [response, operation] Access the result along with the RPC operation
910
+ # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1::Metrics]
911
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
912
+ #
913
+ # @return [::Google::Cloud::RecaptchaEnterprise::V1::Metrics]
914
+ #
915
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
916
+ #
917
+ # @example Basic example
918
+ # require "google/cloud/recaptcha_enterprise/v1"
919
+ #
920
+ # # Create a client object. The client can be reused for multiple calls.
921
+ # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new
922
+ #
923
+ # # Create a request. To set request fields, pass in keyword arguments.
924
+ # request = Google::Cloud::RecaptchaEnterprise::V1::GetMetricsRequest.new
925
+ #
926
+ # # Call the get_metrics method.
927
+ # result = client.get_metrics request
928
+ #
929
+ # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1::Metrics.
930
+ # p result
931
+ #
932
+ def get_metrics request, options = nil
933
+ raise ::ArgumentError, "request must be provided" if request.nil?
934
+
935
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::GetMetricsRequest
936
+
937
+ # Converts hash and nil to an options object
938
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
939
+
940
+ # Customize the options with defaults
941
+ metadata = @config.rpcs.get_metrics.metadata.to_h
942
+
943
+ # Set x-goog-api-client and x-goog-user-project headers
944
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
945
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
946
+ gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1::VERSION
947
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
948
+
949
+ header_params = {}
950
+ if request.name
951
+ header_params["name"] = request.name
952
+ end
953
+
954
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
955
+ metadata[:"x-goog-request-params"] ||= request_params_header
956
+
957
+ options.apply_defaults timeout: @config.rpcs.get_metrics.timeout,
958
+ metadata: metadata,
959
+ retry_policy: @config.rpcs.get_metrics.retry_policy
960
+
961
+ options.apply_defaults timeout: @config.timeout,
962
+ metadata: @config.metadata,
963
+ retry_policy: @config.retry_policy
964
+
965
+ @recaptcha_enterprise_service_stub.call_rpc :get_metrics, request, options: options do |response, operation|
966
+ yield response, operation if block_given?
967
+ return response
968
+ end
969
+ rescue ::GRPC::BadStatus => e
970
+ raise ::Google::Cloud::Error.from_error(e)
971
+ end
972
+
973
+ ##
974
+ # List groups of related accounts.
975
+ #
976
+ # @overload list_related_account_groups(request, options = nil)
977
+ # Pass arguments to `list_related_account_groups` via a request object, either of type
978
+ # {::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupsRequest} or an equivalent Hash.
979
+ #
980
+ # @param request [::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupsRequest, ::Hash]
981
+ # A request object representing the call parameters. Required. To specify no
982
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
983
+ # @param options [::Gapic::CallOptions, ::Hash]
984
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
985
+ #
986
+ # @overload list_related_account_groups(parent: nil, page_size: nil, page_token: nil)
987
+ # Pass arguments to `list_related_account_groups` via keyword arguments. Note that at
988
+ # least one keyword argument is required. To specify no parameters, or to keep all
989
+ # the default parameter values, pass an empty Hash as a request object (see above).
990
+ #
991
+ # @param parent [::String]
992
+ # Required. The name of the project to list related account groups from, in the format
993
+ # "projects/\\{project}".
994
+ # @param page_size [::Integer]
995
+ # Optional. The maximum number of groups to return. The service may return fewer than
996
+ # this value.
997
+ # If unspecified, at most 50 groups will be returned.
998
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
999
+ # @param page_token [::String]
1000
+ # Optional. A page token, received from a previous `ListRelatedAccountGroups` call.
1001
+ # Provide this to retrieve the subsequent page.
1002
+ #
1003
+ # When paginating, all other parameters provided to
1004
+ # `ListRelatedAccountGroups` must match the call that provided the page
1005
+ # token.
1006
+ #
1007
+ # @yield [response, operation] Access the result along with the RPC operation
1008
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroup>]
1009
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1010
+ #
1011
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroup>]
1012
+ #
1013
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1014
+ #
1015
+ # @example Basic example
1016
+ # require "google/cloud/recaptcha_enterprise/v1"
1017
+ #
1018
+ # # Create a client object. The client can be reused for multiple calls.
1019
+ # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new
1020
+ #
1021
+ # # Create a request. To set request fields, pass in keyword arguments.
1022
+ # request = Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupsRequest.new
1023
+ #
1024
+ # # Call the list_related_account_groups method.
1025
+ # result = client.list_related_account_groups request
1026
+ #
1027
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1028
+ # # iterate over all elements by calling #each, and the enumerable
1029
+ # # will lazily make API calls to fetch subsequent pages. Other
1030
+ # # methods are also available for managing paging directly.
1031
+ # result.each do |response|
1032
+ # # Each element is of type ::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroup.
1033
+ # p response
1034
+ # end
1035
+ #
1036
+ def list_related_account_groups request, options = nil
1037
+ raise ::ArgumentError, "request must be provided" if request.nil?
1038
+
1039
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupsRequest
1040
+
1041
+ # Converts hash and nil to an options object
1042
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1043
+
1044
+ # Customize the options with defaults
1045
+ metadata = @config.rpcs.list_related_account_groups.metadata.to_h
1046
+
1047
+ # Set x-goog-api-client and x-goog-user-project headers
1048
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1049
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1050
+ gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1::VERSION
1051
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1052
+
1053
+ header_params = {}
1054
+ if request.parent
1055
+ header_params["parent"] = request.parent
1056
+ end
1057
+
1058
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1059
+ metadata[:"x-goog-request-params"] ||= request_params_header
1060
+
1061
+ options.apply_defaults timeout: @config.rpcs.list_related_account_groups.timeout,
1062
+ metadata: metadata,
1063
+ retry_policy: @config.rpcs.list_related_account_groups.retry_policy
1064
+
1065
+ options.apply_defaults timeout: @config.timeout,
1066
+ metadata: @config.metadata,
1067
+ retry_policy: @config.retry_policy
1068
+
1069
+ @recaptcha_enterprise_service_stub.call_rpc :list_related_account_groups, request, options: options do |response, operation|
1070
+ response = ::Gapic::PagedEnumerable.new @recaptcha_enterprise_service_stub, :list_related_account_groups, request, response, operation, options
1071
+ yield response, operation if block_given?
1072
+ return response
1073
+ end
1074
+ rescue ::GRPC::BadStatus => e
1075
+ raise ::Google::Cloud::Error.from_error(e)
1076
+ end
1077
+
1078
+ ##
1079
+ # Get the memberships in a group of related accounts.
1080
+ #
1081
+ # @overload list_related_account_group_memberships(request, options = nil)
1082
+ # Pass arguments to `list_related_account_group_memberships` via a request object, either of type
1083
+ # {::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupMembershipsRequest} or an equivalent Hash.
1084
+ #
1085
+ # @param request [::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupMembershipsRequest, ::Hash]
1086
+ # A request object representing the call parameters. Required. To specify no
1087
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1088
+ # @param options [::Gapic::CallOptions, ::Hash]
1089
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1090
+ #
1091
+ # @overload list_related_account_group_memberships(parent: nil, page_size: nil, page_token: nil)
1092
+ # Pass arguments to `list_related_account_group_memberships` via keyword arguments. Note that at
1093
+ # least one keyword argument is required. To specify no parameters, or to keep all
1094
+ # the default parameter values, pass an empty Hash as a request object (see above).
1095
+ #
1096
+ # @param parent [::String]
1097
+ # Required. The resource name for the related account group in the format
1098
+ # `projects/{project}/relatedaccountgroups/{relatedaccountgroup}`.
1099
+ # @param page_size [::Integer]
1100
+ # Optional. The maximum number of accounts to return. The service may return fewer than
1101
+ # this value.
1102
+ # If unspecified, at most 50 accounts will be returned.
1103
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
1104
+ # @param page_token [::String]
1105
+ # Optional. A page token, received from a previous `ListRelatedAccountGroupMemberships`
1106
+ # call.
1107
+ #
1108
+ # When paginating, all other parameters provided to
1109
+ # `ListRelatedAccountGroupMemberships` must match the call that provided the
1110
+ # page token.
1111
+ #
1112
+ # @yield [response, operation] Access the result along with the RPC operation
1113
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>]
1114
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1115
+ #
1116
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>]
1117
+ #
1118
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1119
+ #
1120
+ # @example Basic example
1121
+ # require "google/cloud/recaptcha_enterprise/v1"
1122
+ #
1123
+ # # Create a client object. The client can be reused for multiple calls.
1124
+ # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new
1125
+ #
1126
+ # # Create a request. To set request fields, pass in keyword arguments.
1127
+ # request = Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupMembershipsRequest.new
1128
+ #
1129
+ # # Call the list_related_account_group_memberships method.
1130
+ # result = client.list_related_account_group_memberships request
1131
+ #
1132
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1133
+ # # iterate over all elements by calling #each, and the enumerable
1134
+ # # will lazily make API calls to fetch subsequent pages. Other
1135
+ # # methods are also available for managing paging directly.
1136
+ # result.each do |response|
1137
+ # # Each element is of type ::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership.
1138
+ # p response
1139
+ # end
1140
+ #
1141
+ def list_related_account_group_memberships request, options = nil
1142
+ raise ::ArgumentError, "request must be provided" if request.nil?
1143
+
1144
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::ListRelatedAccountGroupMembershipsRequest
1145
+
1146
+ # Converts hash and nil to an options object
1147
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1148
+
1149
+ # Customize the options with defaults
1150
+ metadata = @config.rpcs.list_related_account_group_memberships.metadata.to_h
1151
+
1152
+ # Set x-goog-api-client and x-goog-user-project headers
1153
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1154
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1155
+ gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1::VERSION
1156
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1157
+
1158
+ header_params = {}
1159
+ if request.parent
1160
+ header_params["parent"] = request.parent
1161
+ end
1162
+
1163
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1164
+ metadata[:"x-goog-request-params"] ||= request_params_header
1165
+
1166
+ options.apply_defaults timeout: @config.rpcs.list_related_account_group_memberships.timeout,
1167
+ metadata: metadata,
1168
+ retry_policy: @config.rpcs.list_related_account_group_memberships.retry_policy
1169
+
1170
+ options.apply_defaults timeout: @config.timeout,
1171
+ metadata: @config.metadata,
1172
+ retry_policy: @config.retry_policy
1173
+
1174
+ @recaptcha_enterprise_service_stub.call_rpc :list_related_account_group_memberships, request, options: options do |response, operation|
1175
+ response = ::Gapic::PagedEnumerable.new @recaptcha_enterprise_service_stub, :list_related_account_group_memberships, request, response, operation, options
1176
+ yield response, operation if block_given?
1177
+ return response
1178
+ end
1179
+ rescue ::GRPC::BadStatus => e
1180
+ raise ::Google::Cloud::Error.from_error(e)
1181
+ end
1182
+
1183
+ ##
1184
+ # Search group memberships related to a given account.
1185
+ #
1186
+ # @overload search_related_account_group_memberships(request, options = nil)
1187
+ # Pass arguments to `search_related_account_group_memberships` via a request object, either of type
1188
+ # {::Google::Cloud::RecaptchaEnterprise::V1::SearchRelatedAccountGroupMembershipsRequest} or an equivalent Hash.
1189
+ #
1190
+ # @param request [::Google::Cloud::RecaptchaEnterprise::V1::SearchRelatedAccountGroupMembershipsRequest, ::Hash]
1191
+ # A request object representing the call parameters. Required. To specify no
1192
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1193
+ # @param options [::Gapic::CallOptions, ::Hash]
1194
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1195
+ #
1196
+ # @overload search_related_account_group_memberships(parent: nil, hashed_account_id: nil, page_size: nil, page_token: nil)
1197
+ # Pass arguments to `search_related_account_group_memberships` via keyword arguments. Note that at
1198
+ # least one keyword argument is required. To specify no parameters, or to keep all
1199
+ # the default parameter values, pass an empty Hash as a request object (see above).
1200
+ #
1201
+ # @param parent [::String]
1202
+ # Required. The name of the project to search related account group memberships from,
1203
+ # in the format "projects/\\{project}".
1204
+ # @param hashed_account_id [::String]
1205
+ # Optional. The unique stable hashed user identifier we should search connections to.
1206
+ # The identifier should correspond to a `hashed_account_id` provided in a
1207
+ # previous CreateAssessment or AnnotateAssessment call.
1208
+ # @param page_size [::Integer]
1209
+ # Optional. The maximum number of groups to return. The service may return fewer than
1210
+ # this value.
1211
+ # If unspecified, at most 50 groups will be returned.
1212
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
1213
+ # @param page_token [::String]
1214
+ # Optional. A page token, received from a previous
1215
+ # `SearchRelatedAccountGroupMemberships` call. Provide this to retrieve the
1216
+ # subsequent page.
1217
+ #
1218
+ # When paginating, all other parameters provided to
1219
+ # `SearchRelatedAccountGroupMemberships` must match the call that provided
1220
+ # the page token.
1221
+ #
1222
+ # @yield [response, operation] Access the result along with the RPC operation
1223
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>]
1224
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1225
+ #
1226
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership>]
1227
+ #
1228
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1229
+ #
1230
+ # @example Basic example
1231
+ # require "google/cloud/recaptcha_enterprise/v1"
1232
+ #
1233
+ # # Create a client object. The client can be reused for multiple calls.
1234
+ # client = Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new
1235
+ #
1236
+ # # Create a request. To set request fields, pass in keyword arguments.
1237
+ # request = Google::Cloud::RecaptchaEnterprise::V1::SearchRelatedAccountGroupMembershipsRequest.new
1238
+ #
1239
+ # # Call the search_related_account_group_memberships method.
1240
+ # result = client.search_related_account_group_memberships request
1241
+ #
1242
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1243
+ # # iterate over all elements by calling #each, and the enumerable
1244
+ # # will lazily make API calls to fetch subsequent pages. Other
1245
+ # # methods are also available for managing paging directly.
1246
+ # result.each do |response|
1247
+ # # Each element is of type ::Google::Cloud::RecaptchaEnterprise::V1::RelatedAccountGroupMembership.
1248
+ # p response
1249
+ # end
1250
+ #
1251
+ def search_related_account_group_memberships request, options = nil
1252
+ raise ::ArgumentError, "request must be provided" if request.nil?
1253
+
1254
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1::SearchRelatedAccountGroupMembershipsRequest
1255
+
1256
+ # Converts hash and nil to an options object
1257
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1258
+
1259
+ # Customize the options with defaults
1260
+ metadata = @config.rpcs.search_related_account_group_memberships.metadata.to_h
1261
+
1262
+ # Set x-goog-api-client and x-goog-user-project headers
1263
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1264
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1265
+ gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1::VERSION
1266
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1267
+
1268
+ header_params = {}
1269
+ if request.parent
1270
+ header_params["parent"] = request.parent
1271
+ end
1272
+
1273
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1274
+ metadata[:"x-goog-request-params"] ||= request_params_header
1275
+
1276
+ options.apply_defaults timeout: @config.rpcs.search_related_account_group_memberships.timeout,
1277
+ metadata: metadata,
1278
+ retry_policy: @config.rpcs.search_related_account_group_memberships.retry_policy
1279
+
1280
+ options.apply_defaults timeout: @config.timeout,
1281
+ metadata: @config.metadata,
1282
+ retry_policy: @config.retry_policy
1283
+
1284
+ @recaptcha_enterprise_service_stub.call_rpc :search_related_account_group_memberships, request, options: options do |response, operation|
1285
+ response = ::Gapic::PagedEnumerable.new @recaptcha_enterprise_service_stub, :search_related_account_group_memberships, request, response, operation, options
1286
+ yield response, operation if block_given?
1287
+ return response
1288
+ end
1289
+ rescue ::GRPC::BadStatus => e
1290
+ raise ::Google::Cloud::Error.from_error(e)
1291
+ end
1292
+
652
1293
  ##
653
1294
  # Configuration class for the RecaptchaEnterpriseService API.
654
1295
  #
@@ -662,22 +1303,21 @@ module Google
662
1303
  # Configuration can be applied globally to all clients, or to a single client
663
1304
  # on construction.
664
1305
  #
665
- # # Examples
666
- #
667
- # To modify the global config, setting the timeout for create_assessment
668
- # to 20 seconds, and all remaining timeouts to 10 seconds:
1306
+ # @example
669
1307
  #
670
- # ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.configure do |config|
671
- # config.timeout = 10.0
672
- # config.rpcs.create_assessment.timeout = 20.0
673
- # end
1308
+ # # Modify the global config, setting the timeout for
1309
+ # # create_assessment to 20 seconds,
1310
+ # # and all remaining timeouts to 10 seconds.
1311
+ # ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.configure do |config|
1312
+ # config.timeout = 10.0
1313
+ # config.rpcs.create_assessment.timeout = 20.0
1314
+ # end
674
1315
  #
675
- # To apply the above configuration only to a new client:
676
- #
677
- # client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config|
678
- # config.timeout = 10.0
679
- # config.rpcs.create_assessment.timeout = 20.0
680
- # end
1316
+ # # Apply the above configuration only to a new client.
1317
+ # client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config|
1318
+ # config.timeout = 10.0
1319
+ # config.rpcs.create_assessment.timeout = 20.0
1320
+ # end
681
1321
  #
682
1322
  # @!attribute [rw] endpoint
683
1323
  # The hostname or hostname:port of the service endpoint.
@@ -820,6 +1460,31 @@ module Google
820
1460
  # @return [::Gapic::Config::Method]
821
1461
  #
822
1462
  attr_reader :delete_key
1463
+ ##
1464
+ # RPC-specific configuration for `migrate_key`
1465
+ # @return [::Gapic::Config::Method]
1466
+ #
1467
+ attr_reader :migrate_key
1468
+ ##
1469
+ # RPC-specific configuration for `get_metrics`
1470
+ # @return [::Gapic::Config::Method]
1471
+ #
1472
+ attr_reader :get_metrics
1473
+ ##
1474
+ # RPC-specific configuration for `list_related_account_groups`
1475
+ # @return [::Gapic::Config::Method]
1476
+ #
1477
+ attr_reader :list_related_account_groups
1478
+ ##
1479
+ # RPC-specific configuration for `list_related_account_group_memberships`
1480
+ # @return [::Gapic::Config::Method]
1481
+ #
1482
+ attr_reader :list_related_account_group_memberships
1483
+ ##
1484
+ # RPC-specific configuration for `search_related_account_group_memberships`
1485
+ # @return [::Gapic::Config::Method]
1486
+ #
1487
+ attr_reader :search_related_account_group_memberships
823
1488
 
824
1489
  # @private
825
1490
  def initialize parent_rpcs = nil
@@ -837,6 +1502,16 @@ module Google
837
1502
  @update_key = ::Gapic::Config::Method.new update_key_config
838
1503
  delete_key_config = parent_rpcs.delete_key if parent_rpcs.respond_to? :delete_key
839
1504
  @delete_key = ::Gapic::Config::Method.new delete_key_config
1505
+ migrate_key_config = parent_rpcs.migrate_key if parent_rpcs.respond_to? :migrate_key
1506
+ @migrate_key = ::Gapic::Config::Method.new migrate_key_config
1507
+ get_metrics_config = parent_rpcs.get_metrics if parent_rpcs.respond_to? :get_metrics
1508
+ @get_metrics = ::Gapic::Config::Method.new get_metrics_config
1509
+ list_related_account_groups_config = parent_rpcs.list_related_account_groups if parent_rpcs.respond_to? :list_related_account_groups
1510
+ @list_related_account_groups = ::Gapic::Config::Method.new list_related_account_groups_config
1511
+ list_related_account_group_memberships_config = parent_rpcs.list_related_account_group_memberships if parent_rpcs.respond_to? :list_related_account_group_memberships
1512
+ @list_related_account_group_memberships = ::Gapic::Config::Method.new list_related_account_group_memberships_config
1513
+ search_related_account_group_memberships_config = parent_rpcs.search_related_account_group_memberships if parent_rpcs.respond_to? :search_related_account_group_memberships
1514
+ @search_related_account_group_memberships = ::Gapic::Config::Method.new search_related_account_group_memberships_config
840
1515
 
841
1516
  yield self if block_given?
842
1517
  end