google-apis-recaptchaenterprise_v1 0.1.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 +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google-apis-recaptchaenterprise_v1.rb +15 -0
- data/lib/google/apis/recaptchaenterprise_v1.rb +36 -0
- data/lib/google/apis/recaptchaenterprise_v1/classes.rb +586 -0
- data/lib/google/apis/recaptchaenterprise_v1/gem_version.rb +28 -0
- data/lib/google/apis/recaptchaenterprise_v1/representations.rb +301 -0
- data/lib/google/apis/recaptchaenterprise_v1/service.rb +370 -0
- metadata +76 -0
@@ -0,0 +1,28 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
module Google
|
16
|
+
module Apis
|
17
|
+
module RecaptchaenterpriseV1
|
18
|
+
# Version of the google-apis-recaptchaenterprise_v1 gem
|
19
|
+
GEM_VERSION = "0.1.0"
|
20
|
+
|
21
|
+
# Version of the code generator used to generate this client
|
22
|
+
GENERATOR_VERSION = "0.2.0"
|
23
|
+
|
24
|
+
# Revision of the discovery document this client was generated from
|
25
|
+
REVISION = "20210501"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,301 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'date'
|
16
|
+
require 'google/apis/core/base_service'
|
17
|
+
require 'google/apis/core/json_representation'
|
18
|
+
require 'google/apis/core/hashable'
|
19
|
+
require 'google/apis/errors'
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Apis
|
23
|
+
module RecaptchaenterpriseV1
|
24
|
+
|
25
|
+
class GoogleCloudRecaptchaenterpriseV1AndroidKeySettings
|
26
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
27
|
+
|
28
|
+
include Google::Apis::Core::JsonObjectSupport
|
29
|
+
end
|
30
|
+
|
31
|
+
class GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest
|
32
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
33
|
+
|
34
|
+
include Google::Apis::Core::JsonObjectSupport
|
35
|
+
end
|
36
|
+
|
37
|
+
class GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentResponse
|
38
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
39
|
+
|
40
|
+
include Google::Apis::Core::JsonObjectSupport
|
41
|
+
end
|
42
|
+
|
43
|
+
class GoogleCloudRecaptchaenterpriseV1Assessment
|
44
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
45
|
+
|
46
|
+
include Google::Apis::Core::JsonObjectSupport
|
47
|
+
end
|
48
|
+
|
49
|
+
class GoogleCloudRecaptchaenterpriseV1ChallengeMetrics
|
50
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
51
|
+
|
52
|
+
include Google::Apis::Core::JsonObjectSupport
|
53
|
+
end
|
54
|
+
|
55
|
+
class GoogleCloudRecaptchaenterpriseV1Event
|
56
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
57
|
+
|
58
|
+
include Google::Apis::Core::JsonObjectSupport
|
59
|
+
end
|
60
|
+
|
61
|
+
class GoogleCloudRecaptchaenterpriseV1IosKeySettings
|
62
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
63
|
+
|
64
|
+
include Google::Apis::Core::JsonObjectSupport
|
65
|
+
end
|
66
|
+
|
67
|
+
class GoogleCloudRecaptchaenterpriseV1Key
|
68
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
69
|
+
|
70
|
+
include Google::Apis::Core::JsonObjectSupport
|
71
|
+
end
|
72
|
+
|
73
|
+
class GoogleCloudRecaptchaenterpriseV1ListKeysResponse
|
74
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
75
|
+
|
76
|
+
include Google::Apis::Core::JsonObjectSupport
|
77
|
+
end
|
78
|
+
|
79
|
+
class GoogleCloudRecaptchaenterpriseV1Metrics
|
80
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
81
|
+
|
82
|
+
include Google::Apis::Core::JsonObjectSupport
|
83
|
+
end
|
84
|
+
|
85
|
+
class GoogleCloudRecaptchaenterpriseV1MigrateKeyRequest
|
86
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
87
|
+
|
88
|
+
include Google::Apis::Core::JsonObjectSupport
|
89
|
+
end
|
90
|
+
|
91
|
+
class GoogleCloudRecaptchaenterpriseV1RiskAnalysis
|
92
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
93
|
+
|
94
|
+
include Google::Apis::Core::JsonObjectSupport
|
95
|
+
end
|
96
|
+
|
97
|
+
class GoogleCloudRecaptchaenterpriseV1ScoreDistribution
|
98
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
99
|
+
|
100
|
+
include Google::Apis::Core::JsonObjectSupport
|
101
|
+
end
|
102
|
+
|
103
|
+
class GoogleCloudRecaptchaenterpriseV1ScoreMetrics
|
104
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
105
|
+
|
106
|
+
include Google::Apis::Core::JsonObjectSupport
|
107
|
+
end
|
108
|
+
|
109
|
+
class GoogleCloudRecaptchaenterpriseV1TestingOptions
|
110
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
111
|
+
|
112
|
+
include Google::Apis::Core::JsonObjectSupport
|
113
|
+
end
|
114
|
+
|
115
|
+
class GoogleCloudRecaptchaenterpriseV1TokenProperties
|
116
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
117
|
+
|
118
|
+
include Google::Apis::Core::JsonObjectSupport
|
119
|
+
end
|
120
|
+
|
121
|
+
class GoogleCloudRecaptchaenterpriseV1WebKeySettings
|
122
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
123
|
+
|
124
|
+
include Google::Apis::Core::JsonObjectSupport
|
125
|
+
end
|
126
|
+
|
127
|
+
class GoogleProtobufEmpty
|
128
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
129
|
+
|
130
|
+
include Google::Apis::Core::JsonObjectSupport
|
131
|
+
end
|
132
|
+
|
133
|
+
class GoogleCloudRecaptchaenterpriseV1AndroidKeySettings
|
134
|
+
# @private
|
135
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
136
|
+
collection :allowed_package_names, as: 'allowedPackageNames'
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
class GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest
|
141
|
+
# @private
|
142
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
143
|
+
property :annotation, as: 'annotation'
|
144
|
+
collection :reasons, as: 'reasons'
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
class GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentResponse
|
149
|
+
# @private
|
150
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
class GoogleCloudRecaptchaenterpriseV1Assessment
|
155
|
+
# @private
|
156
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
157
|
+
property :event, as: 'event', class: Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1Event, decorator: Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1Event::Representation
|
158
|
+
|
159
|
+
property :name, as: 'name'
|
160
|
+
property :risk_analysis, as: 'riskAnalysis', class: Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1RiskAnalysis, decorator: Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1RiskAnalysis::Representation
|
161
|
+
|
162
|
+
property :token_properties, as: 'tokenProperties', class: Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1TokenProperties, decorator: Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1TokenProperties::Representation
|
163
|
+
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
167
|
+
class GoogleCloudRecaptchaenterpriseV1ChallengeMetrics
|
168
|
+
# @private
|
169
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
170
|
+
property :failed_count, :numeric_string => true, as: 'failedCount'
|
171
|
+
property :nocaptcha_count, :numeric_string => true, as: 'nocaptchaCount'
|
172
|
+
property :pageload_count, :numeric_string => true, as: 'pageloadCount'
|
173
|
+
property :passed_count, :numeric_string => true, as: 'passedCount'
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
177
|
+
class GoogleCloudRecaptchaenterpriseV1Event
|
178
|
+
# @private
|
179
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
180
|
+
property :expected_action, as: 'expectedAction'
|
181
|
+
property :site_key, as: 'siteKey'
|
182
|
+
property :token, as: 'token'
|
183
|
+
property :user_agent, as: 'userAgent'
|
184
|
+
property :user_ip_address, as: 'userIpAddress'
|
185
|
+
end
|
186
|
+
end
|
187
|
+
|
188
|
+
class GoogleCloudRecaptchaenterpriseV1IosKeySettings
|
189
|
+
# @private
|
190
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
191
|
+
collection :allowed_bundle_ids, as: 'allowedBundleIds'
|
192
|
+
end
|
193
|
+
end
|
194
|
+
|
195
|
+
class GoogleCloudRecaptchaenterpriseV1Key
|
196
|
+
# @private
|
197
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
198
|
+
property :android_settings, as: 'androidSettings', class: Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1AndroidKeySettings, decorator: Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1AndroidKeySettings::Representation
|
199
|
+
|
200
|
+
property :create_time, as: 'createTime'
|
201
|
+
property :display_name, as: 'displayName'
|
202
|
+
property :ios_settings, as: 'iosSettings', class: Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1IosKeySettings, decorator: Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1IosKeySettings::Representation
|
203
|
+
|
204
|
+
hash :labels, as: 'labels'
|
205
|
+
property :name, as: 'name'
|
206
|
+
property :testing_options, as: 'testingOptions', class: Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1TestingOptions, decorator: Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1TestingOptions::Representation
|
207
|
+
|
208
|
+
property :web_settings, as: 'webSettings', class: Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1WebKeySettings, decorator: Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1WebKeySettings::Representation
|
209
|
+
|
210
|
+
end
|
211
|
+
end
|
212
|
+
|
213
|
+
class GoogleCloudRecaptchaenterpriseV1ListKeysResponse
|
214
|
+
# @private
|
215
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
216
|
+
collection :keys, as: 'keys', class: Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1Key, decorator: Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1Key::Representation
|
217
|
+
|
218
|
+
property :next_page_token, as: 'nextPageToken'
|
219
|
+
end
|
220
|
+
end
|
221
|
+
|
222
|
+
class GoogleCloudRecaptchaenterpriseV1Metrics
|
223
|
+
# @private
|
224
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
225
|
+
collection :challenge_metrics, as: 'challengeMetrics', class: Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1ChallengeMetrics, decorator: Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1ChallengeMetrics::Representation
|
226
|
+
|
227
|
+
collection :score_metrics, as: 'scoreMetrics', class: Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1ScoreMetrics, decorator: Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1ScoreMetrics::Representation
|
228
|
+
|
229
|
+
property :start_time, as: 'startTime'
|
230
|
+
end
|
231
|
+
end
|
232
|
+
|
233
|
+
class GoogleCloudRecaptchaenterpriseV1MigrateKeyRequest
|
234
|
+
# @private
|
235
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
236
|
+
end
|
237
|
+
end
|
238
|
+
|
239
|
+
class GoogleCloudRecaptchaenterpriseV1RiskAnalysis
|
240
|
+
# @private
|
241
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
242
|
+
collection :reasons, as: 'reasons'
|
243
|
+
property :score, as: 'score'
|
244
|
+
end
|
245
|
+
end
|
246
|
+
|
247
|
+
class GoogleCloudRecaptchaenterpriseV1ScoreDistribution
|
248
|
+
# @private
|
249
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
250
|
+
hash :score_buckets, as: 'scoreBuckets'
|
251
|
+
end
|
252
|
+
end
|
253
|
+
|
254
|
+
class GoogleCloudRecaptchaenterpriseV1ScoreMetrics
|
255
|
+
# @private
|
256
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
257
|
+
hash :action_metrics, as: 'actionMetrics', class: Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1ScoreDistribution, decorator: Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1ScoreDistribution::Representation
|
258
|
+
|
259
|
+
property :overall_metrics, as: 'overallMetrics', class: Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1ScoreDistribution, decorator: Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1ScoreDistribution::Representation
|
260
|
+
|
261
|
+
end
|
262
|
+
end
|
263
|
+
|
264
|
+
class GoogleCloudRecaptchaenterpriseV1TestingOptions
|
265
|
+
# @private
|
266
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
267
|
+
property :testing_challenge, as: 'testingChallenge'
|
268
|
+
property :testing_score, as: 'testingScore'
|
269
|
+
end
|
270
|
+
end
|
271
|
+
|
272
|
+
class GoogleCloudRecaptchaenterpriseV1TokenProperties
|
273
|
+
# @private
|
274
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
275
|
+
property :action, as: 'action'
|
276
|
+
property :create_time, as: 'createTime'
|
277
|
+
property :hostname, as: 'hostname'
|
278
|
+
property :invalid_reason, as: 'invalidReason'
|
279
|
+
property :valid, as: 'valid'
|
280
|
+
end
|
281
|
+
end
|
282
|
+
|
283
|
+
class GoogleCloudRecaptchaenterpriseV1WebKeySettings
|
284
|
+
# @private
|
285
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
286
|
+
property :allow_all_domains, as: 'allowAllDomains'
|
287
|
+
property :allow_amp_traffic, as: 'allowAmpTraffic'
|
288
|
+
collection :allowed_domains, as: 'allowedDomains'
|
289
|
+
property :challenge_security_preference, as: 'challengeSecurityPreference'
|
290
|
+
property :integration_type, as: 'integrationType'
|
291
|
+
end
|
292
|
+
end
|
293
|
+
|
294
|
+
class GoogleProtobufEmpty
|
295
|
+
# @private
|
296
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
297
|
+
end
|
298
|
+
end
|
299
|
+
end
|
300
|
+
end
|
301
|
+
end
|
@@ -0,0 +1,370 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'google/apis/core/base_service'
|
16
|
+
require 'google/apis/core/json_representation'
|
17
|
+
require 'google/apis/core/hashable'
|
18
|
+
require 'google/apis/errors'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
module RecaptchaenterpriseV1
|
23
|
+
# reCAPTCHA Enterprise API
|
24
|
+
#
|
25
|
+
#
|
26
|
+
#
|
27
|
+
# @example
|
28
|
+
# require 'google/apis/recaptchaenterprise_v1'
|
29
|
+
#
|
30
|
+
# Recaptchaenterprise = Google::Apis::RecaptchaenterpriseV1 # Alias the module
|
31
|
+
# service = Recaptchaenterprise::RecaptchaEnterpriseService.new
|
32
|
+
#
|
33
|
+
# @see https://cloud.google.com/recaptcha-enterprise/
|
34
|
+
class RecaptchaEnterpriseService < Google::Apis::Core::BaseService
|
35
|
+
# @return [String]
|
36
|
+
# API key. Your API key identifies your project and provides you with API access,
|
37
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
38
|
+
attr_accessor :key
|
39
|
+
|
40
|
+
# @return [String]
|
41
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
42
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
43
|
+
attr_accessor :quota_user
|
44
|
+
|
45
|
+
def initialize
|
46
|
+
super('https://recaptchaenterprise.googleapis.com/', '',
|
47
|
+
client_name: 'google-apis-recaptchaenterprise_v1',
|
48
|
+
client_version: Google::Apis::RecaptchaenterpriseV1::GEM_VERSION)
|
49
|
+
@batch_path = 'batch'
|
50
|
+
end
|
51
|
+
|
52
|
+
# Annotates a previously created Assessment to provide additional information on
|
53
|
+
# whether the event turned out to be authentic or fraudulent.
|
54
|
+
# @param [String] name
|
55
|
+
# Required. The resource name of the Assessment, in the format "projects/`
|
56
|
+
# project`/assessments/`assessment`".
|
57
|
+
# @param [Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest] google_cloud_recaptchaenterprise_v1_annotate_assessment_request_object
|
58
|
+
# @param [String] fields
|
59
|
+
# Selector specifying which fields to include in a partial response.
|
60
|
+
# @param [String] quota_user
|
61
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
62
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
63
|
+
# @param [Google::Apis::RequestOptions] options
|
64
|
+
# Request-specific options
|
65
|
+
#
|
66
|
+
# @yield [result, err] Result & error if block supplied
|
67
|
+
# @yieldparam result [Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentResponse] parsed result object
|
68
|
+
# @yieldparam err [StandardError] error object if request failed
|
69
|
+
#
|
70
|
+
# @return [Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentResponse]
|
71
|
+
#
|
72
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
73
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
74
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
75
|
+
def annotate_project_assessment(name, google_cloud_recaptchaenterprise_v1_annotate_assessment_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
76
|
+
command = make_simple_command(:post, 'v1/{+name}:annotate', options)
|
77
|
+
command.request_representation = Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest::Representation
|
78
|
+
command.request_object = google_cloud_recaptchaenterprise_v1_annotate_assessment_request_object
|
79
|
+
command.response_representation = Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentResponse::Representation
|
80
|
+
command.response_class = Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentResponse
|
81
|
+
command.params['name'] = name unless name.nil?
|
82
|
+
command.query['fields'] = fields unless fields.nil?
|
83
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
84
|
+
execute_or_queue_command(command, &block)
|
85
|
+
end
|
86
|
+
|
87
|
+
# Creates an Assessment of the likelihood an event is legitimate.
|
88
|
+
# @param [String] parent
|
89
|
+
# Required. The name of the project in which the assessment will be created, in
|
90
|
+
# the format "projects/`project`".
|
91
|
+
# @param [Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1Assessment] google_cloud_recaptchaenterprise_v1_assessment_object
|
92
|
+
# @param [String] fields
|
93
|
+
# Selector specifying which fields to include in a partial response.
|
94
|
+
# @param [String] quota_user
|
95
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
96
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
97
|
+
# @param [Google::Apis::RequestOptions] options
|
98
|
+
# Request-specific options
|
99
|
+
#
|
100
|
+
# @yield [result, err] Result & error if block supplied
|
101
|
+
# @yieldparam result [Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1Assessment] parsed result object
|
102
|
+
# @yieldparam err [StandardError] error object if request failed
|
103
|
+
#
|
104
|
+
# @return [Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1Assessment]
|
105
|
+
#
|
106
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
107
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
108
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
109
|
+
def create_project_assessment(parent, google_cloud_recaptchaenterprise_v1_assessment_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
110
|
+
command = make_simple_command(:post, 'v1/{+parent}/assessments', options)
|
111
|
+
command.request_representation = Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1Assessment::Representation
|
112
|
+
command.request_object = google_cloud_recaptchaenterprise_v1_assessment_object
|
113
|
+
command.response_representation = Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1Assessment::Representation
|
114
|
+
command.response_class = Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1Assessment
|
115
|
+
command.params['parent'] = parent unless parent.nil?
|
116
|
+
command.query['fields'] = fields unless fields.nil?
|
117
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
118
|
+
execute_or_queue_command(command, &block)
|
119
|
+
end
|
120
|
+
|
121
|
+
# Creates a new reCAPTCHA Enterprise key.
|
122
|
+
# @param [String] parent
|
123
|
+
# Required. The name of the project in which the key will be created, in the
|
124
|
+
# format "projects/`project`".
|
125
|
+
# @param [Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1Key] google_cloud_recaptchaenterprise_v1_key_object
|
126
|
+
# @param [String] fields
|
127
|
+
# Selector specifying which fields to include in a partial response.
|
128
|
+
# @param [String] quota_user
|
129
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
130
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
131
|
+
# @param [Google::Apis::RequestOptions] options
|
132
|
+
# Request-specific options
|
133
|
+
#
|
134
|
+
# @yield [result, err] Result & error if block supplied
|
135
|
+
# @yieldparam result [Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1Key] parsed result object
|
136
|
+
# @yieldparam err [StandardError] error object if request failed
|
137
|
+
#
|
138
|
+
# @return [Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1Key]
|
139
|
+
#
|
140
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
141
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
142
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
143
|
+
def create_project_key(parent, google_cloud_recaptchaenterprise_v1_key_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
144
|
+
command = make_simple_command(:post, 'v1/{+parent}/keys', options)
|
145
|
+
command.request_representation = Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1Key::Representation
|
146
|
+
command.request_object = google_cloud_recaptchaenterprise_v1_key_object
|
147
|
+
command.response_representation = Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1Key::Representation
|
148
|
+
command.response_class = Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1Key
|
149
|
+
command.params['parent'] = parent unless parent.nil?
|
150
|
+
command.query['fields'] = fields unless fields.nil?
|
151
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
152
|
+
execute_or_queue_command(command, &block)
|
153
|
+
end
|
154
|
+
|
155
|
+
# Deletes the specified key.
|
156
|
+
# @param [String] name
|
157
|
+
# Required. The name of the key to be deleted, in the format "projects/`project`/
|
158
|
+
# keys/`key`".
|
159
|
+
# @param [String] fields
|
160
|
+
# Selector specifying which fields to include in a partial response.
|
161
|
+
# @param [String] quota_user
|
162
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
163
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
164
|
+
# @param [Google::Apis::RequestOptions] options
|
165
|
+
# Request-specific options
|
166
|
+
#
|
167
|
+
# @yield [result, err] Result & error if block supplied
|
168
|
+
# @yieldparam result [Google::Apis::RecaptchaenterpriseV1::GoogleProtobufEmpty] parsed result object
|
169
|
+
# @yieldparam err [StandardError] error object if request failed
|
170
|
+
#
|
171
|
+
# @return [Google::Apis::RecaptchaenterpriseV1::GoogleProtobufEmpty]
|
172
|
+
#
|
173
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
174
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
175
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
176
|
+
def delete_project_key(name, fields: nil, quota_user: nil, options: nil, &block)
|
177
|
+
command = make_simple_command(:delete, 'v1/{+name}', options)
|
178
|
+
command.response_representation = Google::Apis::RecaptchaenterpriseV1::GoogleProtobufEmpty::Representation
|
179
|
+
command.response_class = Google::Apis::RecaptchaenterpriseV1::GoogleProtobufEmpty
|
180
|
+
command.params['name'] = name unless name.nil?
|
181
|
+
command.query['fields'] = fields unless fields.nil?
|
182
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
183
|
+
execute_or_queue_command(command, &block)
|
184
|
+
end
|
185
|
+
|
186
|
+
# Returns the specified key.
|
187
|
+
# @param [String] name
|
188
|
+
# Required. The name of the requested key, in the format "projects/`project`/
|
189
|
+
# keys/`key`".
|
190
|
+
# @param [String] fields
|
191
|
+
# Selector specifying which fields to include in a partial response.
|
192
|
+
# @param [String] quota_user
|
193
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
194
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
195
|
+
# @param [Google::Apis::RequestOptions] options
|
196
|
+
# Request-specific options
|
197
|
+
#
|
198
|
+
# @yield [result, err] Result & error if block supplied
|
199
|
+
# @yieldparam result [Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1Key] parsed result object
|
200
|
+
# @yieldparam err [StandardError] error object if request failed
|
201
|
+
#
|
202
|
+
# @return [Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1Key]
|
203
|
+
#
|
204
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
205
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
206
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
207
|
+
def get_project_key(name, fields: nil, quota_user: nil, options: nil, &block)
|
208
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
209
|
+
command.response_representation = Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1Key::Representation
|
210
|
+
command.response_class = Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1Key
|
211
|
+
command.params['name'] = name unless name.nil?
|
212
|
+
command.query['fields'] = fields unless fields.nil?
|
213
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
214
|
+
execute_or_queue_command(command, &block)
|
215
|
+
end
|
216
|
+
|
217
|
+
# Get some aggregated metrics for a Key. This data can be used to build
|
218
|
+
# dashboards.
|
219
|
+
# @param [String] name
|
220
|
+
# Required. The name of the requested metrics, in the format "projects/`project`/
|
221
|
+
# keys/`key`/metrics".
|
222
|
+
# @param [String] fields
|
223
|
+
# Selector specifying which fields to include in a partial response.
|
224
|
+
# @param [String] quota_user
|
225
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
226
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
227
|
+
# @param [Google::Apis::RequestOptions] options
|
228
|
+
# Request-specific options
|
229
|
+
#
|
230
|
+
# @yield [result, err] Result & error if block supplied
|
231
|
+
# @yieldparam result [Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1Metrics] parsed result object
|
232
|
+
# @yieldparam err [StandardError] error object if request failed
|
233
|
+
#
|
234
|
+
# @return [Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1Metrics]
|
235
|
+
#
|
236
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
237
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
238
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
239
|
+
def get_project_key_metrics(name, fields: nil, quota_user: nil, options: nil, &block)
|
240
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
241
|
+
command.response_representation = Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1Metrics::Representation
|
242
|
+
command.response_class = Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1Metrics
|
243
|
+
command.params['name'] = name unless name.nil?
|
244
|
+
command.query['fields'] = fields unless fields.nil?
|
245
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
246
|
+
execute_or_queue_command(command, &block)
|
247
|
+
end
|
248
|
+
|
249
|
+
# Returns the list of all keys that belong to a project.
|
250
|
+
# @param [String] parent
|
251
|
+
# Required. The name of the project that contains the keys that will be listed,
|
252
|
+
# in the format "projects/`project`".
|
253
|
+
# @param [Fixnum] page_size
|
254
|
+
# Optional. The maximum number of keys to return. Default is 10. Max limit is
|
255
|
+
# 1000.
|
256
|
+
# @param [String] page_token
|
257
|
+
# Optional. The next_page_token value returned from a previous. ListKeysRequest,
|
258
|
+
# if any.
|
259
|
+
# @param [String] fields
|
260
|
+
# Selector specifying which fields to include in a partial response.
|
261
|
+
# @param [String] quota_user
|
262
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
263
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
264
|
+
# @param [Google::Apis::RequestOptions] options
|
265
|
+
# Request-specific options
|
266
|
+
#
|
267
|
+
# @yield [result, err] Result & error if block supplied
|
268
|
+
# @yieldparam result [Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1ListKeysResponse] parsed result object
|
269
|
+
# @yieldparam err [StandardError] error object if request failed
|
270
|
+
#
|
271
|
+
# @return [Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1ListKeysResponse]
|
272
|
+
#
|
273
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
274
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
275
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
276
|
+
def list_project_keys(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
277
|
+
command = make_simple_command(:get, 'v1/{+parent}/keys', options)
|
278
|
+
command.response_representation = Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1ListKeysResponse::Representation
|
279
|
+
command.response_class = Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1ListKeysResponse
|
280
|
+
command.params['parent'] = parent unless parent.nil?
|
281
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
282
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
283
|
+
command.query['fields'] = fields unless fields.nil?
|
284
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
285
|
+
execute_or_queue_command(command, &block)
|
286
|
+
end
|
287
|
+
|
288
|
+
# Migrates an existing key from reCAPTCHA to reCAPTCHA Enterprise. Once a key is
|
289
|
+
# migrated, it can be used from either product. SiteVerify requests will be
|
290
|
+
# billed as CreateAssessment calls.
|
291
|
+
# @param [String] name
|
292
|
+
# Required. The name of the key to be migrated, in the format "projects/`project`
|
293
|
+
# /keys/`key`".
|
294
|
+
# @param [Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1MigrateKeyRequest] google_cloud_recaptchaenterprise_v1_migrate_key_request_object
|
295
|
+
# @param [String] fields
|
296
|
+
# Selector specifying which fields to include in a partial response.
|
297
|
+
# @param [String] quota_user
|
298
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
299
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
300
|
+
# @param [Google::Apis::RequestOptions] options
|
301
|
+
# Request-specific options
|
302
|
+
#
|
303
|
+
# @yield [result, err] Result & error if block supplied
|
304
|
+
# @yieldparam result [Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1Key] parsed result object
|
305
|
+
# @yieldparam err [StandardError] error object if request failed
|
306
|
+
#
|
307
|
+
# @return [Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1Key]
|
308
|
+
#
|
309
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
310
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
311
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
312
|
+
def migrate_project_key(name, google_cloud_recaptchaenterprise_v1_migrate_key_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
313
|
+
command = make_simple_command(:post, 'v1/{+name}:migrate', options)
|
314
|
+
command.request_representation = Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1MigrateKeyRequest::Representation
|
315
|
+
command.request_object = google_cloud_recaptchaenterprise_v1_migrate_key_request_object
|
316
|
+
command.response_representation = Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1Key::Representation
|
317
|
+
command.response_class = Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1Key
|
318
|
+
command.params['name'] = name unless name.nil?
|
319
|
+
command.query['fields'] = fields unless fields.nil?
|
320
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
321
|
+
execute_or_queue_command(command, &block)
|
322
|
+
end
|
323
|
+
|
324
|
+
# Updates the specified key.
|
325
|
+
# @param [String] name
|
326
|
+
# The resource name for the Key in the format "projects/`project`/keys/`key`".
|
327
|
+
# @param [Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1Key] google_cloud_recaptchaenterprise_v1_key_object
|
328
|
+
# @param [String] update_mask
|
329
|
+
# Optional. The mask to control which field of the key get updated. If the mask
|
330
|
+
# is not present, all fields will be updated.
|
331
|
+
# @param [String] fields
|
332
|
+
# Selector specifying which fields to include in a partial response.
|
333
|
+
# @param [String] quota_user
|
334
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
335
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
336
|
+
# @param [Google::Apis::RequestOptions] options
|
337
|
+
# Request-specific options
|
338
|
+
#
|
339
|
+
# @yield [result, err] Result & error if block supplied
|
340
|
+
# @yieldparam result [Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1Key] parsed result object
|
341
|
+
# @yieldparam err [StandardError] error object if request failed
|
342
|
+
#
|
343
|
+
# @return [Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1Key]
|
344
|
+
#
|
345
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
346
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
347
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
348
|
+
def patch_project_key(name, google_cloud_recaptchaenterprise_v1_key_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
349
|
+
command = make_simple_command(:patch, 'v1/{+name}', options)
|
350
|
+
command.request_representation = Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1Key::Representation
|
351
|
+
command.request_object = google_cloud_recaptchaenterprise_v1_key_object
|
352
|
+
command.response_representation = Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1Key::Representation
|
353
|
+
command.response_class = Google::Apis::RecaptchaenterpriseV1::GoogleCloudRecaptchaenterpriseV1Key
|
354
|
+
command.params['name'] = name unless name.nil?
|
355
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
356
|
+
command.query['fields'] = fields unless fields.nil?
|
357
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
358
|
+
execute_or_queue_command(command, &block)
|
359
|
+
end
|
360
|
+
|
361
|
+
protected
|
362
|
+
|
363
|
+
def apply_command_defaults(command)
|
364
|
+
command.query['key'] = key unless key.nil?
|
365
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
366
|
+
end
|
367
|
+
end
|
368
|
+
end
|
369
|
+
end
|
370
|
+
end
|