google-cloud-recaptcha_enterprise-v1beta1 0.1.0 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +6 -6
- data/README.md +5 -1
- data/lib/google/cloud/recaptcha_enterprise/v1beta1.rb +1 -1
- data/lib/google/cloud/recaptcha_enterprise/v1beta1/recaptcha_enterprise_service.rb +1 -1
- data/lib/google/cloud/recaptcha_enterprise/v1beta1/recaptcha_enterprise_service/client.rb +183 -178
- data/lib/google/cloud/recaptcha_enterprise/v1beta1/recaptcha_enterprise_service/credentials.rb +2 -2
- data/lib/google/cloud/recaptcha_enterprise/v1beta1/recaptcha_enterprise_service/paths.rb +6 -6
- data/lib/google/cloud/recaptcha_enterprise/v1beta1/version.rb +1 -1
- data/proto_docs/google/api/resource.rb +12 -12
- data/proto_docs/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.rb +74 -74
- data/proto_docs/google/protobuf/empty.rb +2 -2
- data/proto_docs/google/protobuf/field_mask.rb +3 -3
- data/proto_docs/google/protobuf/timestamp.rb +4 -4
- metadata +33 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a747f4151c1ac979b849af79bb173ed8300181cbe112b1cdb272bf17b8af9e6a
|
4
|
+
data.tar.gz: 4ba11312757dc4dece40a3e8e4aed12ec9386706154732d2f054a1703fec891b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8005938ee9fd5e928168d687fb6d48c0d16358bf6f18d8999c17b3d2a00e021c27bdc604099801e572aa48cc8c0bba3f785a2377a573ee0171d0f2b32b79faa4
|
7
|
+
data.tar.gz: e53272588c29631136df23b9343502bec0b2646c4c2483202f0f475ef22ee27d424a058d738951cf673b40515a0fe9b369233991e003761a02d61fd760c4bfc3
|
data/AUTHENTICATION.md
CHANGED
@@ -27,7 +27,7 @@ export RECAPTCHA_ENTERPRISE_CREDENTIALS=path/to/keyfile.json
|
|
27
27
|
```ruby
|
28
28
|
require "google/cloud/recaptcha_enterprise/v1beta1"
|
29
29
|
|
30
|
-
client = Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.new
|
30
|
+
client = ::Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.new
|
31
31
|
```
|
32
32
|
|
33
33
|
## Credential Lookup
|
@@ -64,7 +64,7 @@ containers where writing files is difficult or not encouraged.
|
|
64
64
|
|
65
65
|
The environment variables that google-cloud-recaptcha_enterprise-v1beta1
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
67
|
-
{Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Credentials}):
|
67
|
+
{::Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Credentials}):
|
68
68
|
|
69
69
|
1. `RECAPTCHA_ENTERPRISE_CREDENTIALS` - Path to JSON file, or JSON contents
|
70
70
|
2. `RECAPTCHA_ENTERPRISE_KEYFILE` - Path to JSON file, or JSON contents
|
@@ -77,7 +77,7 @@ require "google/cloud/recaptcha_enterprise/v1beta1"
|
|
77
77
|
|
78
78
|
ENV["RECAPTCHA_ENTERPRISE_CREDENTIALS"] = "path/to/keyfile.json"
|
79
79
|
|
80
|
-
client = Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.new
|
80
|
+
client = ::Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.new
|
81
81
|
```
|
82
82
|
|
83
83
|
### Configuration
|
@@ -88,7 +88,7 @@ environment variables. Either on an individual client initialization:
|
|
88
88
|
```ruby
|
89
89
|
require "google/cloud/recaptcha_enterprise/v1beta1"
|
90
90
|
|
91
|
-
client = Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.new do |config|
|
91
|
+
client = ::Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.new do |config|
|
92
92
|
config.credentials = "path/to/keyfile.json"
|
93
93
|
end
|
94
94
|
```
|
@@ -98,11 +98,11 @@ Or configured globally for all clients:
|
|
98
98
|
```ruby
|
99
99
|
require "google/cloud/recaptcha_enterprise/v1beta1"
|
100
100
|
|
101
|
-
Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.configure do |config|
|
101
|
+
::Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.configure do |config|
|
102
102
|
config.credentials = "path/to/keyfile.json"
|
103
103
|
end
|
104
104
|
|
105
|
-
client = Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.new
|
105
|
+
client = ::Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.new
|
106
106
|
```
|
107
107
|
|
108
108
|
### Cloud SDK
|
data/README.md
CHANGED
@@ -18,6 +18,7 @@ In order to use this library, you first need to go through the following steps:
|
|
18
18
|
|
19
19
|
1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
20
20
|
1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
21
|
+
1. [Enable the API.](https://console.cloud.google.com/apis/library/recaptchaenterprise.googleapis.com)
|
21
22
|
1. {file:AUTHENTICATION.md Set up authentication.}
|
22
23
|
|
23
24
|
## Quick Start
|
@@ -25,7 +26,7 @@ In order to use this library, you first need to go through the following steps:
|
|
25
26
|
```ruby
|
26
27
|
require "google/cloud/recaptcha_enterprise/v1beta1"
|
27
28
|
|
28
|
-
client = Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.new
|
29
|
+
client = ::Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.new
|
29
30
|
request = my_create_request
|
30
31
|
response = client.create_assessment request
|
31
32
|
```
|
@@ -33,6 +34,9 @@ response = client.create_assessment request
|
|
33
34
|
View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-recaptcha_enterprise-v1beta1/latest)
|
34
35
|
for class and method documentation.
|
35
36
|
|
37
|
+
See also the [Product Documentation](https://cloud.google.com/recaptcha-enterprise)
|
38
|
+
for general usage information.
|
39
|
+
|
36
40
|
## Enabling Logging
|
37
41
|
|
38
42
|
To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
@@ -26,7 +26,7 @@ module Google
|
|
26
26
|
# To load this package, including all its services, and instantiate a client:
|
27
27
|
#
|
28
28
|
# require "google/cloud/recaptcha_enterprise/v1beta1"
|
29
|
-
# client = Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.new
|
29
|
+
# client = ::Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.new
|
30
30
|
#
|
31
31
|
module V1beta1
|
32
32
|
end
|
@@ -36,7 +36,7 @@ module Google
|
|
36
36
|
# To load this service and instantiate a client:
|
37
37
|
#
|
38
38
|
# require "google/cloud/recaptcha_enterprise/v1beta1/recaptcha_enterprise_service"
|
39
|
-
# client = Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.new
|
39
|
+
# client = ::Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.new
|
40
40
|
#
|
41
41
|
module RecaptchaEnterpriseService
|
42
42
|
end
|
@@ -25,7 +25,7 @@ module Google
|
|
25
25
|
module V1beta1
|
26
26
|
module RecaptchaEnterpriseService
|
27
27
|
##
|
28
|
-
# Client for the
|
28
|
+
# Client for the RecaptchaEnterpriseService service.
|
29
29
|
#
|
30
30
|
# Service to determine the likelihood an event is legitimate.
|
31
31
|
#
|
@@ -33,20 +33,20 @@ module Google
|
|
33
33
|
include Paths
|
34
34
|
|
35
35
|
# @private
|
36
|
-
attr_reader :
|
36
|
+
attr_reader :recaptcha_enterprise_service_stub
|
37
37
|
|
38
38
|
##
|
39
|
-
# Configure the
|
39
|
+
# Configure the RecaptchaEnterpriseService Client class.
|
40
40
|
#
|
41
|
-
# See {Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client::Configuration}
|
41
|
+
# See {::Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client::Configuration}
|
42
42
|
# for a description of the configuration fields.
|
43
43
|
#
|
44
44
|
# ## Example
|
45
45
|
#
|
46
|
-
# To modify the configuration for all
|
46
|
+
# To modify the configuration for all RecaptchaEnterpriseService clients:
|
47
47
|
#
|
48
|
-
# Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.configure do |config|
|
49
|
-
# config.timeout =
|
48
|
+
# ::Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.configure do |config|
|
49
|
+
# config.timeout = 10.0
|
50
50
|
# end
|
51
51
|
#
|
52
52
|
# @yield [config] Configure the Client client.
|
@@ -86,13 +86,13 @@ module Google
|
|
86
86
|
end
|
87
87
|
|
88
88
|
##
|
89
|
-
# Configure the
|
89
|
+
# Configure the RecaptchaEnterpriseService Client instance.
|
90
90
|
#
|
91
91
|
# The configuration is set to the derived mode, meaning that values can be changed,
|
92
92
|
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
93
93
|
# should be made on {Client.configure}.
|
94
94
|
#
|
95
|
-
# See {Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client::Configuration}
|
95
|
+
# See {::Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client::Configuration}
|
96
96
|
# for a description of the configuration fields.
|
97
97
|
#
|
98
98
|
# @yield [config] Configure the Client client.
|
@@ -106,23 +106,23 @@ module Google
|
|
106
106
|
end
|
107
107
|
|
108
108
|
##
|
109
|
-
# Create a new
|
109
|
+
# Create a new RecaptchaEnterpriseService client object.
|
110
110
|
#
|
111
111
|
# ## Examples
|
112
112
|
#
|
113
|
-
# To create a new
|
113
|
+
# To create a new RecaptchaEnterpriseService client with the default
|
114
114
|
# configuration:
|
115
115
|
#
|
116
|
-
# client = Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.new
|
116
|
+
# client = ::Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.new
|
117
117
|
#
|
118
|
-
# To create a new
|
118
|
+
# To create a new RecaptchaEnterpriseService client with a custom
|
119
119
|
# configuration:
|
120
120
|
#
|
121
|
-
# client = Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.new do |config|
|
122
|
-
# config.timeout =
|
121
|
+
# client = ::Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.new do |config|
|
122
|
+
# config.timeout = 10.0
|
123
123
|
# end
|
124
124
|
#
|
125
|
-
# @yield [config] Configure the
|
125
|
+
# @yield [config] Configure the RecaptchaEnterpriseService client.
|
126
126
|
# @yieldparam config [Client::Configuration]
|
127
127
|
#
|
128
128
|
def initialize
|
@@ -144,10 +144,11 @@ module Google
|
|
144
144
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
145
145
|
credentials = Credentials.new credentials, scope: @config.scope
|
146
146
|
end
|
147
|
-
@quota_project_id =
|
147
|
+
@quota_project_id = @config.quota_project
|
148
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
148
149
|
|
149
|
-
@
|
150
|
-
Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseServiceV1Beta1::Stub,
|
150
|
+
@recaptcha_enterprise_service_stub = ::Gapic::ServiceStub.new(
|
151
|
+
::Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseServiceV1Beta1::Stub,
|
151
152
|
credentials: credentials,
|
152
153
|
endpoint: @config.endpoint,
|
153
154
|
channel_args: @config.channel_args,
|
@@ -162,12 +163,12 @@ module Google
|
|
162
163
|
#
|
163
164
|
# @overload create_assessment(request, options = nil)
|
164
165
|
# Pass arguments to `create_assessment` via a request object, either of type
|
165
|
-
# {Google::Cloud::RecaptchaEnterprise::V1beta1::CreateAssessmentRequest} or an equivalent Hash.
|
166
|
+
# {::Google::Cloud::RecaptchaEnterprise::V1beta1::CreateAssessmentRequest} or an equivalent Hash.
|
166
167
|
#
|
167
|
-
# @param request [Google::Cloud::RecaptchaEnterprise::V1beta1::CreateAssessmentRequest, Hash]
|
168
|
+
# @param request [::Google::Cloud::RecaptchaEnterprise::V1beta1::CreateAssessmentRequest, ::Hash]
|
168
169
|
# A request object representing the call parameters. Required. To specify no
|
169
170
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
170
|
-
# @param options [Gapic::CallOptions, Hash]
|
171
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
171
172
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
172
173
|
#
|
173
174
|
# @overload create_assessment(parent: nil, assessment: nil)
|
@@ -175,33 +176,33 @@ module Google
|
|
175
176
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
176
177
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
177
178
|
#
|
178
|
-
# @param parent [String]
|
179
|
+
# @param parent [::String]
|
179
180
|
# Required. The name of the project in which the assessment will be created,
|
180
181
|
# in the format "projects/\\{project_number}".
|
181
|
-
# @param assessment [Google::Cloud::RecaptchaEnterprise::V1beta1::Assessment, Hash]
|
182
|
+
# @param assessment [::Google::Cloud::RecaptchaEnterprise::V1beta1::Assessment, ::Hash]
|
182
183
|
# Required. The assessment details.
|
183
184
|
#
|
184
185
|
# @yield [response, operation] Access the result along with the RPC operation
|
185
|
-
# @yieldparam response [Google::Cloud::RecaptchaEnterprise::V1beta1::Assessment]
|
186
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
186
|
+
# @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1beta1::Assessment]
|
187
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
187
188
|
#
|
188
|
-
# @return [Google::Cloud::RecaptchaEnterprise::V1beta1::Assessment]
|
189
|
+
# @return [::Google::Cloud::RecaptchaEnterprise::V1beta1::Assessment]
|
189
190
|
#
|
190
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
191
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
191
192
|
#
|
192
193
|
def create_assessment request, options = nil
|
193
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
194
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
194
195
|
|
195
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::RecaptchaEnterprise::V1beta1::CreateAssessmentRequest
|
196
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1beta1::CreateAssessmentRequest
|
196
197
|
|
197
198
|
# Converts hash and nil to an options object
|
198
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
199
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
199
200
|
|
200
201
|
# Customize the options with defaults
|
201
202
|
metadata = @config.rpcs.create_assessment.metadata.to_h
|
202
203
|
|
203
204
|
# Set x-goog-api-client and x-goog-user-project headers
|
204
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
205
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
205
206
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
206
207
|
gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1beta1::VERSION
|
207
208
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -218,12 +219,12 @@ module Google
|
|
218
219
|
options.apply_defaults metadata: @config.metadata,
|
219
220
|
retry_policy: @config.retry_policy
|
220
221
|
|
221
|
-
@
|
222
|
+
@recaptcha_enterprise_service_stub.call_rpc :create_assessment, request, options: options do |response, operation|
|
222
223
|
yield response, operation if block_given?
|
223
224
|
return response
|
224
225
|
end
|
225
|
-
rescue GRPC::BadStatus => e
|
226
|
-
raise Google::Cloud::Error.from_error(e)
|
226
|
+
rescue ::GRPC::BadStatus => e
|
227
|
+
raise ::Google::Cloud::Error.from_error(e)
|
227
228
|
end
|
228
229
|
|
229
230
|
##
|
@@ -232,12 +233,12 @@ module Google
|
|
232
233
|
#
|
233
234
|
# @overload annotate_assessment(request, options = nil)
|
234
235
|
# Pass arguments to `annotate_assessment` via a request object, either of type
|
235
|
-
# {Google::Cloud::RecaptchaEnterprise::V1beta1::AnnotateAssessmentRequest} or an equivalent Hash.
|
236
|
+
# {::Google::Cloud::RecaptchaEnterprise::V1beta1::AnnotateAssessmentRequest} or an equivalent Hash.
|
236
237
|
#
|
237
|
-
# @param request [Google::Cloud::RecaptchaEnterprise::V1beta1::AnnotateAssessmentRequest, Hash]
|
238
|
+
# @param request [::Google::Cloud::RecaptchaEnterprise::V1beta1::AnnotateAssessmentRequest, ::Hash]
|
238
239
|
# A request object representing the call parameters. Required. To specify no
|
239
240
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
240
|
-
# @param options [Gapic::CallOptions, Hash]
|
241
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
241
242
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
242
243
|
#
|
243
244
|
# @overload annotate_assessment(name: nil, annotation: nil)
|
@@ -245,33 +246,33 @@ module Google
|
|
245
246
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
246
247
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
247
248
|
#
|
248
|
-
# @param name [String]
|
249
|
+
# @param name [::String]
|
249
250
|
# Required. The resource name of the Assessment, in the format
|
250
251
|
# "projects/\\{project_number}/assessments/\\{assessment_id}".
|
251
|
-
# @param annotation [Google::Cloud::RecaptchaEnterprise::V1beta1::AnnotateAssessmentRequest::Annotation]
|
252
|
+
# @param annotation [::Google::Cloud::RecaptchaEnterprise::V1beta1::AnnotateAssessmentRequest::Annotation]
|
252
253
|
# Required. The annotation that will be assigned to the Event.
|
253
254
|
#
|
254
255
|
# @yield [response, operation] Access the result along with the RPC operation
|
255
|
-
# @yieldparam response [Google::Cloud::RecaptchaEnterprise::V1beta1::AnnotateAssessmentResponse]
|
256
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
256
|
+
# @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1beta1::AnnotateAssessmentResponse]
|
257
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
257
258
|
#
|
258
|
-
# @return [Google::Cloud::RecaptchaEnterprise::V1beta1::AnnotateAssessmentResponse]
|
259
|
+
# @return [::Google::Cloud::RecaptchaEnterprise::V1beta1::AnnotateAssessmentResponse]
|
259
260
|
#
|
260
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
261
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
261
262
|
#
|
262
263
|
def annotate_assessment request, options = nil
|
263
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
264
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
264
265
|
|
265
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::RecaptchaEnterprise::V1beta1::AnnotateAssessmentRequest
|
266
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1beta1::AnnotateAssessmentRequest
|
266
267
|
|
267
268
|
# Converts hash and nil to an options object
|
268
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
269
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
269
270
|
|
270
271
|
# Customize the options with defaults
|
271
272
|
metadata = @config.rpcs.annotate_assessment.metadata.to_h
|
272
273
|
|
273
274
|
# Set x-goog-api-client and x-goog-user-project headers
|
274
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
275
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
275
276
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
276
277
|
gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1beta1::VERSION
|
277
278
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -288,12 +289,12 @@ module Google
|
|
288
289
|
options.apply_defaults metadata: @config.metadata,
|
289
290
|
retry_policy: @config.retry_policy
|
290
291
|
|
291
|
-
@
|
292
|
+
@recaptcha_enterprise_service_stub.call_rpc :annotate_assessment, request, options: options do |response, operation|
|
292
293
|
yield response, operation if block_given?
|
293
294
|
return response
|
294
295
|
end
|
295
|
-
rescue GRPC::BadStatus => e
|
296
|
-
raise Google::Cloud::Error.from_error(e)
|
296
|
+
rescue ::GRPC::BadStatus => e
|
297
|
+
raise ::Google::Cloud::Error.from_error(e)
|
297
298
|
end
|
298
299
|
|
299
300
|
##
|
@@ -301,12 +302,12 @@ module Google
|
|
301
302
|
#
|
302
303
|
# @overload create_key(request, options = nil)
|
303
304
|
# Pass arguments to `create_key` via a request object, either of type
|
304
|
-
# {Google::Cloud::RecaptchaEnterprise::V1beta1::CreateKeyRequest} or an equivalent Hash.
|
305
|
+
# {::Google::Cloud::RecaptchaEnterprise::V1beta1::CreateKeyRequest} or an equivalent Hash.
|
305
306
|
#
|
306
|
-
# @param request [Google::Cloud::RecaptchaEnterprise::V1beta1::CreateKeyRequest, Hash]
|
307
|
+
# @param request [::Google::Cloud::RecaptchaEnterprise::V1beta1::CreateKeyRequest, ::Hash]
|
307
308
|
# A request object representing the call parameters. Required. To specify no
|
308
309
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
309
|
-
# @param options [Gapic::CallOptions, Hash]
|
310
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
310
311
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
311
312
|
#
|
312
313
|
# @overload create_key(parent: nil, key: nil)
|
@@ -314,33 +315,33 @@ module Google
|
|
314
315
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
315
316
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
316
317
|
#
|
317
|
-
# @param parent [String]
|
318
|
+
# @param parent [::String]
|
318
319
|
# Required. The name of the project in which the key will be created, in the
|
319
320
|
# format "projects/\\{project_number}".
|
320
|
-
# @param key [Google::Cloud::RecaptchaEnterprise::V1beta1::Key, Hash]
|
321
|
+
# @param key [::Google::Cloud::RecaptchaEnterprise::V1beta1::Key, ::Hash]
|
321
322
|
# Required. Information to create a reCAPTCHA Enterprise key.
|
322
323
|
#
|
323
324
|
# @yield [response, operation] Access the result along with the RPC operation
|
324
|
-
# @yieldparam response [Google::Cloud::RecaptchaEnterprise::V1beta1::Key]
|
325
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
325
|
+
# @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1beta1::Key]
|
326
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
326
327
|
#
|
327
|
-
# @return [Google::Cloud::RecaptchaEnterprise::V1beta1::Key]
|
328
|
+
# @return [::Google::Cloud::RecaptchaEnterprise::V1beta1::Key]
|
328
329
|
#
|
329
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
330
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
330
331
|
#
|
331
332
|
def create_key request, options = nil
|
332
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
333
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
333
334
|
|
334
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::RecaptchaEnterprise::V1beta1::CreateKeyRequest
|
335
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1beta1::CreateKeyRequest
|
335
336
|
|
336
337
|
# Converts hash and nil to an options object
|
337
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
338
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
338
339
|
|
339
340
|
# Customize the options with defaults
|
340
341
|
metadata = @config.rpcs.create_key.metadata.to_h
|
341
342
|
|
342
343
|
# Set x-goog-api-client and x-goog-user-project headers
|
343
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
344
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
344
345
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
345
346
|
gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1beta1::VERSION
|
346
347
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -357,12 +358,12 @@ module Google
|
|
357
358
|
options.apply_defaults metadata: @config.metadata,
|
358
359
|
retry_policy: @config.retry_policy
|
359
360
|
|
360
|
-
@
|
361
|
+
@recaptcha_enterprise_service_stub.call_rpc :create_key, request, options: options do |response, operation|
|
361
362
|
yield response, operation if block_given?
|
362
363
|
return response
|
363
364
|
end
|
364
|
-
rescue GRPC::BadStatus => e
|
365
|
-
raise Google::Cloud::Error.from_error(e)
|
365
|
+
rescue ::GRPC::BadStatus => e
|
366
|
+
raise ::Google::Cloud::Error.from_error(e)
|
366
367
|
end
|
367
368
|
|
368
369
|
##
|
@@ -370,12 +371,12 @@ module Google
|
|
370
371
|
#
|
371
372
|
# @overload list_keys(request, options = nil)
|
372
373
|
# Pass arguments to `list_keys` via a request object, either of type
|
373
|
-
# {Google::Cloud::RecaptchaEnterprise::V1beta1::ListKeysRequest} or an equivalent Hash.
|
374
|
+
# {::Google::Cloud::RecaptchaEnterprise::V1beta1::ListKeysRequest} or an equivalent Hash.
|
374
375
|
#
|
375
|
-
# @param request [Google::Cloud::RecaptchaEnterprise::V1beta1::ListKeysRequest, Hash]
|
376
|
+
# @param request [::Google::Cloud::RecaptchaEnterprise::V1beta1::ListKeysRequest, ::Hash]
|
376
377
|
# A request object representing the call parameters. Required. To specify no
|
377
378
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
378
|
-
# @param options [Gapic::CallOptions, Hash]
|
379
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
379
380
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
380
381
|
#
|
381
382
|
# @overload list_keys(parent: nil, page_size: nil, page_token: nil)
|
@@ -383,37 +384,37 @@ module Google
|
|
383
384
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
384
385
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
385
386
|
#
|
386
|
-
# @param parent [String]
|
387
|
+
# @param parent [::String]
|
387
388
|
# Required. The name of the project that contains the keys that will be
|
388
389
|
# listed, in the format "projects/\\{project_number}".
|
389
|
-
# @param page_size [Integer]
|
390
|
+
# @param page_size [::Integer]
|
390
391
|
# Optional. The maximum number of keys to return. Default is 10. Max limit is
|
391
392
|
# 1000.
|
392
|
-
# @param page_token [String]
|
393
|
+
# @param page_token [::String]
|
393
394
|
# Optional. The next_page_token value returned from a previous.
|
394
395
|
# ListKeysRequest, if any.
|
395
396
|
#
|
396
397
|
# @yield [response, operation] Access the result along with the RPC operation
|
397
|
-
# @yieldparam response [Gapic::PagedEnumerable
|
398
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
398
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1beta1::Key>]
|
399
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
399
400
|
#
|
400
|
-
# @return [Gapic::PagedEnumerable
|
401
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::RecaptchaEnterprise::V1beta1::Key>]
|
401
402
|
#
|
402
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
403
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
403
404
|
#
|
404
405
|
def list_keys request, options = nil
|
405
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
406
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
406
407
|
|
407
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::RecaptchaEnterprise::V1beta1::ListKeysRequest
|
408
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1beta1::ListKeysRequest
|
408
409
|
|
409
410
|
# Converts hash and nil to an options object
|
410
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
411
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
411
412
|
|
412
413
|
# Customize the options with defaults
|
413
414
|
metadata = @config.rpcs.list_keys.metadata.to_h
|
414
415
|
|
415
416
|
# Set x-goog-api-client and x-goog-user-project headers
|
416
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
417
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
417
418
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
418
419
|
gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1beta1::VERSION
|
419
420
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -430,13 +431,13 @@ module Google
|
|
430
431
|
options.apply_defaults metadata: @config.metadata,
|
431
432
|
retry_policy: @config.retry_policy
|
432
433
|
|
433
|
-
@
|
434
|
-
response = Gapic::PagedEnumerable.new @
|
434
|
+
@recaptcha_enterprise_service_stub.call_rpc :list_keys, request, options: options do |response, operation|
|
435
|
+
response = ::Gapic::PagedEnumerable.new @recaptcha_enterprise_service_stub, :list_keys, request, response, operation, options
|
435
436
|
yield response, operation if block_given?
|
436
437
|
return response
|
437
438
|
end
|
438
|
-
rescue GRPC::BadStatus => e
|
439
|
-
raise Google::Cloud::Error.from_error(e)
|
439
|
+
rescue ::GRPC::BadStatus => e
|
440
|
+
raise ::Google::Cloud::Error.from_error(e)
|
440
441
|
end
|
441
442
|
|
442
443
|
##
|
@@ -444,12 +445,12 @@ module Google
|
|
444
445
|
#
|
445
446
|
# @overload get_key(request, options = nil)
|
446
447
|
# Pass arguments to `get_key` via a request object, either of type
|
447
|
-
# {Google::Cloud::RecaptchaEnterprise::V1beta1::GetKeyRequest} or an equivalent Hash.
|
448
|
+
# {::Google::Cloud::RecaptchaEnterprise::V1beta1::GetKeyRequest} or an equivalent Hash.
|
448
449
|
#
|
449
|
-
# @param request [Google::Cloud::RecaptchaEnterprise::V1beta1::GetKeyRequest, Hash]
|
450
|
+
# @param request [::Google::Cloud::RecaptchaEnterprise::V1beta1::GetKeyRequest, ::Hash]
|
450
451
|
# A request object representing the call parameters. Required. To specify no
|
451
452
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
452
|
-
# @param options [Gapic::CallOptions, Hash]
|
453
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
453
454
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
454
455
|
#
|
455
456
|
# @overload get_key(name: nil)
|
@@ -457,31 +458,31 @@ module Google
|
|
457
458
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
458
459
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
459
460
|
#
|
460
|
-
# @param name [String]
|
461
|
+
# @param name [::String]
|
461
462
|
# Required. The name of the requested key, in the format
|
462
463
|
# "projects/\\{project_number}/keys/\\{key_id}".
|
463
464
|
#
|
464
465
|
# @yield [response, operation] Access the result along with the RPC operation
|
465
|
-
# @yieldparam response [Google::Cloud::RecaptchaEnterprise::V1beta1::Key]
|
466
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
466
|
+
# @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1beta1::Key]
|
467
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
467
468
|
#
|
468
|
-
# @return [Google::Cloud::RecaptchaEnterprise::V1beta1::Key]
|
469
|
+
# @return [::Google::Cloud::RecaptchaEnterprise::V1beta1::Key]
|
469
470
|
#
|
470
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
471
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
471
472
|
#
|
472
473
|
def get_key request, options = nil
|
473
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
474
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
474
475
|
|
475
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::RecaptchaEnterprise::V1beta1::GetKeyRequest
|
476
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1beta1::GetKeyRequest
|
476
477
|
|
477
478
|
# Converts hash and nil to an options object
|
478
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
479
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
479
480
|
|
480
481
|
# Customize the options with defaults
|
481
482
|
metadata = @config.rpcs.get_key.metadata.to_h
|
482
483
|
|
483
484
|
# Set x-goog-api-client and x-goog-user-project headers
|
484
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
485
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
485
486
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
486
487
|
gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1beta1::VERSION
|
487
488
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -498,12 +499,12 @@ module Google
|
|
498
499
|
options.apply_defaults metadata: @config.metadata,
|
499
500
|
retry_policy: @config.retry_policy
|
500
501
|
|
501
|
-
@
|
502
|
+
@recaptcha_enterprise_service_stub.call_rpc :get_key, request, options: options do |response, operation|
|
502
503
|
yield response, operation if block_given?
|
503
504
|
return response
|
504
505
|
end
|
505
|
-
rescue GRPC::BadStatus => e
|
506
|
-
raise Google::Cloud::Error.from_error(e)
|
506
|
+
rescue ::GRPC::BadStatus => e
|
507
|
+
raise ::Google::Cloud::Error.from_error(e)
|
507
508
|
end
|
508
509
|
|
509
510
|
##
|
@@ -511,12 +512,12 @@ module Google
|
|
511
512
|
#
|
512
513
|
# @overload update_key(request, options = nil)
|
513
514
|
# Pass arguments to `update_key` via a request object, either of type
|
514
|
-
# {Google::Cloud::RecaptchaEnterprise::V1beta1::UpdateKeyRequest} or an equivalent Hash.
|
515
|
+
# {::Google::Cloud::RecaptchaEnterprise::V1beta1::UpdateKeyRequest} or an equivalent Hash.
|
515
516
|
#
|
516
|
-
# @param request [Google::Cloud::RecaptchaEnterprise::V1beta1::UpdateKeyRequest, Hash]
|
517
|
+
# @param request [::Google::Cloud::RecaptchaEnterprise::V1beta1::UpdateKeyRequest, ::Hash]
|
517
518
|
# A request object representing the call parameters. Required. To specify no
|
518
519
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
519
|
-
# @param options [Gapic::CallOptions, Hash]
|
520
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
520
521
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
521
522
|
#
|
522
523
|
# @overload update_key(key: nil, update_mask: nil)
|
@@ -524,33 +525,33 @@ module Google
|
|
524
525
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
525
526
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
526
527
|
#
|
527
|
-
# @param key [Google::Cloud::RecaptchaEnterprise::V1beta1::Key, Hash]
|
528
|
+
# @param key [::Google::Cloud::RecaptchaEnterprise::V1beta1::Key, ::Hash]
|
528
529
|
# Required. The key to update.
|
529
|
-
# @param update_mask [Google::Protobuf::FieldMask, Hash]
|
530
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
530
531
|
# Optional. The mask to control which field of the key get updated. If the mask is not
|
531
532
|
# present, all fields will be updated.
|
532
533
|
#
|
533
534
|
# @yield [response, operation] Access the result along with the RPC operation
|
534
|
-
# @yieldparam response [Google::Cloud::RecaptchaEnterprise::V1beta1::Key]
|
535
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
535
|
+
# @yieldparam response [::Google::Cloud::RecaptchaEnterprise::V1beta1::Key]
|
536
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
536
537
|
#
|
537
|
-
# @return [Google::Cloud::RecaptchaEnterprise::V1beta1::Key]
|
538
|
+
# @return [::Google::Cloud::RecaptchaEnterprise::V1beta1::Key]
|
538
539
|
#
|
539
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
540
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
540
541
|
#
|
541
542
|
def update_key request, options = nil
|
542
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
543
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
543
544
|
|
544
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::RecaptchaEnterprise::V1beta1::UpdateKeyRequest
|
545
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1beta1::UpdateKeyRequest
|
545
546
|
|
546
547
|
# Converts hash and nil to an options object
|
547
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
548
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
548
549
|
|
549
550
|
# Customize the options with defaults
|
550
551
|
metadata = @config.rpcs.update_key.metadata.to_h
|
551
552
|
|
552
553
|
# Set x-goog-api-client and x-goog-user-project headers
|
553
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
554
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
554
555
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
555
556
|
gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1beta1::VERSION
|
556
557
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -567,12 +568,12 @@ module Google
|
|
567
568
|
options.apply_defaults metadata: @config.metadata,
|
568
569
|
retry_policy: @config.retry_policy
|
569
570
|
|
570
|
-
@
|
571
|
+
@recaptcha_enterprise_service_stub.call_rpc :update_key, request, options: options do |response, operation|
|
571
572
|
yield response, operation if block_given?
|
572
573
|
return response
|
573
574
|
end
|
574
|
-
rescue GRPC::BadStatus => e
|
575
|
-
raise Google::Cloud::Error.from_error(e)
|
575
|
+
rescue ::GRPC::BadStatus => e
|
576
|
+
raise ::Google::Cloud::Error.from_error(e)
|
576
577
|
end
|
577
578
|
|
578
579
|
##
|
@@ -580,12 +581,12 @@ module Google
|
|
580
581
|
#
|
581
582
|
# @overload delete_key(request, options = nil)
|
582
583
|
# Pass arguments to `delete_key` via a request object, either of type
|
583
|
-
# {Google::Cloud::RecaptchaEnterprise::V1beta1::DeleteKeyRequest} or an equivalent Hash.
|
584
|
+
# {::Google::Cloud::RecaptchaEnterprise::V1beta1::DeleteKeyRequest} or an equivalent Hash.
|
584
585
|
#
|
585
|
-
# @param request [Google::Cloud::RecaptchaEnterprise::V1beta1::DeleteKeyRequest, Hash]
|
586
|
+
# @param request [::Google::Cloud::RecaptchaEnterprise::V1beta1::DeleteKeyRequest, ::Hash]
|
586
587
|
# A request object representing the call parameters. Required. To specify no
|
587
588
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
588
|
-
# @param options [Gapic::CallOptions, Hash]
|
589
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
589
590
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
590
591
|
#
|
591
592
|
# @overload delete_key(name: nil)
|
@@ -593,31 +594,31 @@ module Google
|
|
593
594
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
594
595
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
595
596
|
#
|
596
|
-
# @param name [String]
|
597
|
+
# @param name [::String]
|
597
598
|
# Required. The name of the key to be deleted, in the format
|
598
599
|
# "projects/\\{project_number}/keys/\\{key_id}".
|
599
600
|
#
|
600
601
|
# @yield [response, operation] Access the result along with the RPC operation
|
601
|
-
# @yieldparam response [Google::Protobuf::Empty]
|
602
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
602
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
603
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
603
604
|
#
|
604
|
-
# @return [Google::Protobuf::Empty]
|
605
|
+
# @return [::Google::Protobuf::Empty]
|
605
606
|
#
|
606
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
607
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
607
608
|
#
|
608
609
|
def delete_key request, options = nil
|
609
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
610
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
610
611
|
|
611
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::RecaptchaEnterprise::V1beta1::DeleteKeyRequest
|
612
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::RecaptchaEnterprise::V1beta1::DeleteKeyRequest
|
612
613
|
|
613
614
|
# Converts hash and nil to an options object
|
614
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
615
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
615
616
|
|
616
617
|
# Customize the options with defaults
|
617
618
|
metadata = @config.rpcs.delete_key.metadata.to_h
|
618
619
|
|
619
620
|
# Set x-goog-api-client and x-goog-user-project headers
|
620
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
621
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
621
622
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
622
623
|
gapic_version: ::Google::Cloud::RecaptchaEnterprise::V1beta1::VERSION
|
623
624
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -634,22 +635,22 @@ module Google
|
|
634
635
|
options.apply_defaults metadata: @config.metadata,
|
635
636
|
retry_policy: @config.retry_policy
|
636
637
|
|
637
|
-
@
|
638
|
+
@recaptcha_enterprise_service_stub.call_rpc :delete_key, request, options: options do |response, operation|
|
638
639
|
yield response, operation if block_given?
|
639
640
|
return response
|
640
641
|
end
|
641
|
-
rescue GRPC::BadStatus => e
|
642
|
-
raise Google::Cloud::Error.from_error(e)
|
642
|
+
rescue ::GRPC::BadStatus => e
|
643
|
+
raise ::Google::Cloud::Error.from_error(e)
|
643
644
|
end
|
644
645
|
|
645
646
|
##
|
646
|
-
# Configuration class for the
|
647
|
+
# Configuration class for the RecaptchaEnterpriseService API.
|
647
648
|
#
|
648
|
-
# This class represents the configuration for
|
649
|
+
# This class represents the configuration for RecaptchaEnterpriseService,
|
649
650
|
# providing control over timeouts, retry behavior, logging, transport
|
650
651
|
# parameters, and other low-level controls. Certain parameters can also be
|
651
652
|
# applied individually to specific RPCs. See
|
652
|
-
# {Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client::Configuration::Rpcs}
|
653
|
+
# {::Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client::Configuration::Rpcs}
|
653
654
|
# for a list of RPCs that can be configured independently.
|
654
655
|
#
|
655
656
|
# Configuration can be applied globally to all clients, or to a single client
|
@@ -660,22 +661,22 @@ module Google
|
|
660
661
|
# To modify the global config, setting the timeout for create_assessment
|
661
662
|
# to 20 seconds, and all remaining timeouts to 10 seconds:
|
662
663
|
#
|
663
|
-
# Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.configure do |config|
|
664
|
-
# config.timeout =
|
665
|
-
# config.rpcs.create_assessment.timeout =
|
664
|
+
# ::Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.configure do |config|
|
665
|
+
# config.timeout = 10.0
|
666
|
+
# config.rpcs.create_assessment.timeout = 20.0
|
666
667
|
# end
|
667
668
|
#
|
668
669
|
# To apply the above configuration only to a new client:
|
669
670
|
#
|
670
|
-
# client = Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.new do |config|
|
671
|
-
# config.timeout =
|
672
|
-
# config.rpcs.create_assessment.timeout =
|
671
|
+
# client = ::Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.new do |config|
|
672
|
+
# config.timeout = 10.0
|
673
|
+
# config.rpcs.create_assessment.timeout = 20.0
|
673
674
|
# end
|
674
675
|
#
|
675
676
|
# @!attribute [rw] endpoint
|
676
677
|
# The hostname or hostname:port of the service endpoint.
|
677
678
|
# Defaults to `"recaptchaenterprise.googleapis.com"`.
|
678
|
-
# @return [String]
|
679
|
+
# @return [::String]
|
679
680
|
# @!attribute [rw] credentials
|
680
681
|
# Credentials to send with calls. You may provide any of the following types:
|
681
682
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -687,29 +688,29 @@ module Google
|
|
687
688
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
688
689
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
689
690
|
# * (`nil`) indicating no credentials
|
690
|
-
# @return [Object]
|
691
|
+
# @return [::Object]
|
691
692
|
# @!attribute [rw] scope
|
692
693
|
# The OAuth scopes
|
693
|
-
# @return [Array
|
694
|
+
# @return [::Array<::String>]
|
694
695
|
# @!attribute [rw] lib_name
|
695
696
|
# The library name as recorded in instrumentation and logging
|
696
|
-
# @return [String]
|
697
|
+
# @return [::String]
|
697
698
|
# @!attribute [rw] lib_version
|
698
699
|
# The library version as recorded in instrumentation and logging
|
699
|
-
# @return [String]
|
700
|
+
# @return [::String]
|
700
701
|
# @!attribute [rw] channel_args
|
701
702
|
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
702
703
|
# `GRPC::Core::Channel` object is provided as the credential.
|
703
|
-
# @return [Hash]
|
704
|
+
# @return [::Hash]
|
704
705
|
# @!attribute [rw] interceptors
|
705
706
|
# An array of interceptors that are run before calls are executed.
|
706
|
-
# @return [Array
|
707
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
707
708
|
# @!attribute [rw] timeout
|
708
|
-
# The call timeout in
|
709
|
-
# @return [Numeric]
|
709
|
+
# The call timeout in seconds.
|
710
|
+
# @return [::Numeric]
|
710
711
|
# @!attribute [rw] metadata
|
711
712
|
# Additional gRPC headers to be sent with the call.
|
712
|
-
# @return [Hash{Symbol
|
713
|
+
# @return [::Hash{::Symbol=>::String}]
|
713
714
|
# @!attribute [rw] retry_policy
|
714
715
|
# The retry policy. The value is a hash with the following keys:
|
715
716
|
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
@@ -717,25 +718,29 @@ module Google
|
|
717
718
|
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
718
719
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
719
720
|
# trigger a retry.
|
720
|
-
# @return [Hash]
|
721
|
+
# @return [::Hash]
|
722
|
+
# @!attribute [rw] quota_project
|
723
|
+
# A separate project against which to charge quota.
|
724
|
+
# @return [::String]
|
721
725
|
#
|
722
726
|
class Configuration
|
723
|
-
extend Gapic::Config
|
727
|
+
extend ::Gapic::Config
|
724
728
|
|
725
|
-
config_attr :endpoint,
|
726
|
-
config_attr :credentials,
|
729
|
+
config_attr :endpoint, "recaptchaenterprise.googleapis.com", ::String
|
730
|
+
config_attr :credentials, nil do |value|
|
727
731
|
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
728
732
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
729
733
|
allowed.any? { |klass| klass === value }
|
730
734
|
end
|
731
|
-
config_attr :scope,
|
732
|
-
config_attr :lib_name,
|
733
|
-
config_attr :lib_version,
|
734
|
-
config_attr(:channel_args,
|
735
|
-
config_attr :interceptors,
|
736
|
-
config_attr :timeout,
|
737
|
-
config_attr :metadata,
|
738
|
-
config_attr :retry_policy,
|
735
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
736
|
+
config_attr :lib_name, nil, ::String, nil
|
737
|
+
config_attr :lib_version, nil, ::String, nil
|
738
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
739
|
+
config_attr :interceptors, nil, ::Array, nil
|
740
|
+
config_attr :timeout, nil, ::Numeric, nil
|
741
|
+
config_attr :metadata, nil, ::Hash, nil
|
742
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
743
|
+
config_attr :quota_project, nil, ::String, nil
|
739
744
|
|
740
745
|
# @private
|
741
746
|
def initialize parent_config = nil
|
@@ -751,13 +756,13 @@ module Google
|
|
751
756
|
def rpcs
|
752
757
|
@rpcs ||= begin
|
753
758
|
parent_rpcs = nil
|
754
|
-
parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to?
|
759
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
|
755
760
|
Rpcs.new parent_rpcs
|
756
761
|
end
|
757
762
|
end
|
758
763
|
|
759
764
|
##
|
760
|
-
# Configuration RPC class for the
|
765
|
+
# Configuration RPC class for the RecaptchaEnterpriseService API.
|
761
766
|
#
|
762
767
|
# Includes fields providing the configuration for each RPC in this service.
|
763
768
|
# Each configuration object is of type `Gapic::Config::Method` and includes
|
@@ -776,56 +781,56 @@ module Google
|
|
776
781
|
class Rpcs
|
777
782
|
##
|
778
783
|
# RPC-specific configuration for `create_assessment`
|
779
|
-
# @return [Gapic::Config::Method]
|
784
|
+
# @return [::Gapic::Config::Method]
|
780
785
|
#
|
781
786
|
attr_reader :create_assessment
|
782
787
|
##
|
783
788
|
# RPC-specific configuration for `annotate_assessment`
|
784
|
-
# @return [Gapic::Config::Method]
|
789
|
+
# @return [::Gapic::Config::Method]
|
785
790
|
#
|
786
791
|
attr_reader :annotate_assessment
|
787
792
|
##
|
788
793
|
# RPC-specific configuration for `create_key`
|
789
|
-
# @return [Gapic::Config::Method]
|
794
|
+
# @return [::Gapic::Config::Method]
|
790
795
|
#
|
791
796
|
attr_reader :create_key
|
792
797
|
##
|
793
798
|
# RPC-specific configuration for `list_keys`
|
794
|
-
# @return [Gapic::Config::Method]
|
799
|
+
# @return [::Gapic::Config::Method]
|
795
800
|
#
|
796
801
|
attr_reader :list_keys
|
797
802
|
##
|
798
803
|
# RPC-specific configuration for `get_key`
|
799
|
-
# @return [Gapic::Config::Method]
|
804
|
+
# @return [::Gapic::Config::Method]
|
800
805
|
#
|
801
806
|
attr_reader :get_key
|
802
807
|
##
|
803
808
|
# RPC-specific configuration for `update_key`
|
804
|
-
# @return [Gapic::Config::Method]
|
809
|
+
# @return [::Gapic::Config::Method]
|
805
810
|
#
|
806
811
|
attr_reader :update_key
|
807
812
|
##
|
808
813
|
# RPC-specific configuration for `delete_key`
|
809
|
-
# @return [Gapic::Config::Method]
|
814
|
+
# @return [::Gapic::Config::Method]
|
810
815
|
#
|
811
816
|
attr_reader :delete_key
|
812
817
|
|
813
818
|
# @private
|
814
819
|
def initialize parent_rpcs = nil
|
815
820
|
create_assessment_config = parent_rpcs&.create_assessment if parent_rpcs&.respond_to? :create_assessment
|
816
|
-
@create_assessment = Gapic::Config::Method.new create_assessment_config
|
821
|
+
@create_assessment = ::Gapic::Config::Method.new create_assessment_config
|
817
822
|
annotate_assessment_config = parent_rpcs&.annotate_assessment if parent_rpcs&.respond_to? :annotate_assessment
|
818
|
-
@annotate_assessment = Gapic::Config::Method.new annotate_assessment_config
|
823
|
+
@annotate_assessment = ::Gapic::Config::Method.new annotate_assessment_config
|
819
824
|
create_key_config = parent_rpcs&.create_key if parent_rpcs&.respond_to? :create_key
|
820
|
-
@create_key = Gapic::Config::Method.new create_key_config
|
825
|
+
@create_key = ::Gapic::Config::Method.new create_key_config
|
821
826
|
list_keys_config = parent_rpcs&.list_keys if parent_rpcs&.respond_to? :list_keys
|
822
|
-
@list_keys = Gapic::Config::Method.new list_keys_config
|
827
|
+
@list_keys = ::Gapic::Config::Method.new list_keys_config
|
823
828
|
get_key_config = parent_rpcs&.get_key if parent_rpcs&.respond_to? :get_key
|
824
|
-
@get_key = Gapic::Config::Method.new get_key_config
|
829
|
+
@get_key = ::Gapic::Config::Method.new get_key_config
|
825
830
|
update_key_config = parent_rpcs&.update_key if parent_rpcs&.respond_to? :update_key
|
826
|
-
@update_key = Gapic::Config::Method.new update_key_config
|
831
|
+
@update_key = ::Gapic::Config::Method.new update_key_config
|
827
832
|
delete_key_config = parent_rpcs&.delete_key if parent_rpcs&.respond_to? :delete_key
|
828
|
-
@delete_key = Gapic::Config::Method.new delete_key_config
|
833
|
+
@delete_key = ::Gapic::Config::Method.new delete_key_config
|
829
834
|
|
830
835
|
yield self if block_given?
|
831
836
|
end
|