google-cloud-recaptcha_enterprise-v1 1.4.1 → 1.5.1
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 +4 -4
- data/README.md +30 -20
- data/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb +33 -23
- data/lib/google/cloud/recaptcha_enterprise/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +19 -0
- data/proto_docs/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.rb +4 -6
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc01d0383a6b2aee3285e939cacaaa458a7a2bc2875071d3c13e7bd8947cf4e1
|
4
|
+
data.tar.gz: aa633d8c23ed95d03c1a8079602790a73f50658aafdff815d593bd860c5b1010
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3f9d47216cfd4e5015cacc6324b00803e0fa48cf90e18e88f7dfade3500efda33c30b8d8bf015ce6735f6680f16fa296147d20fc279226103e6b1e6302cf3f7
|
7
|
+
data.tar.gz: 033b91621a275b34a53983cea13484ded908a730a3e369fe576131f0b9c14396a635e414f1cfac14c8b809baadf997112d5fc59cb44cca25b36a5af7ac98f7a4
|
data/README.md
CHANGED
@@ -43,33 +43,43 @@ for class and method documentation.
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/recaptcha-enterprise)
|
44
44
|
for general usage information.
|
45
45
|
|
46
|
-
##
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
46
|
+
## Debug Logging
|
47
|
+
|
48
|
+
This library comes with opt-in Debug Logging that can help you troubleshoot
|
49
|
+
your application's integration with the API. When logging is activated, key
|
50
|
+
events such as requests and responses, along with data payloads and metadata
|
51
|
+
such as headers and client configuration, are logged to the standard error
|
52
|
+
stream.
|
53
|
+
|
54
|
+
**WARNING:** Client Library Debug Logging includes your data payloads in
|
55
|
+
plaintext, which could include sensitive data such as PII for yourself or your
|
56
|
+
customers, private keys, or other security data that could be compromising if
|
57
|
+
leaked. Always practice good data hygiene with your application logs, and follow
|
58
|
+
the principle of least access. Google also recommends that Client Library Debug
|
59
|
+
Logging be enabled only temporarily during active debugging, and not used
|
60
|
+
permanently in production.
|
61
|
+
|
62
|
+
To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
|
63
|
+
to the value `all`. Alternatively, you can set the value to a comma-delimited
|
64
|
+
list of client library gem names. This will select the default logging behavior,
|
65
|
+
which writes logs to the standard error stream. On a local workstation, this may
|
66
|
+
result in logs appearing on the console. When running on a Google Cloud hosting
|
67
|
+
service such as [Google Cloud Run](https://cloud.google.com/run), this generally
|
68
|
+
results in logs appearing alongside your application logs in the
|
69
|
+
[Google Cloud Logging](https://cloud.google.com/logging/) service.
|
70
|
+
|
71
|
+
You can customize logging by modifying the `logger` configuration when
|
72
|
+
constructing a client object. For example:
|
55
73
|
|
56
74
|
```ruby
|
75
|
+
require "google/cloud/recaptcha_enterprise/v1"
|
57
76
|
require "logger"
|
58
77
|
|
59
|
-
|
60
|
-
|
61
|
-
def logger
|
62
|
-
LOGGER
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
# Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
67
|
-
module GRPC
|
68
|
-
extend MyLogger
|
78
|
+
client = ::Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.new do |config|
|
79
|
+
config.logger = Logger.new "my-app.log"
|
69
80
|
end
|
70
81
|
```
|
71
82
|
|
72
|
-
|
73
83
|
## Google Cloud Samples
|
74
84
|
|
75
85
|
To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
|
@@ -171,8 +171,28 @@ module Google
|
|
171
171
|
universe_domain: @config.universe_domain,
|
172
172
|
channel_args: @config.channel_args,
|
173
173
|
interceptors: @config.interceptors,
|
174
|
-
channel_pool_config: @config.channel_pool
|
174
|
+
channel_pool_config: @config.channel_pool,
|
175
|
+
logger: @config.logger
|
175
176
|
)
|
177
|
+
|
178
|
+
@recaptcha_enterprise_service_stub.stub_logger&.info do |entry|
|
179
|
+
entry.set_system_name
|
180
|
+
entry.set_service
|
181
|
+
entry.message = "Created client for #{entry.service}"
|
182
|
+
entry.set_credentials_fields credentials
|
183
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
184
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
185
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
##
|
190
|
+
# The logger used for request/response debug logging.
|
191
|
+
#
|
192
|
+
# @return [Logger]
|
193
|
+
#
|
194
|
+
def logger
|
195
|
+
@recaptcha_enterprise_service_stub.logger
|
176
196
|
end
|
177
197
|
|
178
198
|
# Service calls
|
@@ -260,7 +280,6 @@ module Google
|
|
260
280
|
|
261
281
|
@recaptcha_enterprise_service_stub.call_rpc :create_assessment, request, options: options do |response, operation|
|
262
282
|
yield response, operation if block_given?
|
263
|
-
return response
|
264
283
|
end
|
265
284
|
rescue ::GRPC::BadStatus => e
|
266
285
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -366,7 +385,6 @@ module Google
|
|
366
385
|
|
367
386
|
@recaptcha_enterprise_service_stub.call_rpc :annotate_assessment, request, options: options do |response, operation|
|
368
387
|
yield response, operation if block_given?
|
369
|
-
return response
|
370
388
|
end
|
371
389
|
rescue ::GRPC::BadStatus => e
|
372
390
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -455,7 +473,6 @@ module Google
|
|
455
473
|
|
456
474
|
@recaptcha_enterprise_service_stub.call_rpc :create_key, request, options: options do |response, operation|
|
457
475
|
yield response, operation if block_given?
|
458
|
-
return response
|
459
476
|
end
|
460
477
|
rescue ::GRPC::BadStatus => e
|
461
478
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -553,7 +570,7 @@ module Google
|
|
553
570
|
@recaptcha_enterprise_service_stub.call_rpc :list_keys, request, options: options do |response, operation|
|
554
571
|
response = ::Gapic::PagedEnumerable.new @recaptcha_enterprise_service_stub, :list_keys, request, response, operation, options
|
555
572
|
yield response, operation if block_given?
|
556
|
-
|
573
|
+
throw :response, response
|
557
574
|
end
|
558
575
|
rescue ::GRPC::BadStatus => e
|
559
576
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -642,7 +659,6 @@ module Google
|
|
642
659
|
|
643
660
|
@recaptcha_enterprise_service_stub.call_rpc :retrieve_legacy_secret_key, request, options: options do |response, operation|
|
644
661
|
yield response, operation if block_given?
|
645
|
-
return response
|
646
662
|
end
|
647
663
|
rescue ::GRPC::BadStatus => e
|
648
664
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -729,7 +745,6 @@ module Google
|
|
729
745
|
|
730
746
|
@recaptcha_enterprise_service_stub.call_rpc :get_key, request, options: options do |response, operation|
|
731
747
|
yield response, operation if block_given?
|
732
|
-
return response
|
733
748
|
end
|
734
749
|
rescue ::GRPC::BadStatus => e
|
735
750
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -818,7 +833,6 @@ module Google
|
|
818
833
|
|
819
834
|
@recaptcha_enterprise_service_stub.call_rpc :update_key, request, options: options do |response, operation|
|
820
835
|
yield response, operation if block_given?
|
821
|
-
return response
|
822
836
|
end
|
823
837
|
rescue ::GRPC::BadStatus => e
|
824
838
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -905,7 +919,6 @@ module Google
|
|
905
919
|
|
906
920
|
@recaptcha_enterprise_service_stub.call_rpc :delete_key, request, options: options do |response, operation|
|
907
921
|
yield response, operation if block_given?
|
908
|
-
return response
|
909
922
|
end
|
910
923
|
rescue ::GRPC::BadStatus => e
|
911
924
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1006,7 +1019,6 @@ module Google
|
|
1006
1019
|
|
1007
1020
|
@recaptcha_enterprise_service_stub.call_rpc :migrate_key, request, options: options do |response, operation|
|
1008
1021
|
yield response, operation if block_given?
|
1009
|
-
return response
|
1010
1022
|
end
|
1011
1023
|
rescue ::GRPC::BadStatus => e
|
1012
1024
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1098,7 +1110,6 @@ module Google
|
|
1098
1110
|
|
1099
1111
|
@recaptcha_enterprise_service_stub.call_rpc :add_ip_override, request, options: options do |response, operation|
|
1100
1112
|
yield response, operation if block_given?
|
1101
|
-
return response
|
1102
1113
|
end
|
1103
1114
|
rescue ::GRPC::BadStatus => e
|
1104
1115
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1191,7 +1202,6 @@ module Google
|
|
1191
1202
|
|
1192
1203
|
@recaptcha_enterprise_service_stub.call_rpc :remove_ip_override, request, options: options do |response, operation|
|
1193
1204
|
yield response, operation if block_given?
|
1194
|
-
return response
|
1195
1205
|
end
|
1196
1206
|
rescue ::GRPC::BadStatus => e
|
1197
1207
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1291,7 +1301,7 @@ module Google
|
|
1291
1301
|
@recaptcha_enterprise_service_stub.call_rpc :list_ip_overrides, request, options: options do |response, operation|
|
1292
1302
|
response = ::Gapic::PagedEnumerable.new @recaptcha_enterprise_service_stub, :list_ip_overrides, request, response, operation, options
|
1293
1303
|
yield response, operation if block_given?
|
1294
|
-
|
1304
|
+
throw :response, response
|
1295
1305
|
end
|
1296
1306
|
rescue ::GRPC::BadStatus => e
|
1297
1307
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1379,7 +1389,6 @@ module Google
|
|
1379
1389
|
|
1380
1390
|
@recaptcha_enterprise_service_stub.call_rpc :get_metrics, request, options: options do |response, operation|
|
1381
1391
|
yield response, operation if block_given?
|
1382
|
-
return response
|
1383
1392
|
end
|
1384
1393
|
rescue ::GRPC::BadStatus => e
|
1385
1394
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1470,7 +1479,6 @@ module Google
|
|
1470
1479
|
|
1471
1480
|
@recaptcha_enterprise_service_stub.call_rpc :create_firewall_policy, request, options: options do |response, operation|
|
1472
1481
|
yield response, operation if block_given?
|
1473
|
-
return response
|
1474
1482
|
end
|
1475
1483
|
rescue ::GRPC::BadStatus => e
|
1476
1484
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1568,7 +1576,7 @@ module Google
|
|
1568
1576
|
@recaptcha_enterprise_service_stub.call_rpc :list_firewall_policies, request, options: options do |response, operation|
|
1569
1577
|
response = ::Gapic::PagedEnumerable.new @recaptcha_enterprise_service_stub, :list_firewall_policies, request, response, operation, options
|
1570
1578
|
yield response, operation if block_given?
|
1571
|
-
|
1579
|
+
throw :response, response
|
1572
1580
|
end
|
1573
1581
|
rescue ::GRPC::BadStatus => e
|
1574
1582
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1655,7 +1663,6 @@ module Google
|
|
1655
1663
|
|
1656
1664
|
@recaptcha_enterprise_service_stub.call_rpc :get_firewall_policy, request, options: options do |response, operation|
|
1657
1665
|
yield response, operation if block_given?
|
1658
|
-
return response
|
1659
1666
|
end
|
1660
1667
|
rescue ::GRPC::BadStatus => e
|
1661
1668
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1744,7 +1751,6 @@ module Google
|
|
1744
1751
|
|
1745
1752
|
@recaptcha_enterprise_service_stub.call_rpc :update_firewall_policy, request, options: options do |response, operation|
|
1746
1753
|
yield response, operation if block_given?
|
1747
|
-
return response
|
1748
1754
|
end
|
1749
1755
|
rescue ::GRPC::BadStatus => e
|
1750
1756
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1831,7 +1837,6 @@ module Google
|
|
1831
1837
|
|
1832
1838
|
@recaptcha_enterprise_service_stub.call_rpc :delete_firewall_policy, request, options: options do |response, operation|
|
1833
1839
|
yield response, operation if block_given?
|
1834
|
-
return response
|
1835
1840
|
end
|
1836
1841
|
rescue ::GRPC::BadStatus => e
|
1837
1842
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1921,7 +1926,6 @@ module Google
|
|
1921
1926
|
|
1922
1927
|
@recaptcha_enterprise_service_stub.call_rpc :reorder_firewall_policies, request, options: options do |response, operation|
|
1923
1928
|
yield response, operation if block_given?
|
1924
|
-
return response
|
1925
1929
|
end
|
1926
1930
|
rescue ::GRPC::BadStatus => e
|
1927
1931
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2024,7 +2028,7 @@ module Google
|
|
2024
2028
|
@recaptcha_enterprise_service_stub.call_rpc :list_related_account_groups, request, options: options do |response, operation|
|
2025
2029
|
response = ::Gapic::PagedEnumerable.new @recaptcha_enterprise_service_stub, :list_related_account_groups, request, response, operation, options
|
2026
2030
|
yield response, operation if block_given?
|
2027
|
-
|
2031
|
+
throw :response, response
|
2028
2032
|
end
|
2029
2033
|
rescue ::GRPC::BadStatus => e
|
2030
2034
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2127,7 +2131,7 @@ module Google
|
|
2127
2131
|
@recaptcha_enterprise_service_stub.call_rpc :list_related_account_group_memberships, request, options: options do |response, operation|
|
2128
2132
|
response = ::Gapic::PagedEnumerable.new @recaptcha_enterprise_service_stub, :list_related_account_group_memberships, request, response, operation, options
|
2129
2133
|
yield response, operation if block_given?
|
2130
|
-
|
2134
|
+
throw :response, response
|
2131
2135
|
end
|
2132
2136
|
rescue ::GRPC::BadStatus => e
|
2133
2137
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2243,7 +2247,7 @@ module Google
|
|
2243
2247
|
@recaptcha_enterprise_service_stub.call_rpc :search_related_account_group_memberships, request, options: options do |response, operation|
|
2244
2248
|
response = ::Gapic::PagedEnumerable.new @recaptcha_enterprise_service_stub, :search_related_account_group_memberships, request, response, operation, options
|
2245
2249
|
yield response, operation if block_given?
|
2246
|
-
|
2250
|
+
throw :response, response
|
2247
2251
|
end
|
2248
2252
|
rescue ::GRPC::BadStatus => e
|
2249
2253
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2332,6 +2336,11 @@ module Google
|
|
2332
2336
|
# default endpoint URL. The default value of nil uses the environment
|
2333
2337
|
# universe (usually the default "googleapis.com" universe).
|
2334
2338
|
# @return [::String,nil]
|
2339
|
+
# @!attribute [rw] logger
|
2340
|
+
# A custom logger to use for request/response debug logging, or the value
|
2341
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
2342
|
+
# explicitly disable logging.
|
2343
|
+
# @return [::Logger,:default,nil]
|
2335
2344
|
#
|
2336
2345
|
class Configuration
|
2337
2346
|
extend ::Gapic::Config
|
@@ -2356,6 +2365,7 @@ module Google
|
|
2356
2365
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
2357
2366
|
config_attr :quota_project, nil, ::String, nil
|
2358
2367
|
config_attr :universe_domain, nil, ::String, nil
|
2368
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
2359
2369
|
|
2360
2370
|
# @private
|
2361
2371
|
def initialize parent_config = nil
|
@@ -306,9 +306,28 @@ module Google
|
|
306
306
|
# @!attribute [rw] common
|
307
307
|
# @return [::Google::Api::CommonLanguageSettings]
|
308
308
|
# Some settings.
|
309
|
+
# @!attribute [rw] renamed_services
|
310
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
311
|
+
# Map of service names to renamed services. Keys are the package relative
|
312
|
+
# service names and values are the name to be used for the service client
|
313
|
+
# and call options.
|
314
|
+
#
|
315
|
+
# publishing:
|
316
|
+
# go_settings:
|
317
|
+
# renamed_services:
|
318
|
+
# Publisher: TopicAdmin
|
309
319
|
class GoSettings
|
310
320
|
include ::Google::Protobuf::MessageExts
|
311
321
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
322
|
+
|
323
|
+
# @!attribute [rw] key
|
324
|
+
# @return [::String]
|
325
|
+
# @!attribute [rw] value
|
326
|
+
# @return [::String]
|
327
|
+
class RenamedServicesEntry
|
328
|
+
include ::Google::Protobuf::MessageExts
|
329
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
330
|
+
end
|
312
331
|
end
|
313
332
|
|
314
333
|
# Describes the generator configuration for a method.
|
@@ -517,10 +517,8 @@ module Google
|
|
517
517
|
|
518
518
|
# Setting that controls Fraud Prevention assessments.
|
519
519
|
module FraudPrevention
|
520
|
-
# Default, unspecified setting.
|
521
|
-
# `
|
522
|
-
# Otherwise, `fraud_prevention_assessment` is returned if
|
523
|
-
# `transaction_data` is present in the `Event` and Fraud Prevention is
|
520
|
+
# Default, unspecified setting. `fraud_prevention_assessment` is returned
|
521
|
+
# if `transaction_data` is present in `Event` and Fraud Prevention is
|
524
522
|
# enabled in the Google Cloud console.
|
525
523
|
FRAUD_PREVENTION_UNSPECIFIED = 0
|
526
524
|
|
@@ -528,8 +526,8 @@ module Google
|
|
528
526
|
# enabled in the Google Cloud console.
|
529
527
|
ENABLED = 1
|
530
528
|
|
531
|
-
# Disable Fraud Prevention for this assessment, regardless of
|
532
|
-
#
|
529
|
+
# Disable Fraud Prevention for this assessment, regardless of Google Cloud
|
530
|
+
# console settings.
|
533
531
|
DISABLED = 2
|
534
532
|
end
|
535
533
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-recaptcha_enterprise-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.24.0
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
29
|
+
version: 0.24.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|
@@ -98,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
98
98
|
- !ruby/object:Gem::Version
|
99
99
|
version: '0'
|
100
100
|
requirements: []
|
101
|
-
rubygems_version: 3.5.
|
101
|
+
rubygems_version: 3.5.23
|
102
102
|
signing_key:
|
103
103
|
specification_version: 4
|
104
104
|
summary: Help protect your website from fraudulent activity, spam, and abuse without
|