google-cloud-recaptcha_enterprise-v1beta1 0.4.5 → 0.5.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6575f12649703f75c691fcd8834cd9623a02714a015c7923bb8c916b9a8c9602
4
- data.tar.gz: 2e6aacdeecc7899b692c4523775cbd1e470b0fe4a9cce2dde06492d48aaa2d3e
3
+ metadata.gz: d725db565813ecf088e0455f27d57b12cb30501c90488751a2175912a3b8a814
4
+ data.tar.gz: c2519580e8d59434d1f1c8455ab14dc15e49b093567fdc93bb2d23374bc37c07
5
5
  SHA512:
6
- metadata.gz: 94110565d43cbae20197768eb7c1d22dae970d82237e8d22f9e10b73b2933fad6c5197c74ad1c5ff4d41003dce107f257385ae155029e9d97f5b07b929d9e8f6
7
- data.tar.gz: bf73b6828491e85c1a07000851e27c497a1719a8d96e9cab7f35b94ab72c591951b353021b24f59b4dcac7a4a182974dd8d8b2e42eb282be522a73df872def5c
6
+ metadata.gz: 65662d5d8c1ad19f039934d6b31ac4aba1047fb64d6900e12dfe5115defce76e2f7eeb498983918218cebbcdc9bb8ecb51e562a31f34e032d10b9cb1d7d57002
7
+ data.tar.gz: aee7bb13eac33dff2048a8b447a7e7c904ba71af894fb9c919c2eb5d45d440c598d3df076c54711885a10089e5272c1e08948854caff516e2e62541c04bb9db4
data/README.md CHANGED
@@ -37,7 +37,7 @@ request = ::Google::Cloud::RecaptchaEnterprise::V1beta1::CreateAssessmentRequest
37
37
  response = client.create_assessment request
38
38
  ```
39
39
 
40
- View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-recaptcha_enterprise-v1beta1/latest)
40
+ View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1beta1/latest)
41
41
  for class and method documentation.
42
42
 
43
43
  See also the [Product Documentation](https://cloud.google.com/recaptcha-enterprise)
@@ -68,16 +68,6 @@ module Google
68
68
 
69
69
  default_config.rpcs.annotate_assessment.timeout = 600.0
70
70
 
71
- default_config.rpcs.create_key.timeout = 600.0
72
-
73
- default_config.rpcs.list_keys.timeout = 600.0
74
-
75
- default_config.rpcs.get_key.timeout = 600.0
76
-
77
- default_config.rpcs.update_key.timeout = 600.0
78
-
79
- default_config.rpcs.delete_key.timeout = 600.0
80
-
81
71
  default_config
82
72
  end
83
73
  yield @configure if block_given?
@@ -260,7 +250,7 @@ module Google
260
250
  # @param options [::Gapic::CallOptions, ::Hash]
261
251
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
262
252
  #
263
- # @overload annotate_assessment(name: nil, annotation: nil)
253
+ # @overload annotate_assessment(name: nil, annotation: nil, reasons: nil, hashed_account_id: nil)
264
254
  # Pass arguments to `annotate_assessment` via keyword arguments. Note that at
265
255
  # least one keyword argument is required. To specify no parameters, or to keep all
266
256
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -269,7 +259,17 @@ module Google
269
259
  # Required. The resource name of the Assessment, in the format
270
260
  # "projects/\\{project_number}/assessments/\\{assessment_id}".
271
261
  # @param annotation [::Google::Cloud::RecaptchaEnterprise::V1beta1::AnnotateAssessmentRequest::Annotation]
272
- # Required. The annotation that will be assigned to the Event.
262
+ # Optional. The annotation that will be assigned to the Event. This field can be left
263
+ # empty to provide reasons that apply to an event without concluding whether
264
+ # the event is legitimate or fraudulent.
265
+ # @param reasons [::Array<::Google::Cloud::RecaptchaEnterprise::V1beta1::AnnotateAssessmentRequest::Reason>]
266
+ # Optional. Optional reasons for the annotation that will be assigned to the Event.
267
+ # @param hashed_account_id [::String]
268
+ # Optional. Optional unique stable hashed user identifier to apply to the assessment.
269
+ # This is an alternative to setting the hashed_account_id in
270
+ # CreateAssessment, for example when the account identifier is not yet known
271
+ # in the initial request. It is recommended that the identifier is hashed
272
+ # using hmac-sha256 with stable secret.
273
273
  #
274
274
  # @yield [response, operation] Access the result along with the RPC operation
275
275
  # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1beta1::AnnotateAssessmentResponse]
@@ -335,453 +335,6 @@ module Google
335
335
  raise ::Google::Cloud::Error.from_error(e)
336
336
  end
337
337
 
338
- ##
339
- # Creates a new reCAPTCHA Enterprise key.
340
- #
341
- # @overload create_key(request, options = nil)
342
- # Pass arguments to `create_key` via a request object, either of type
343
- # {::Google::Cloud::RecaptchaEnterprise::V1beta1::CreateKeyRequest} or an equivalent Hash.
344
- #
345
- # @param request [::Google::Cloud::RecaptchaEnterprise::V1beta1::CreateKeyRequest, ::Hash]
346
- # A request object representing the call parameters. Required. To specify no
347
- # parameters, or to keep all the default parameter values, pass an empty Hash.
348
- # @param options [::Gapic::CallOptions, ::Hash]
349
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
350
- #
351
- # @overload create_key(parent: nil, key: nil)
352
- # Pass arguments to `create_key` via keyword arguments. Note that at
353
- # least one keyword argument is required. To specify no parameters, or to keep all
354
- # the default parameter values, pass an empty Hash as a request object (see above).
355
- #
356
- # @param parent [::String]
357
- # Required. The name of the project in which the key will be created, in the
358
- # format "projects/\\{project_number}".
359
- # @param key [::Google::Cloud::RecaptchaEnterprise::V1beta1::Key, ::Hash]
360
- # Required. Information to create a reCAPTCHA Enterprise key.
361
- #
362
- # @yield [response, operation] Access the result along with the RPC operation
363
- # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1beta1::Key]
364
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
365
- #
366
- # @return [::Google::Cloud::RecaptchaEnterprise::V1beta1::Key]
367
- #
368
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
369
- #
370
- # @example Basic example
371
- # require "google/cloud/recaptcha_enterprise/v1beta1"
372
- #
373
- # # Create a client object. The client can be reused for multiple calls.
374
- # client = Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.new
375
- #
376
- # # Create a request. To set request fields, pass in keyword arguments.
377
- # request = Google::Cloud::RecaptchaEnterprise::V1beta1::CreateKeyRequest.new
378
- #
379
- # # Call the create_key method.
380
- # result = client.create_key request
381
- #
382
- # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1beta1::Key.
383
- # p result
384
- #
385
- def create_key request, options = nil
386
- raise ::ArgumentError, "request must be provided" if request.nil?
387
-
388
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1beta1::CreateKeyRequest
389
-
390
- # Converts hash and nil to an options object
391
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
392
-
393
- # Customize the options with defaults
394
- metadata = @config.rpcs.create_key.metadata.to_h
395
-
396
- # Set x-goog-api-client and x-goog-user-project headers
397
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
398
- lib_name: @config.lib_name, lib_version: @config.lib_version,
399
- gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1beta1::VERSION
400
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
401
-
402
- header_params = {}
403
- if request.parent
404
- header_params["parent"] = request.parent
405
- end
406
-
407
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
408
- metadata[:"x-goog-request-params"] ||= request_params_header
409
-
410
- options.apply_defaults timeout: @config.rpcs.create_key.timeout,
411
- metadata: metadata,
412
- retry_policy: @config.rpcs.create_key.retry_policy
413
-
414
- options.apply_defaults timeout: @config.timeout,
415
- metadata: @config.metadata,
416
- retry_policy: @config.retry_policy
417
-
418
- @recaptcha_enterprise_service_stub.call_rpc :create_key, request, options: options do |response, operation|
419
- yield response, operation if block_given?
420
- return response
421
- end
422
- rescue ::GRPC::BadStatus => e
423
- raise ::Google::Cloud::Error.from_error(e)
424
- end
425
-
426
- ##
427
- # Returns the list of all keys that belong to a project.
428
- #
429
- # @overload list_keys(request, options = nil)
430
- # Pass arguments to `list_keys` via a request object, either of type
431
- # {::Google::Cloud::RecaptchaEnterprise::V1beta1::ListKeysRequest} or an equivalent Hash.
432
- #
433
- # @param request [::Google::Cloud::RecaptchaEnterprise::V1beta1::ListKeysRequest, ::Hash]
434
- # A request object representing the call parameters. Required. To specify no
435
- # parameters, or to keep all the default parameter values, pass an empty Hash.
436
- # @param options [::Gapic::CallOptions, ::Hash]
437
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
438
- #
439
- # @overload list_keys(parent: nil, page_size: nil, page_token: nil)
440
- # Pass arguments to `list_keys` via keyword arguments. Note that at
441
- # least one keyword argument is required. To specify no parameters, or to keep all
442
- # the default parameter values, pass an empty Hash as a request object (see above).
443
- #
444
- # @param parent [::String]
445
- # Required. The name of the project that contains the keys that will be
446
- # listed, in the format "projects/\\{project_number}".
447
- # @param page_size [::Integer]
448
- # Optional. The maximum number of keys to return. Default is 10. Max limit is
449
- # 1000.
450
- # @param page_token [::String]
451
- # Optional. The next_page_token value returned from a previous.
452
- # ListKeysRequest, if any.
453
- #
454
- # @yield [response, operation] Access the result along with the RPC operation
455
- # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1beta1::Key>]
456
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
457
- #
458
- # @return [::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1beta1::Key>]
459
- #
460
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
461
- #
462
- # @example Basic example
463
- # require "google/cloud/recaptcha_enterprise/v1beta1"
464
- #
465
- # # Create a client object. The client can be reused for multiple calls.
466
- # client = Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.new
467
- #
468
- # # Create a request. To set request fields, pass in keyword arguments.
469
- # request = Google::Cloud::RecaptchaEnterprise::V1beta1::ListKeysRequest.new
470
- #
471
- # # Call the list_keys method.
472
- # result = client.list_keys request
473
- #
474
- # # The returned object is of type Gapic::PagedEnumerable. You can
475
- # # iterate over all elements by calling #each, and the enumerable
476
- # # will lazily make API calls to fetch subsequent pages. Other
477
- # # methods are also available for managing paging directly.
478
- # result.each do |response|
479
- # # Each element is of type ::Google::Cloud::RecaptchaEnterprise::V1beta1::Key.
480
- # p response
481
- # end
482
- #
483
- def list_keys request, options = nil
484
- raise ::ArgumentError, "request must be provided" if request.nil?
485
-
486
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1beta1::ListKeysRequest
487
-
488
- # Converts hash and nil to an options object
489
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
490
-
491
- # Customize the options with defaults
492
- metadata = @config.rpcs.list_keys.metadata.to_h
493
-
494
- # Set x-goog-api-client and x-goog-user-project headers
495
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
496
- lib_name: @config.lib_name, lib_version: @config.lib_version,
497
- gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1beta1::VERSION
498
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
499
-
500
- header_params = {}
501
- if request.parent
502
- header_params["parent"] = request.parent
503
- end
504
-
505
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
506
- metadata[:"x-goog-request-params"] ||= request_params_header
507
-
508
- options.apply_defaults timeout: @config.rpcs.list_keys.timeout,
509
- metadata: metadata,
510
- retry_policy: @config.rpcs.list_keys.retry_policy
511
-
512
- options.apply_defaults timeout: @config.timeout,
513
- metadata: @config.metadata,
514
- retry_policy: @config.retry_policy
515
-
516
- @recaptcha_enterprise_service_stub.call_rpc :list_keys, request, options: options do |response, operation|
517
- response = ::Gapic::PagedEnumerable.new @recaptcha_enterprise_service_stub, :list_keys, request, response, operation, options
518
- yield response, operation if block_given?
519
- return response
520
- end
521
- rescue ::GRPC::BadStatus => e
522
- raise ::Google::Cloud::Error.from_error(e)
523
- end
524
-
525
- ##
526
- # Returns the specified key.
527
- #
528
- # @overload get_key(request, options = nil)
529
- # Pass arguments to `get_key` via a request object, either of type
530
- # {::Google::Cloud::RecaptchaEnterprise::V1beta1::GetKeyRequest} or an equivalent Hash.
531
- #
532
- # @param request [::Google::Cloud::RecaptchaEnterprise::V1beta1::GetKeyRequest, ::Hash]
533
- # A request object representing the call parameters. Required. To specify no
534
- # parameters, or to keep all the default parameter values, pass an empty Hash.
535
- # @param options [::Gapic::CallOptions, ::Hash]
536
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
537
- #
538
- # @overload get_key(name: nil)
539
- # Pass arguments to `get_key` via keyword arguments. Note that at
540
- # least one keyword argument is required. To specify no parameters, or to keep all
541
- # the default parameter values, pass an empty Hash as a request object (see above).
542
- #
543
- # @param name [::String]
544
- # Required. The name of the requested key, in the format
545
- # "projects/\\{project_number}/keys/\\{key_id}".
546
- #
547
- # @yield [response, operation] Access the result along with the RPC operation
548
- # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1beta1::Key]
549
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
550
- #
551
- # @return [::Google::Cloud::RecaptchaEnterprise::V1beta1::Key]
552
- #
553
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
554
- #
555
- # @example Basic example
556
- # require "google/cloud/recaptcha_enterprise/v1beta1"
557
- #
558
- # # Create a client object. The client can be reused for multiple calls.
559
- # client = Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.new
560
- #
561
- # # Create a request. To set request fields, pass in keyword arguments.
562
- # request = Google::Cloud::RecaptchaEnterprise::V1beta1::GetKeyRequest.new
563
- #
564
- # # Call the get_key method.
565
- # result = client.get_key request
566
- #
567
- # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1beta1::Key.
568
- # p result
569
- #
570
- def get_key request, options = nil
571
- raise ::ArgumentError, "request must be provided" if request.nil?
572
-
573
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1beta1::GetKeyRequest
574
-
575
- # Converts hash and nil to an options object
576
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
577
-
578
- # Customize the options with defaults
579
- metadata = @config.rpcs.get_key.metadata.to_h
580
-
581
- # Set x-goog-api-client and x-goog-user-project headers
582
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
583
- lib_name: @config.lib_name, lib_version: @config.lib_version,
584
- gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1beta1::VERSION
585
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
586
-
587
- header_params = {}
588
- if request.name
589
- header_params["name"] = request.name
590
- end
591
-
592
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
593
- metadata[:"x-goog-request-params"] ||= request_params_header
594
-
595
- options.apply_defaults timeout: @config.rpcs.get_key.timeout,
596
- metadata: metadata,
597
- retry_policy: @config.rpcs.get_key.retry_policy
598
-
599
- options.apply_defaults timeout: @config.timeout,
600
- metadata: @config.metadata,
601
- retry_policy: @config.retry_policy
602
-
603
- @recaptcha_enterprise_service_stub.call_rpc :get_key, request, options: options do |response, operation|
604
- yield response, operation if block_given?
605
- return response
606
- end
607
- rescue ::GRPC::BadStatus => e
608
- raise ::Google::Cloud::Error.from_error(e)
609
- end
610
-
611
- ##
612
- # Updates the specified key.
613
- #
614
- # @overload update_key(request, options = nil)
615
- # Pass arguments to `update_key` via a request object, either of type
616
- # {::Google::Cloud::RecaptchaEnterprise::V1beta1::UpdateKeyRequest} or an equivalent Hash.
617
- #
618
- # @param request [::Google::Cloud::RecaptchaEnterprise::V1beta1::UpdateKeyRequest, ::Hash]
619
- # A request object representing the call parameters. Required. To specify no
620
- # parameters, or to keep all the default parameter values, pass an empty Hash.
621
- # @param options [::Gapic::CallOptions, ::Hash]
622
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
623
- #
624
- # @overload update_key(key: nil, update_mask: nil)
625
- # Pass arguments to `update_key` via keyword arguments. Note that at
626
- # least one keyword argument is required. To specify no parameters, or to keep all
627
- # the default parameter values, pass an empty Hash as a request object (see above).
628
- #
629
- # @param key [::Google::Cloud::RecaptchaEnterprise::V1beta1::Key, ::Hash]
630
- # Required. The key to update.
631
- # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
632
- # Optional. The mask to control which field of the key get updated. If the mask is not
633
- # present, all fields will be updated.
634
- #
635
- # @yield [response, operation] Access the result along with the RPC operation
636
- # @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1beta1::Key]
637
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
638
- #
639
- # @return [::Google::Cloud::RecaptchaEnterprise::V1beta1::Key]
640
- #
641
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
642
- #
643
- # @example Basic example
644
- # require "google/cloud/recaptcha_enterprise/v1beta1"
645
- #
646
- # # Create a client object. The client can be reused for multiple calls.
647
- # client = Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.new
648
- #
649
- # # Create a request. To set request fields, pass in keyword arguments.
650
- # request = Google::Cloud::RecaptchaEnterprise::V1beta1::UpdateKeyRequest.new
651
- #
652
- # # Call the update_key method.
653
- # result = client.update_key request
654
- #
655
- # # The returned object is of type Google::Cloud::RecaptchaEnterprise::V1beta1::Key.
656
- # p result
657
- #
658
- def update_key request, options = nil
659
- raise ::ArgumentError, "request must be provided" if request.nil?
660
-
661
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1beta1::UpdateKeyRequest
662
-
663
- # Converts hash and nil to an options object
664
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
665
-
666
- # Customize the options with defaults
667
- metadata = @config.rpcs.update_key.metadata.to_h
668
-
669
- # Set x-goog-api-client and x-goog-user-project headers
670
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
671
- lib_name: @config.lib_name, lib_version: @config.lib_version,
672
- gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1beta1::VERSION
673
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
674
-
675
- header_params = {}
676
- if request.key&.name
677
- header_params["key.name"] = request.key.name
678
- end
679
-
680
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
681
- metadata[:"x-goog-request-params"] ||= request_params_header
682
-
683
- options.apply_defaults timeout: @config.rpcs.update_key.timeout,
684
- metadata: metadata,
685
- retry_policy: @config.rpcs.update_key.retry_policy
686
-
687
- options.apply_defaults timeout: @config.timeout,
688
- metadata: @config.metadata,
689
- retry_policy: @config.retry_policy
690
-
691
- @recaptcha_enterprise_service_stub.call_rpc :update_key, request, options: options do |response, operation|
692
- yield response, operation if block_given?
693
- return response
694
- end
695
- rescue ::GRPC::BadStatus => e
696
- raise ::Google::Cloud::Error.from_error(e)
697
- end
698
-
699
- ##
700
- # Deletes the specified key.
701
- #
702
- # @overload delete_key(request, options = nil)
703
- # Pass arguments to `delete_key` via a request object, either of type
704
- # {::Google::Cloud::RecaptchaEnterprise::V1beta1::DeleteKeyRequest} or an equivalent Hash.
705
- #
706
- # @param request [::Google::Cloud::RecaptchaEnterprise::V1beta1::DeleteKeyRequest, ::Hash]
707
- # A request object representing the call parameters. Required. To specify no
708
- # parameters, or to keep all the default parameter values, pass an empty Hash.
709
- # @param options [::Gapic::CallOptions, ::Hash]
710
- # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
711
- #
712
- # @overload delete_key(name: nil)
713
- # Pass arguments to `delete_key` via keyword arguments. Note that at
714
- # least one keyword argument is required. To specify no parameters, or to keep all
715
- # the default parameter values, pass an empty Hash as a request object (see above).
716
- #
717
- # @param name [::String]
718
- # Required. The name of the key to be deleted, in the format
719
- # "projects/\\{project_number}/keys/\\{key_id}".
720
- #
721
- # @yield [response, operation] Access the result along with the RPC operation
722
- # @yieldparam response [::Google::Protobuf::Empty]
723
- # @yieldparam operation [::GRPC::ActiveCall::Operation]
724
- #
725
- # @return [::Google::Protobuf::Empty]
726
- #
727
- # @raise [::Google::Cloud::Error] if the RPC is aborted.
728
- #
729
- # @example Basic example
730
- # require "google/cloud/recaptcha_enterprise/v1beta1"
731
- #
732
- # # Create a client object. The client can be reused for multiple calls.
733
- # client = Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.new
734
- #
735
- # # Create a request. To set request fields, pass in keyword arguments.
736
- # request = Google::Cloud::RecaptchaEnterprise::V1beta1::DeleteKeyRequest.new
737
- #
738
- # # Call the delete_key method.
739
- # result = client.delete_key request
740
- #
741
- # # The returned object is of type Google::Protobuf::Empty.
742
- # p result
743
- #
744
- def delete_key request, options = nil
745
- raise ::ArgumentError, "request must be provided" if request.nil?
746
-
747
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1beta1::DeleteKeyRequest
748
-
749
- # Converts hash and nil to an options object
750
- options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
751
-
752
- # Customize the options with defaults
753
- metadata = @config.rpcs.delete_key.metadata.to_h
754
-
755
- # Set x-goog-api-client and x-goog-user-project headers
756
- metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
757
- lib_name: @config.lib_name, lib_version: @config.lib_version,
758
- gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1beta1::VERSION
759
- metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
760
-
761
- header_params = {}
762
- if request.name
763
- header_params["name"] = request.name
764
- end
765
-
766
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
767
- metadata[:"x-goog-request-params"] ||= request_params_header
768
-
769
- options.apply_defaults timeout: @config.rpcs.delete_key.timeout,
770
- metadata: metadata,
771
- retry_policy: @config.rpcs.delete_key.retry_policy
772
-
773
- options.apply_defaults timeout: @config.timeout,
774
- metadata: @config.metadata,
775
- retry_policy: @config.retry_policy
776
-
777
- @recaptcha_enterprise_service_stub.call_rpc :delete_key, request, options: options do |response, operation|
778
- yield response, operation if block_given?
779
- return response
780
- end
781
- rescue ::GRPC::BadStatus => e
782
- raise ::Google::Cloud::Error.from_error(e)
783
- end
784
-
785
338
  ##
786
339
  # Configuration class for the RecaptchaEnterpriseService API.
787
340
  #
@@ -927,31 +480,6 @@ module Google
927
480
  # @return [::Gapic::Config::Method]
928
481
  #
929
482
  attr_reader :annotate_assessment
930
- ##
931
- # RPC-specific configuration for `create_key`
932
- # @return [::Gapic::Config::Method]
933
- #
934
- attr_reader :create_key
935
- ##
936
- # RPC-specific configuration for `list_keys`
937
- # @return [::Gapic::Config::Method]
938
- #
939
- attr_reader :list_keys
940
- ##
941
- # RPC-specific configuration for `get_key`
942
- # @return [::Gapic::Config::Method]
943
- #
944
- attr_reader :get_key
945
- ##
946
- # RPC-specific configuration for `update_key`
947
- # @return [::Gapic::Config::Method]
948
- #
949
- attr_reader :update_key
950
- ##
951
- # RPC-specific configuration for `delete_key`
952
- # @return [::Gapic::Config::Method]
953
- #
954
- attr_reader :delete_key
955
483
 
956
484
  # @private
957
485
  def initialize parent_rpcs = nil
@@ -959,16 +487,6 @@ module Google
959
487
  @create_assessment = ::Gapic::Config::Method.new create_assessment_config
960
488
  annotate_assessment_config = parent_rpcs.annotate_assessment if parent_rpcs.respond_to? :annotate_assessment
961
489
  @annotate_assessment = ::Gapic::Config::Method.new annotate_assessment_config
962
- create_key_config = parent_rpcs.create_key if parent_rpcs.respond_to? :create_key
963
- @create_key = ::Gapic::Config::Method.new create_key_config
964
- list_keys_config = parent_rpcs.list_keys if parent_rpcs.respond_to? :list_keys
965
- @list_keys = ::Gapic::Config::Method.new list_keys_config
966
- get_key_config = parent_rpcs.get_key if parent_rpcs.respond_to? :get_key
967
- @get_key = ::Gapic::Config::Method.new get_key_config
968
- update_key_config = parent_rpcs.update_key if parent_rpcs.respond_to? :update_key
969
- @update_key = ::Gapic::Config::Method.new update_key_config
970
- delete_key_config = parent_rpcs.delete_key if parent_rpcs.respond_to? :delete_key
971
- @delete_key = ::Gapic::Config::Method.new delete_key_config
972
490
 
973
491
  yield self if block_given?
974
492
  end
@@ -41,23 +41,6 @@ module Google
41
41
  "projects/#{project}/assessments/#{assessment}"
42
42
  end
43
43
 
44
- ##
45
- # Create a fully-qualified Key resource string.
46
- #
47
- # The resource will be in the following format:
48
- #
49
- # `projects/{project}/keys/{key}`
50
- #
51
- # @param project [String]
52
- # @param key [String]
53
- #
54
- # @return [::String]
55
- def key_path project:, key:
56
- raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
57
-
58
- "projects/#{project}/keys/#{key}"
59
- end
60
-
61
44
  ##
62
45
  # Create a fully-qualified Project resource string.
63
46
  #
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module RecaptchaEnterprise
23
23
  module V1beta1
24
- VERSION = "0.4.5"
24
+ VERSION = "0.5.0"
25
25
  end
26
26
  end
27
27
  end
@@ -25,6 +25,8 @@ module Google
25
25
  ##
26
26
  # To load this package, including all its services, and instantiate a client:
27
27
  #
28
+ # @example
29
+ #
28
30
  # require "google/cloud/recaptcha_enterprise/v1beta1"
29
31
  # client = ::Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.new
30
32
  #