google-cloud-recaptcha_enterprise-v1 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -24,7 +24,7 @@ module Google
24
24
  module V1
25
25
  module RecaptchaEnterpriseService
26
26
  # Credentials for the RecaptchaEnterpriseService API.
27
- class Credentials < Google::Auth::Credentials
27
+ class Credentials < ::Google::Auth::Credentials
28
28
  self.scope = [
29
29
  "https://www.googleapis.com/auth/cloud-platform"
30
30
  ]
@@ -34,9 +34,9 @@ module Google
34
34
  # @param project [String]
35
35
  # @param assessment [String]
36
36
  #
37
- # @return [String]
37
+ # @return [::String]
38
38
  def assessment_path project:, assessment:
39
- raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
39
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
40
40
 
41
41
  "projects/#{project}/assessments/#{assessment}"
42
42
  end
@@ -51,9 +51,9 @@ module Google
51
51
  # @param project [String]
52
52
  # @param key [String]
53
53
  #
54
- # @return [String]
54
+ # @return [::String]
55
55
  def key_path project:, key:
56
- raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
56
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
57
57
 
58
58
  "projects/#{project}/keys/#{key}"
59
59
  end
@@ -67,7 +67,7 @@ module Google
67
67
  #
68
68
  # @param project [String]
69
69
  #
70
- # @return [String]
70
+ # @return [::String]
71
71
  def project_path project:
72
72
  "projects/#{project}"
73
73
  end
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module RecaptchaEnterprise
23
23
  module V1
24
- VERSION = "0.1.0"
24
+ VERSION = "0.1.1"
25
25
  end
26
26
  end
27
27
  end
@@ -128,7 +128,7 @@ module Google
128
128
  # - pattern: "shelves/{shelf}"
129
129
  # parent_type: "cloudresourcemanager.googleapis.com/Folder"
130
130
  # @!attribute [rw] type
131
- # @return [String]
131
+ # @return [::String]
132
132
  # The resource type. It must be in the format of
133
133
  # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be
134
134
  # singular and must not include version numbers.
@@ -140,7 +140,7 @@ module Google
140
140
  # should use PascalCase (UpperCamelCase). The maximum number of
141
141
  # characters allowed for the `resource_type_kind` is 100.
142
142
  # @!attribute [rw] pattern
143
- # @return [Array<String>]
143
+ # @return [::Array<::String>]
144
144
  # Optional. The relative resource name pattern associated with this resource
145
145
  # type. The DNS prefix of the full resource name shouldn't be specified here.
146
146
  #
@@ -161,11 +161,11 @@ module Google
161
161
  # the same component name (e.g. "project") refers to IDs of the same
162
162
  # type of resource.
163
163
  # @!attribute [rw] name_field
164
- # @return [String]
164
+ # @return [::String]
165
165
  # Optional. The field on the resource that designates the resource name
166
166
  # field. If omitted, this is assumed to be "name".
167
167
  # @!attribute [rw] history
168
- # @return [Google::Api::ResourceDescriptor::History]
168
+ # @return [::Google::Api::ResourceDescriptor::History]
169
169
  # Optional. The historical or future-looking state of the resource pattern.
170
170
  #
171
171
  # Example:
@@ -182,19 +182,19 @@ module Google
182
182
  # };
183
183
  # }
184
184
  # @!attribute [rw] plural
185
- # @return [String]
185
+ # @return [::String]
186
186
  # The plural name used in the resource name, such as 'projects' for
187
187
  # the name of 'projects/\\{project}'. It is the same concept of the `plural`
188
188
  # field in k8s CRD spec
189
189
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
190
190
  # @!attribute [rw] singular
191
- # @return [String]
191
+ # @return [::String]
192
192
  # The same concept of the `singular` field in k8s CRD spec
193
193
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
194
194
  # Such as "project" for the `resourcemanager.googleapis.com/Project` type.
195
195
  class ResourceDescriptor
196
- include Google::Protobuf::MessageExts
197
- extend Google::Protobuf::MessageExts::ClassMethods
196
+ include ::Google::Protobuf::MessageExts
197
+ extend ::Google::Protobuf::MessageExts::ClassMethods
198
198
 
199
199
  # A description of the historical or future-looking state of the
200
200
  # resource pattern.
@@ -216,7 +216,7 @@ module Google
216
216
  # Defines a proto annotation that describes a string field that refers to
217
217
  # an API resource.
218
218
  # @!attribute [rw] type
219
- # @return [String]
219
+ # @return [::String]
220
220
  # The resource type that the annotated field references.
221
221
  #
222
222
  # Example:
@@ -227,7 +227,7 @@ module Google
227
227
  # }];
228
228
  # }
229
229
  # @!attribute [rw] child_type
230
- # @return [String]
230
+ # @return [::String]
231
231
  # The resource type of a child collection that the annotated field
232
232
  # references. This is useful for annotating the `parent` field that
233
233
  # doesn't have a fixed resource type.
@@ -240,8 +240,8 @@ module Google
240
240
  # };
241
241
  # }
242
242
  class ResourceReference
243
- include Google::Protobuf::MessageExts
244
- extend Google::Protobuf::MessageExts::ClassMethods
243
+ include ::Google::Protobuf::MessageExts
244
+ extend ::Google::Protobuf::MessageExts::ClassMethods
245
245
  end
246
246
  end
247
247
  end
@@ -23,28 +23,28 @@ module Google
23
23
  module V1
24
24
  # The create assessment request message.
25
25
  # @!attribute [rw] parent
26
- # @return [String]
26
+ # @return [::String]
27
27
  # Required. The name of the project in which the assessment will be created,
28
28
  # in the format "projects/\\{project}".
29
29
  # @!attribute [rw] assessment
30
- # @return [Google::Cloud::RecaptchaEnterprise::V1::Assessment]
30
+ # @return [::Google::Cloud::RecaptchaEnterprise::V1::Assessment]
31
31
  # Required. The assessment details.
32
32
  class CreateAssessmentRequest
33
- include Google::Protobuf::MessageExts
34
- extend Google::Protobuf::MessageExts::ClassMethods
33
+ include ::Google::Protobuf::MessageExts
34
+ extend ::Google::Protobuf::MessageExts::ClassMethods
35
35
  end
36
36
 
37
37
  # The request message to annotate an Assessment.
38
38
  # @!attribute [rw] name
39
- # @return [String]
39
+ # @return [::String]
40
40
  # Required. The resource name of the Assessment, in the format
41
41
  # "projects/\\{project}/assessments/\\{assessment}".
42
42
  # @!attribute [rw] annotation
43
- # @return [Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest::Annotation]
43
+ # @return [::Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest::Annotation]
44
44
  # Required. The annotation that will be assigned to the Event.
45
45
  class AnnotateAssessmentRequest
46
- include Google::Protobuf::MessageExts
47
- extend Google::Protobuf::MessageExts::ClassMethods
46
+ include ::Google::Protobuf::MessageExts
47
+ extend ::Google::Protobuf::MessageExts::ClassMethods
48
48
 
49
49
  # Enum that reprensents the types of annotations.
50
50
  module Annotation
@@ -69,66 +69,66 @@ module Google
69
69
 
70
70
  # Empty response for AnnotateAssessment.
71
71
  class AnnotateAssessmentResponse
72
- include Google::Protobuf::MessageExts
73
- extend Google::Protobuf::MessageExts::ClassMethods
72
+ include ::Google::Protobuf::MessageExts
73
+ extend ::Google::Protobuf::MessageExts::ClassMethods
74
74
  end
75
75
 
76
76
  # A recaptcha assessment resource.
77
77
  # @!attribute [r] name
78
- # @return [String]
78
+ # @return [::String]
79
79
  # Output only. The resource name for the Assessment in the format
80
80
  # "projects/\\{project}/assessments/\\{assessment}".
81
81
  # @!attribute [rw] event
82
- # @return [Google::Cloud::RecaptchaEnterprise::V1::Event]
82
+ # @return [::Google::Cloud::RecaptchaEnterprise::V1::Event]
83
83
  # The event being assessed.
84
84
  # @!attribute [r] risk_analysis
85
- # @return [Google::Cloud::RecaptchaEnterprise::V1::RiskAnalysis]
85
+ # @return [::Google::Cloud::RecaptchaEnterprise::V1::RiskAnalysis]
86
86
  # Output only. The risk analysis result for the event being assessed.
87
87
  # @!attribute [r] token_properties
88
- # @return [Google::Cloud::RecaptchaEnterprise::V1::TokenProperties]
88
+ # @return [::Google::Cloud::RecaptchaEnterprise::V1::TokenProperties]
89
89
  # Output only. Properties of the provided event token.
90
90
  class Assessment
91
- include Google::Protobuf::MessageExts
92
- extend Google::Protobuf::MessageExts::ClassMethods
91
+ include ::Google::Protobuf::MessageExts
92
+ extend ::Google::Protobuf::MessageExts::ClassMethods
93
93
  end
94
94
 
95
95
  # @!attribute [rw] token
96
- # @return [String]
96
+ # @return [::String]
97
97
  # Optional. The user response token provided by the reCAPTCHA client-side integration
98
98
  # on your site.
99
99
  # @!attribute [rw] site_key
100
- # @return [String]
100
+ # @return [::String]
101
101
  # Optional. The site key that was used to invoke reCAPTCHA on your site and generate
102
102
  # the token.
103
103
  # @!attribute [rw] user_agent
104
- # @return [String]
104
+ # @return [::String]
105
105
  # Optional. The user agent present in the request from the user's device related to
106
106
  # this event.
107
107
  # @!attribute [rw] user_ip_address
108
- # @return [String]
108
+ # @return [::String]
109
109
  # Optional. The IP address in the request from the user's device related to this event.
110
110
  # @!attribute [rw] expected_action
111
- # @return [String]
111
+ # @return [::String]
112
112
  # Optional. The expected action for this type of event. This should be the same action
113
113
  # provided at token generation time on client-side platforms already
114
114
  # integrated with recaptcha enterprise.
115
115
  class Event
116
- include Google::Protobuf::MessageExts
117
- extend Google::Protobuf::MessageExts::ClassMethods
116
+ include ::Google::Protobuf::MessageExts
117
+ extend ::Google::Protobuf::MessageExts::ClassMethods
118
118
  end
119
119
 
120
120
  # Risk analysis result for an event.
121
121
  # @!attribute [rw] score
122
- # @return [Float]
122
+ # @return [::Float]
123
123
  # Legitimate event score from 0.0 to 1.0.
124
124
  # (1.0 means very likely legitimate traffic while 0.0 means very likely
125
125
  # non-legitimate traffic).
126
126
  # @!attribute [rw] reasons
127
- # @return [Array<Google::Cloud::RecaptchaEnterprise::V1::RiskAnalysis::ClassificationReason>]
127
+ # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::RiskAnalysis::ClassificationReason>]
128
128
  # Reasons contributing to the risk analysis verdict.
129
129
  class RiskAnalysis
130
- include Google::Protobuf::MessageExts
131
- extend Google::Protobuf::MessageExts::ClassMethods
130
+ include ::Google::Protobuf::MessageExts
131
+ extend ::Google::Protobuf::MessageExts::ClassMethods
132
132
 
133
133
  # LINT.IfChange(classification_reason)
134
134
  # Reasons contributing to the risk analysis verdict.
@@ -156,27 +156,27 @@ module Google
156
156
  end
157
157
 
158
158
  # @!attribute [rw] valid
159
- # @return [Boolean]
159
+ # @return [::Boolean]
160
160
  # Whether the provided user response token is valid. When valid = false, the
161
161
  # reason could be specified in invalid_reason or it could also be due to
162
162
  # a user failing to solve a challenge or a sitekey mismatch (i.e the sitekey
163
163
  # used to generate the token was different than the one specified in the
164
164
  # assessment).
165
165
  # @!attribute [rw] invalid_reason
166
- # @return [Google::Cloud::RecaptchaEnterprise::V1::TokenProperties::InvalidReason]
166
+ # @return [::Google::Cloud::RecaptchaEnterprise::V1::TokenProperties::InvalidReason]
167
167
  # Reason associated with the response when valid = false.
168
168
  # @!attribute [rw] create_time
169
- # @return [Google::Protobuf::Timestamp]
169
+ # @return [::Google::Protobuf::Timestamp]
170
170
  # The timestamp corresponding to the generation of the token.
171
171
  # @!attribute [rw] hostname
172
- # @return [String]
172
+ # @return [::String]
173
173
  # The hostname of the page on which the token was generated.
174
174
  # @!attribute [rw] action
175
- # @return [String]
175
+ # @return [::String]
176
176
  # Action name provided at token generation.
177
177
  class TokenProperties
178
- include Google::Protobuf::MessageExts
179
- extend Google::Protobuf::MessageExts::ClassMethods
178
+ include ::Google::Protobuf::MessageExts
179
+ extend ::Google::Protobuf::MessageExts::ClassMethods
180
180
 
181
181
  # LINT.IfChange
182
182
  # Enum that represents the types of invalid token reasons.
@@ -203,144 +203,144 @@ module Google
203
203
 
204
204
  # The create key request message.
205
205
  # @!attribute [rw] parent
206
- # @return [String]
206
+ # @return [::String]
207
207
  # Required. The name of the project in which the key will be created, in the
208
208
  # format "projects/\\{project}".
209
209
  # @!attribute [rw] key
210
- # @return [Google::Cloud::RecaptchaEnterprise::V1::Key]
210
+ # @return [::Google::Cloud::RecaptchaEnterprise::V1::Key]
211
211
  # Required. Information to create a reCAPTCHA Enterprise key.
212
212
  class CreateKeyRequest
213
- include Google::Protobuf::MessageExts
214
- extend Google::Protobuf::MessageExts::ClassMethods
213
+ include ::Google::Protobuf::MessageExts
214
+ extend ::Google::Protobuf::MessageExts::ClassMethods
215
215
  end
216
216
 
217
217
  # The list keys request message.
218
218
  # @!attribute [rw] parent
219
- # @return [String]
219
+ # @return [::String]
220
220
  # Required. The name of the project that contains the keys that will be
221
221
  # listed, in the format "projects/\\{project}".
222
222
  # @!attribute [rw] page_size
223
- # @return [Integer]
223
+ # @return [::Integer]
224
224
  # Optional. The maximum number of keys to return. Default is 10. Max limit is
225
225
  # 1000.
226
226
  # @!attribute [rw] page_token
227
- # @return [String]
227
+ # @return [::String]
228
228
  # Optional. The next_page_token value returned from a previous.
229
229
  # ListKeysRequest, if any.
230
230
  class ListKeysRequest
231
- include Google::Protobuf::MessageExts
232
- extend Google::Protobuf::MessageExts::ClassMethods
231
+ include ::Google::Protobuf::MessageExts
232
+ extend ::Google::Protobuf::MessageExts::ClassMethods
233
233
  end
234
234
 
235
235
  # Response to request to list keys in a project.
236
236
  # @!attribute [rw] keys
237
- # @return [Array<Google::Cloud::RecaptchaEnterprise::V1::Key>]
237
+ # @return [::Array<::Google::Cloud::RecaptchaEnterprise::V1::Key>]
238
238
  # Key details.
239
239
  # @!attribute [rw] next_page_token
240
- # @return [String]
240
+ # @return [::String]
241
241
  # Token to retrieve the next page of results. It is set to empty if no keys
242
242
  # remain in results.
243
243
  class ListKeysResponse
244
- include Google::Protobuf::MessageExts
245
- extend Google::Protobuf::MessageExts::ClassMethods
244
+ include ::Google::Protobuf::MessageExts
245
+ extend ::Google::Protobuf::MessageExts::ClassMethods
246
246
  end
247
247
 
248
248
  # The get key request message.
249
249
  # @!attribute [rw] name
250
- # @return [String]
250
+ # @return [::String]
251
251
  # Required. The name of the requested key, in the format
252
252
  # "projects/\\{project}/keys/\\{key}".
253
253
  class GetKeyRequest
254
- include Google::Protobuf::MessageExts
255
- extend Google::Protobuf::MessageExts::ClassMethods
254
+ include ::Google::Protobuf::MessageExts
255
+ extend ::Google::Protobuf::MessageExts::ClassMethods
256
256
  end
257
257
 
258
258
  # The update key request message.
259
259
  # @!attribute [rw] key
260
- # @return [Google::Cloud::RecaptchaEnterprise::V1::Key]
260
+ # @return [::Google::Cloud::RecaptchaEnterprise::V1::Key]
261
261
  # Required. The key to update.
262
262
  # @!attribute [rw] update_mask
263
- # @return [Google::Protobuf::FieldMask]
263
+ # @return [::Google::Protobuf::FieldMask]
264
264
  # Optional. The mask to control which field of the key get updated. If the mask is not
265
265
  # present, all fields will be updated.
266
266
  class UpdateKeyRequest
267
- include Google::Protobuf::MessageExts
268
- extend Google::Protobuf::MessageExts::ClassMethods
267
+ include ::Google::Protobuf::MessageExts
268
+ extend ::Google::Protobuf::MessageExts::ClassMethods
269
269
  end
270
270
 
271
271
  # The delete key request message.
272
272
  # @!attribute [rw] name
273
- # @return [String]
273
+ # @return [::String]
274
274
  # Required. The name of the key to be deleted, in the format
275
275
  # "projects/\\{project}/keys/\\{key}".
276
276
  class DeleteKeyRequest
277
- include Google::Protobuf::MessageExts
278
- extend Google::Protobuf::MessageExts::ClassMethods
277
+ include ::Google::Protobuf::MessageExts
278
+ extend ::Google::Protobuf::MessageExts::ClassMethods
279
279
  end
280
280
 
281
281
  # A key used to identify and configure applications (web and/or mobile) that
282
282
  # use reCAPTCHA Enterprise.
283
283
  # @!attribute [rw] name
284
- # @return [String]
284
+ # @return [::String]
285
285
  # The resource name for the Key in the format
286
286
  # "projects/\\{project}/keys/\\{key}".
287
287
  # @!attribute [rw] display_name
288
- # @return [String]
288
+ # @return [::String]
289
289
  # Human-readable display name of this key. Modifiable by user.
290
290
  # @!attribute [rw] web_settings
291
- # @return [Google::Cloud::RecaptchaEnterprise::V1::WebKeySettings]
291
+ # @return [::Google::Cloud::RecaptchaEnterprise::V1::WebKeySettings]
292
292
  # Settings for keys that can be used by websites.
293
293
  # @!attribute [rw] android_settings
294
- # @return [Google::Cloud::RecaptchaEnterprise::V1::AndroidKeySettings]
294
+ # @return [::Google::Cloud::RecaptchaEnterprise::V1::AndroidKeySettings]
295
295
  # Settings for keys that can be used by Android apps.
296
296
  # @!attribute [rw] ios_settings
297
- # @return [Google::Cloud::RecaptchaEnterprise::V1::IOSKeySettings]
297
+ # @return [::Google::Cloud::RecaptchaEnterprise::V1::IOSKeySettings]
298
298
  # Settings for keys that can be used by iOS apps.
299
299
  # @!attribute [rw] labels
300
- # @return [Google::Protobuf::Map{String => String}]
300
+ # @return [::Google::Protobuf::Map{::String => ::String}]
301
301
  # Optional. See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels">
302
302
  # Creating and managing labels</a>.
303
303
  # @!attribute [rw] create_time
304
- # @return [Google::Protobuf::Timestamp]
304
+ # @return [::Google::Protobuf::Timestamp]
305
305
  # The timestamp corresponding to the creation of this Key.
306
306
  class Key
307
- include Google::Protobuf::MessageExts
308
- extend Google::Protobuf::MessageExts::ClassMethods
307
+ include ::Google::Protobuf::MessageExts
308
+ extend ::Google::Protobuf::MessageExts::ClassMethods
309
309
 
310
310
  # @!attribute [rw] key
311
- # @return [String]
311
+ # @return [::String]
312
312
  # @!attribute [rw] value
313
- # @return [String]
313
+ # @return [::String]
314
314
  class LabelsEntry
315
- include Google::Protobuf::MessageExts
316
- extend Google::Protobuf::MessageExts::ClassMethods
315
+ include ::Google::Protobuf::MessageExts
316
+ extend ::Google::Protobuf::MessageExts::ClassMethods
317
317
  end
318
318
  end
319
319
 
320
320
  # Settings specific to keys that can be used by websites.
321
321
  # @!attribute [rw] allow_all_domains
322
- # @return [Boolean]
322
+ # @return [::Boolean]
323
323
  # If set to true, it means allowed_domains will not be enforced.
324
324
  # @!attribute [rw] allowed_domains
325
- # @return [Array<String>]
325
+ # @return [::Array<::String>]
326
326
  # Domains or subdomains of websites allowed to use the key. All subdomains
327
327
  # of an allowed domain are automatically allowed. A valid domain requires a
328
328
  # host and must not include any path, port, query or fragment.
329
329
  # Examples: 'example.com' or 'subdomain.example.com'
330
330
  # @!attribute [rw] allow_amp_traffic
331
- # @return [Boolean]
331
+ # @return [::Boolean]
332
332
  # Required. Whether this key can be used on AMP (Accelerated Mobile Pages) websites.
333
333
  # @!attribute [rw] integration_type
334
- # @return [Google::Cloud::RecaptchaEnterprise::V1::WebKeySettings::IntegrationType]
334
+ # @return [::Google::Cloud::RecaptchaEnterprise::V1::WebKeySettings::IntegrationType]
335
335
  # Required. Describes how this key is integrated with the website.
336
336
  # @!attribute [rw] challenge_security_preference
337
- # @return [Google::Cloud::RecaptchaEnterprise::V1::WebKeySettings::ChallengeSecurityPreference]
337
+ # @return [::Google::Cloud::RecaptchaEnterprise::V1::WebKeySettings::ChallengeSecurityPreference]
338
338
  # Settings for the frequency and difficulty at which this key triggers
339
339
  # captcha challenges. This should only be specified for IntegrationTypes
340
340
  # CHECKBOX and INVISIBLE.
341
341
  class WebKeySettings
342
- include Google::Protobuf::MessageExts
343
- extend Google::Protobuf::MessageExts::ClassMethods
342
+ include ::Google::Protobuf::MessageExts
343
+ extend ::Google::Protobuf::MessageExts::ClassMethods
344
344
 
345
345
  # Enum that represents the integration types for web keys.
346
346
  module IntegrationType
@@ -381,22 +381,22 @@ module Google
381
381
 
382
382
  # Settings specific to keys that can be used by Android apps.
383
383
  # @!attribute [rw] allowed_package_names
384
- # @return [Array<String>]
384
+ # @return [::Array<::String>]
385
385
  # Android package names of apps allowed to use the key.
386
386
  # Example: 'com.companyname.appname'
387
387
  class AndroidKeySettings
388
- include Google::Protobuf::MessageExts
389
- extend Google::Protobuf::MessageExts::ClassMethods
388
+ include ::Google::Protobuf::MessageExts
389
+ extend ::Google::Protobuf::MessageExts::ClassMethods
390
390
  end
391
391
 
392
392
  # Settings specific to keys that can be used by iOS apps.
393
393
  # @!attribute [rw] allowed_bundle_ids
394
- # @return [Array<String>]
394
+ # @return [::Array<::String>]
395
395
  # iOS bundle ids of apps allowed to use the key.
396
396
  # Example: 'com.companyname.productname.appname'
397
397
  class IOSKeySettings
398
- include Google::Protobuf::MessageExts
399
- extend Google::Protobuf::MessageExts::ClassMethods
398
+ include ::Google::Protobuf::MessageExts
399
+ extend ::Google::Protobuf::MessageExts::ClassMethods
400
400
  end
401
401
  end
402
402
  end