google-cloud-recaptcha_enterprise-v1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +203 -0
- data/README.md +71 -0
- data/lib/google-cloud-recaptcha_enterprise-v1.rb +21 -0
- data/lib/google/cloud/common_resources_pb.rb +15 -0
- data/lib/google/cloud/recaptcha_enterprise/v1.rb +35 -0
- data/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service.rb +49 -0
- data/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/client.rb +839 -0
- data/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/credentials.rb +51 -0
- data/lib/google/cloud/recaptcha_enterprise/v1/recaptcha_enterprise_service/paths.rb +81 -0
- data/lib/google/cloud/recaptcha_enterprise/v1/version.rb +28 -0
- data/lib/google/cloud/recaptchaenterprise/v1/recaptchaenterprise_pb.rb +163 -0
- data/lib/google/cloud/recaptchaenterprise/v1/recaptchaenterprise_services_pb.rb +58 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +59 -0
- data/proto_docs/google/api/resource.rb +247 -0
- data/proto_docs/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.rb +404 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +120 -0
- metadata +176 -0
@@ -0,0 +1,247 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Api
|
22
|
+
# A simple descriptor of a resource type.
|
23
|
+
#
|
24
|
+
# ResourceDescriptor annotates a resource message (either by means of a
|
25
|
+
# protobuf annotation or use in the service config), and associates the
|
26
|
+
# resource's schema, the resource type, and the pattern of the resource name.
|
27
|
+
#
|
28
|
+
# Example:
|
29
|
+
#
|
30
|
+
# message Topic {
|
31
|
+
# // Indicates this message defines a resource schema.
|
32
|
+
# // Declares the resource type in the format of {service}/{kind}.
|
33
|
+
# // For Kubernetes resources, the format is {api group}/{kind}.
|
34
|
+
# option (google.api.resource) = {
|
35
|
+
# type: "pubsub.googleapis.com/Topic"
|
36
|
+
# name_descriptor: {
|
37
|
+
# pattern: "projects/{project}/topics/{topic}"
|
38
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
39
|
+
# parent_name_extractor: "projects/{project}"
|
40
|
+
# }
|
41
|
+
# };
|
42
|
+
# }
|
43
|
+
#
|
44
|
+
# The ResourceDescriptor Yaml config will look like:
|
45
|
+
#
|
46
|
+
# resources:
|
47
|
+
# - type: "pubsub.googleapis.com/Topic"
|
48
|
+
# name_descriptor:
|
49
|
+
# - pattern: "projects/\\{project}/topics/\\{topic}"
|
50
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
51
|
+
# parent_name_extractor: "projects/\\{project}"
|
52
|
+
#
|
53
|
+
# Sometimes, resources have multiple patterns, typically because they can
|
54
|
+
# live under multiple parents.
|
55
|
+
#
|
56
|
+
# Example:
|
57
|
+
#
|
58
|
+
# message LogEntry {
|
59
|
+
# option (google.api.resource) = {
|
60
|
+
# type: "logging.googleapis.com/LogEntry"
|
61
|
+
# name_descriptor: {
|
62
|
+
# pattern: "projects/{project}/logs/{log}"
|
63
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
64
|
+
# parent_name_extractor: "projects/{project}"
|
65
|
+
# }
|
66
|
+
# name_descriptor: {
|
67
|
+
# pattern: "folders/{folder}/logs/{log}"
|
68
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
69
|
+
# parent_name_extractor: "folders/{folder}"
|
70
|
+
# }
|
71
|
+
# name_descriptor: {
|
72
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
73
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
74
|
+
# parent_name_extractor: "organizations/{organization}"
|
75
|
+
# }
|
76
|
+
# name_descriptor: {
|
77
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
78
|
+
# parent_type: "billing.googleapis.com/BillingAccount"
|
79
|
+
# parent_name_extractor: "billingAccounts/{billing_account}"
|
80
|
+
# }
|
81
|
+
# };
|
82
|
+
# }
|
83
|
+
#
|
84
|
+
# The ResourceDescriptor Yaml config will look like:
|
85
|
+
#
|
86
|
+
# resources:
|
87
|
+
# - type: 'logging.googleapis.com/LogEntry'
|
88
|
+
# name_descriptor:
|
89
|
+
# - pattern: "projects/{project}/logs/{log}"
|
90
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
91
|
+
# parent_name_extractor: "projects/{project}"
|
92
|
+
# - pattern: "folders/{folder}/logs/{log}"
|
93
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
94
|
+
# parent_name_extractor: "folders/{folder}"
|
95
|
+
# - pattern: "organizations/{organization}/logs/{log}"
|
96
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
97
|
+
# parent_name_extractor: "organizations/{organization}"
|
98
|
+
# - pattern: "billingAccounts/{billing_account}/logs/{log}"
|
99
|
+
# parent_type: "billing.googleapis.com/BillingAccount"
|
100
|
+
# parent_name_extractor: "billingAccounts/{billing_account}"
|
101
|
+
#
|
102
|
+
# For flexible resources, the resource name doesn't contain parent names, but
|
103
|
+
# the resource itself has parents for policy evaluation.
|
104
|
+
#
|
105
|
+
# Example:
|
106
|
+
#
|
107
|
+
# message Shelf {
|
108
|
+
# option (google.api.resource) = {
|
109
|
+
# type: "library.googleapis.com/Shelf"
|
110
|
+
# name_descriptor: {
|
111
|
+
# pattern: "shelves/{shelf}"
|
112
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
113
|
+
# }
|
114
|
+
# name_descriptor: {
|
115
|
+
# pattern: "shelves/{shelf}"
|
116
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
117
|
+
# }
|
118
|
+
# };
|
119
|
+
# }
|
120
|
+
#
|
121
|
+
# The ResourceDescriptor Yaml config will look like:
|
122
|
+
#
|
123
|
+
# resources:
|
124
|
+
# - type: 'library.googleapis.com/Shelf'
|
125
|
+
# name_descriptor:
|
126
|
+
# - pattern: "shelves/{shelf}"
|
127
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
128
|
+
# - pattern: "shelves/{shelf}"
|
129
|
+
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
130
|
+
# @!attribute [rw] type
|
131
|
+
# @return [String]
|
132
|
+
# The resource type. It must be in the format of
|
133
|
+
# \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be
|
134
|
+
# singular and must not include version numbers.
|
135
|
+
#
|
136
|
+
# Example: `storage.googleapis.com/Bucket`
|
137
|
+
#
|
138
|
+
# The value of the resource_type_kind must follow the regular expression
|
139
|
+
# /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
|
140
|
+
# should use PascalCase (UpperCamelCase). The maximum number of
|
141
|
+
# characters allowed for the `resource_type_kind` is 100.
|
142
|
+
# @!attribute [rw] pattern
|
143
|
+
# @return [Array<String>]
|
144
|
+
# Optional. The relative resource name pattern associated with this resource
|
145
|
+
# type. The DNS prefix of the full resource name shouldn't be specified here.
|
146
|
+
#
|
147
|
+
# The path pattern must follow the syntax, which aligns with HTTP binding
|
148
|
+
# syntax:
|
149
|
+
#
|
150
|
+
# Template = Segment { "/" Segment } ;
|
151
|
+
# Segment = LITERAL | Variable ;
|
152
|
+
# Variable = "{" LITERAL "}" ;
|
153
|
+
#
|
154
|
+
# Examples:
|
155
|
+
#
|
156
|
+
# - "projects/\\{project}/topics/\\{topic}"
|
157
|
+
# - "projects/\\{project}/knowledgeBases/\\{knowledge_base}"
|
158
|
+
#
|
159
|
+
# The components in braces correspond to the IDs for each resource in the
|
160
|
+
# hierarchy. It is expected that, if multiple patterns are provided,
|
161
|
+
# the same component name (e.g. "project") refers to IDs of the same
|
162
|
+
# type of resource.
|
163
|
+
# @!attribute [rw] name_field
|
164
|
+
# @return [String]
|
165
|
+
# Optional. The field on the resource that designates the resource name
|
166
|
+
# field. If omitted, this is assumed to be "name".
|
167
|
+
# @!attribute [rw] history
|
168
|
+
# @return [Google::Api::ResourceDescriptor::History]
|
169
|
+
# Optional. The historical or future-looking state of the resource pattern.
|
170
|
+
#
|
171
|
+
# Example:
|
172
|
+
#
|
173
|
+
# // The InspectTemplate message originally only supported resource
|
174
|
+
# // names with organization, and project was added later.
|
175
|
+
# message InspectTemplate {
|
176
|
+
# option (google.api.resource) = {
|
177
|
+
# type: "dlp.googleapis.com/InspectTemplate"
|
178
|
+
# pattern:
|
179
|
+
# "organizations/{organization}/inspectTemplates/{inspect_template}"
|
180
|
+
# pattern: "projects/{project}/inspectTemplates/{inspect_template}"
|
181
|
+
# history: ORIGINALLY_SINGLE_PATTERN
|
182
|
+
# };
|
183
|
+
# }
|
184
|
+
# @!attribute [rw] plural
|
185
|
+
# @return [String]
|
186
|
+
# The plural name used in the resource name, such as 'projects' for
|
187
|
+
# the name of 'projects/\\{project}'. It is the same concept of the `plural`
|
188
|
+
# field in k8s CRD spec
|
189
|
+
# https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
|
190
|
+
# @!attribute [rw] singular
|
191
|
+
# @return [String]
|
192
|
+
# The same concept of the `singular` field in k8s CRD spec
|
193
|
+
# https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
|
194
|
+
# Such as "project" for the `resourcemanager.googleapis.com/Project` type.
|
195
|
+
class ResourceDescriptor
|
196
|
+
include Google::Protobuf::MessageExts
|
197
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
198
|
+
|
199
|
+
# A description of the historical or future-looking state of the
|
200
|
+
# resource pattern.
|
201
|
+
module History
|
202
|
+
# The "unset" value.
|
203
|
+
HISTORY_UNSPECIFIED = 0
|
204
|
+
|
205
|
+
# The resource originally had one pattern and launched as such, and
|
206
|
+
# additional patterns were added later.
|
207
|
+
ORIGINALLY_SINGLE_PATTERN = 1
|
208
|
+
|
209
|
+
# The resource has one pattern, but the API owner expects to add more
|
210
|
+
# later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents
|
211
|
+
# that from being necessary once there are multiple patterns.)
|
212
|
+
FUTURE_MULTI_PATTERN = 2
|
213
|
+
end
|
214
|
+
end
|
215
|
+
|
216
|
+
# Defines a proto annotation that describes a string field that refers to
|
217
|
+
# an API resource.
|
218
|
+
# @!attribute [rw] type
|
219
|
+
# @return [String]
|
220
|
+
# The resource type that the annotated field references.
|
221
|
+
#
|
222
|
+
# Example:
|
223
|
+
#
|
224
|
+
# message Subscription {
|
225
|
+
# string topic = 2 [(google.api.resource_reference) = {
|
226
|
+
# type: "pubsub.googleapis.com/Topic"
|
227
|
+
# }];
|
228
|
+
# }
|
229
|
+
# @!attribute [rw] child_type
|
230
|
+
# @return [String]
|
231
|
+
# The resource type of a child collection that the annotated field
|
232
|
+
# references. This is useful for annotating the `parent` field that
|
233
|
+
# doesn't have a fixed resource type.
|
234
|
+
#
|
235
|
+
# Example:
|
236
|
+
#
|
237
|
+
# message ListLogEntriesRequest {
|
238
|
+
# string parent = 1 [(google.api.resource_reference) = {
|
239
|
+
# child_type: "logging.googleapis.com/LogEntry"
|
240
|
+
# };
|
241
|
+
# }
|
242
|
+
class ResourceReference
|
243
|
+
include Google::Protobuf::MessageExts
|
244
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
245
|
+
end
|
246
|
+
end
|
247
|
+
end
|
@@ -0,0 +1,404 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module RecaptchaEnterprise
|
23
|
+
module V1
|
24
|
+
# The create assessment request message.
|
25
|
+
# @!attribute [rw] parent
|
26
|
+
# @return [String]
|
27
|
+
# Required. The name of the project in which the assessment will be created,
|
28
|
+
# in the format "projects/\\{project}".
|
29
|
+
# @!attribute [rw] assessment
|
30
|
+
# @return [Google::Cloud::RecaptchaEnterprise::V1::Assessment]
|
31
|
+
# Required. The assessment details.
|
32
|
+
class CreateAssessmentRequest
|
33
|
+
include Google::Protobuf::MessageExts
|
34
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
35
|
+
end
|
36
|
+
|
37
|
+
# The request message to annotate an Assessment.
|
38
|
+
# @!attribute [rw] name
|
39
|
+
# @return [String]
|
40
|
+
# Required. The resource name of the Assessment, in the format
|
41
|
+
# "projects/\\{project}/assessments/\\{assessment}".
|
42
|
+
# @!attribute [rw] annotation
|
43
|
+
# @return [Google::Cloud::RecaptchaEnterprise::V1::AnnotateAssessmentRequest::Annotation]
|
44
|
+
# Required. The annotation that will be assigned to the Event.
|
45
|
+
class AnnotateAssessmentRequest
|
46
|
+
include Google::Protobuf::MessageExts
|
47
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
48
|
+
|
49
|
+
# Enum that reprensents the types of annotations.
|
50
|
+
module Annotation
|
51
|
+
# Default unspecified type.
|
52
|
+
ANNOTATION_UNSPECIFIED = 0
|
53
|
+
|
54
|
+
# Provides information that the event turned out to be legitimate.
|
55
|
+
LEGITIMATE = 1
|
56
|
+
|
57
|
+
# Provides information that the event turned out to be fraudulent.
|
58
|
+
FRAUDULENT = 2
|
59
|
+
|
60
|
+
# Provides information that the event was related to a login event in which
|
61
|
+
# the user typed the correct password.
|
62
|
+
PASSWORD_CORRECT = 3
|
63
|
+
|
64
|
+
# Provides information that the event was related to a login event in which
|
65
|
+
# the user typed the incorrect password.
|
66
|
+
PASSWORD_INCORRECT = 4
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
# Empty response for AnnotateAssessment.
|
71
|
+
class AnnotateAssessmentResponse
|
72
|
+
include Google::Protobuf::MessageExts
|
73
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
74
|
+
end
|
75
|
+
|
76
|
+
# A recaptcha assessment resource.
|
77
|
+
# @!attribute [r] name
|
78
|
+
# @return [String]
|
79
|
+
# Output only. The resource name for the Assessment in the format
|
80
|
+
# "projects/\\{project}/assessments/\\{assessment}".
|
81
|
+
# @!attribute [rw] event
|
82
|
+
# @return [Google::Cloud::RecaptchaEnterprise::V1::Event]
|
83
|
+
# The event being assessed.
|
84
|
+
# @!attribute [r] risk_analysis
|
85
|
+
# @return [Google::Cloud::RecaptchaEnterprise::V1::RiskAnalysis]
|
86
|
+
# Output only. The risk analysis result for the event being assessed.
|
87
|
+
# @!attribute [r] token_properties
|
88
|
+
# @return [Google::Cloud::RecaptchaEnterprise::V1::TokenProperties]
|
89
|
+
# Output only. Properties of the provided event token.
|
90
|
+
class Assessment
|
91
|
+
include Google::Protobuf::MessageExts
|
92
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
93
|
+
end
|
94
|
+
|
95
|
+
# @!attribute [rw] token
|
96
|
+
# @return [String]
|
97
|
+
# Optional. The user response token provided by the reCAPTCHA client-side integration
|
98
|
+
# on your site.
|
99
|
+
# @!attribute [rw] site_key
|
100
|
+
# @return [String]
|
101
|
+
# Optional. The site key that was used to invoke reCAPTCHA on your site and generate
|
102
|
+
# the token.
|
103
|
+
# @!attribute [rw] user_agent
|
104
|
+
# @return [String]
|
105
|
+
# Optional. The user agent present in the request from the user's device related to
|
106
|
+
# this event.
|
107
|
+
# @!attribute [rw] user_ip_address
|
108
|
+
# @return [String]
|
109
|
+
# Optional. The IP address in the request from the user's device related to this event.
|
110
|
+
# @!attribute [rw] expected_action
|
111
|
+
# @return [String]
|
112
|
+
# Optional. The expected action for this type of event. This should be the same action
|
113
|
+
# provided at token generation time on client-side platforms already
|
114
|
+
# integrated with recaptcha enterprise.
|
115
|
+
class Event
|
116
|
+
include Google::Protobuf::MessageExts
|
117
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
118
|
+
end
|
119
|
+
|
120
|
+
# Risk analysis result for an event.
|
121
|
+
# @!attribute [rw] score
|
122
|
+
# @return [Float]
|
123
|
+
# Legitimate event score from 0.0 to 1.0.
|
124
|
+
# (1.0 means very likely legitimate traffic while 0.0 means very likely
|
125
|
+
# non-legitimate traffic).
|
126
|
+
# @!attribute [rw] reasons
|
127
|
+
# @return [Array<Google::Cloud::RecaptchaEnterprise::V1::RiskAnalysis::ClassificationReason>]
|
128
|
+
# Reasons contributing to the risk analysis verdict.
|
129
|
+
class RiskAnalysis
|
130
|
+
include Google::Protobuf::MessageExts
|
131
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
132
|
+
|
133
|
+
# LINT.IfChange(classification_reason)
|
134
|
+
# Reasons contributing to the risk analysis verdict.
|
135
|
+
module ClassificationReason
|
136
|
+
# Default unspecified type.
|
137
|
+
CLASSIFICATION_REASON_UNSPECIFIED = 0
|
138
|
+
|
139
|
+
# Interactions matched the behavior of an automated agent.
|
140
|
+
AUTOMATION = 1
|
141
|
+
|
142
|
+
# The event originated from an illegitimate environment.
|
143
|
+
UNEXPECTED_ENVIRONMENT = 2
|
144
|
+
|
145
|
+
# Traffic volume from the event source is higher than normal.
|
146
|
+
TOO_MUCH_TRAFFIC = 3
|
147
|
+
|
148
|
+
# Interactions with the site were significantly different than expected
|
149
|
+
# patterns.
|
150
|
+
UNEXPECTED_USAGE_PATTERNS = 4
|
151
|
+
|
152
|
+
# Too little traffic has been received from this site thus far to generate
|
153
|
+
# quality risk analysis.
|
154
|
+
LOW_CONFIDENCE_SCORE = 5
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
# @!attribute [rw] valid
|
159
|
+
# @return [Boolean]
|
160
|
+
# Whether the provided user response token is valid. When valid = false, the
|
161
|
+
# reason could be specified in invalid_reason or it could also be due to
|
162
|
+
# a user failing to solve a challenge or a sitekey mismatch (i.e the sitekey
|
163
|
+
# used to generate the token was different than the one specified in the
|
164
|
+
# assessment).
|
165
|
+
# @!attribute [rw] invalid_reason
|
166
|
+
# @return [Google::Cloud::RecaptchaEnterprise::V1::TokenProperties::InvalidReason]
|
167
|
+
# Reason associated with the response when valid = false.
|
168
|
+
# @!attribute [rw] create_time
|
169
|
+
# @return [Google::Protobuf::Timestamp]
|
170
|
+
# The timestamp corresponding to the generation of the token.
|
171
|
+
# @!attribute [rw] hostname
|
172
|
+
# @return [String]
|
173
|
+
# The hostname of the page on which the token was generated.
|
174
|
+
# @!attribute [rw] action
|
175
|
+
# @return [String]
|
176
|
+
# Action name provided at token generation.
|
177
|
+
class TokenProperties
|
178
|
+
include Google::Protobuf::MessageExts
|
179
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
180
|
+
|
181
|
+
# LINT.IfChange
|
182
|
+
# Enum that represents the types of invalid token reasons.
|
183
|
+
module InvalidReason
|
184
|
+
# Default unspecified type.
|
185
|
+
INVALID_REASON_UNSPECIFIED = 0
|
186
|
+
|
187
|
+
# If the failure reason was not accounted for.
|
188
|
+
UNKNOWN_INVALID_REASON = 1
|
189
|
+
|
190
|
+
# The provided user verification token was malformed.
|
191
|
+
MALFORMED = 2
|
192
|
+
|
193
|
+
# The user verification token had expired.
|
194
|
+
EXPIRED = 3
|
195
|
+
|
196
|
+
# The user verification had already been seen.
|
197
|
+
DUPE = 4
|
198
|
+
|
199
|
+
# The user verification token was not present.
|
200
|
+
MISSING = 5
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
204
|
+
# The create key request message.
|
205
|
+
# @!attribute [rw] parent
|
206
|
+
# @return [String]
|
207
|
+
# Required. The name of the project in which the key will be created, in the
|
208
|
+
# format "projects/\\{project}".
|
209
|
+
# @!attribute [rw] key
|
210
|
+
# @return [Google::Cloud::RecaptchaEnterprise::V1::Key]
|
211
|
+
# Required. Information to create a reCAPTCHA Enterprise key.
|
212
|
+
class CreateKeyRequest
|
213
|
+
include Google::Protobuf::MessageExts
|
214
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
215
|
+
end
|
216
|
+
|
217
|
+
# The list keys request message.
|
218
|
+
# @!attribute [rw] parent
|
219
|
+
# @return [String]
|
220
|
+
# Required. The name of the project that contains the keys that will be
|
221
|
+
# listed, in the format "projects/\\{project}".
|
222
|
+
# @!attribute [rw] page_size
|
223
|
+
# @return [Integer]
|
224
|
+
# Optional. The maximum number of keys to return. Default is 10. Max limit is
|
225
|
+
# 1000.
|
226
|
+
# @!attribute [rw] page_token
|
227
|
+
# @return [String]
|
228
|
+
# Optional. The next_page_token value returned from a previous.
|
229
|
+
# ListKeysRequest, if any.
|
230
|
+
class ListKeysRequest
|
231
|
+
include Google::Protobuf::MessageExts
|
232
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
233
|
+
end
|
234
|
+
|
235
|
+
# Response to request to list keys in a project.
|
236
|
+
# @!attribute [rw] keys
|
237
|
+
# @return [Array<Google::Cloud::RecaptchaEnterprise::V1::Key>]
|
238
|
+
# Key details.
|
239
|
+
# @!attribute [rw] next_page_token
|
240
|
+
# @return [String]
|
241
|
+
# Token to retrieve the next page of results. It is set to empty if no keys
|
242
|
+
# remain in results.
|
243
|
+
class ListKeysResponse
|
244
|
+
include Google::Protobuf::MessageExts
|
245
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
246
|
+
end
|
247
|
+
|
248
|
+
# The get key request message.
|
249
|
+
# @!attribute [rw] name
|
250
|
+
# @return [String]
|
251
|
+
# Required. The name of the requested key, in the format
|
252
|
+
# "projects/\\{project}/keys/\\{key}".
|
253
|
+
class GetKeyRequest
|
254
|
+
include Google::Protobuf::MessageExts
|
255
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
256
|
+
end
|
257
|
+
|
258
|
+
# The update key request message.
|
259
|
+
# @!attribute [rw] key
|
260
|
+
# @return [Google::Cloud::RecaptchaEnterprise::V1::Key]
|
261
|
+
# Required. The key to update.
|
262
|
+
# @!attribute [rw] update_mask
|
263
|
+
# @return [Google::Protobuf::FieldMask]
|
264
|
+
# Optional. The mask to control which field of the key get updated. If the mask is not
|
265
|
+
# present, all fields will be updated.
|
266
|
+
class UpdateKeyRequest
|
267
|
+
include Google::Protobuf::MessageExts
|
268
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
269
|
+
end
|
270
|
+
|
271
|
+
# The delete key request message.
|
272
|
+
# @!attribute [rw] name
|
273
|
+
# @return [String]
|
274
|
+
# Required. The name of the key to be deleted, in the format
|
275
|
+
# "projects/\\{project}/keys/\\{key}".
|
276
|
+
class DeleteKeyRequest
|
277
|
+
include Google::Protobuf::MessageExts
|
278
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
279
|
+
end
|
280
|
+
|
281
|
+
# A key used to identify and configure applications (web and/or mobile) that
|
282
|
+
# use reCAPTCHA Enterprise.
|
283
|
+
# @!attribute [rw] name
|
284
|
+
# @return [String]
|
285
|
+
# The resource name for the Key in the format
|
286
|
+
# "projects/\\{project}/keys/\\{key}".
|
287
|
+
# @!attribute [rw] display_name
|
288
|
+
# @return [String]
|
289
|
+
# Human-readable display name of this key. Modifiable by user.
|
290
|
+
# @!attribute [rw] web_settings
|
291
|
+
# @return [Google::Cloud::RecaptchaEnterprise::V1::WebKeySettings]
|
292
|
+
# Settings for keys that can be used by websites.
|
293
|
+
# @!attribute [rw] android_settings
|
294
|
+
# @return [Google::Cloud::RecaptchaEnterprise::V1::AndroidKeySettings]
|
295
|
+
# Settings for keys that can be used by Android apps.
|
296
|
+
# @!attribute [rw] ios_settings
|
297
|
+
# @return [Google::Cloud::RecaptchaEnterprise::V1::IOSKeySettings]
|
298
|
+
# Settings for keys that can be used by iOS apps.
|
299
|
+
# @!attribute [rw] labels
|
300
|
+
# @return [Google::Protobuf::Map{String => String}]
|
301
|
+
# Optional. See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels">
|
302
|
+
# Creating and managing labels</a>.
|
303
|
+
# @!attribute [rw] create_time
|
304
|
+
# @return [Google::Protobuf::Timestamp]
|
305
|
+
# The timestamp corresponding to the creation of this Key.
|
306
|
+
class Key
|
307
|
+
include Google::Protobuf::MessageExts
|
308
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
309
|
+
|
310
|
+
# @!attribute [rw] key
|
311
|
+
# @return [String]
|
312
|
+
# @!attribute [rw] value
|
313
|
+
# @return [String]
|
314
|
+
class LabelsEntry
|
315
|
+
include Google::Protobuf::MessageExts
|
316
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
317
|
+
end
|
318
|
+
end
|
319
|
+
|
320
|
+
# Settings specific to keys that can be used by websites.
|
321
|
+
# @!attribute [rw] allow_all_domains
|
322
|
+
# @return [Boolean]
|
323
|
+
# If set to true, it means allowed_domains will not be enforced.
|
324
|
+
# @!attribute [rw] allowed_domains
|
325
|
+
# @return [Array<String>]
|
326
|
+
# Domains or subdomains of websites allowed to use the key. All subdomains
|
327
|
+
# of an allowed domain are automatically allowed. A valid domain requires a
|
328
|
+
# host and must not include any path, port, query or fragment.
|
329
|
+
# Examples: 'example.com' or 'subdomain.example.com'
|
330
|
+
# @!attribute [rw] allow_amp_traffic
|
331
|
+
# @return [Boolean]
|
332
|
+
# Required. Whether this key can be used on AMP (Accelerated Mobile Pages) websites.
|
333
|
+
# @!attribute [rw] integration_type
|
334
|
+
# @return [Google::Cloud::RecaptchaEnterprise::V1::WebKeySettings::IntegrationType]
|
335
|
+
# Required. Describes how this key is integrated with the website.
|
336
|
+
# @!attribute [rw] challenge_security_preference
|
337
|
+
# @return [Google::Cloud::RecaptchaEnterprise::V1::WebKeySettings::ChallengeSecurityPreference]
|
338
|
+
# Settings for the frequency and difficulty at which this key triggers
|
339
|
+
# captcha challenges. This should only be specified for IntegrationTypes
|
340
|
+
# CHECKBOX and INVISIBLE.
|
341
|
+
class WebKeySettings
|
342
|
+
include Google::Protobuf::MessageExts
|
343
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
344
|
+
|
345
|
+
# Enum that represents the integration types for web keys.
|
346
|
+
module IntegrationType
|
347
|
+
# Default type that indicates this enum hasn't been specified. This is not
|
348
|
+
# a valid IntegrationType, one of the other types must be specified
|
349
|
+
# instead.
|
350
|
+
INTEGRATION_TYPE_UNSPECIFIED = 0
|
351
|
+
|
352
|
+
# Only used to produce scores. It doesn't display the "I'm not a robot"
|
353
|
+
# checkbox and never shows captcha challenges.
|
354
|
+
SCORE = 1
|
355
|
+
|
356
|
+
# Displays the "I'm not a robot" checkbox and may show captcha challenges
|
357
|
+
# after it is checked.
|
358
|
+
CHECKBOX = 2
|
359
|
+
|
360
|
+
# Doesn't display the "I'm not a robot" checkbox, but may show captcha
|
361
|
+
# challenges after risk analysis.
|
362
|
+
INVISIBLE = 3
|
363
|
+
end
|
364
|
+
|
365
|
+
# Enum that represents the possible challenge frequency and difficulty
|
366
|
+
# configurations for a web key.
|
367
|
+
module ChallengeSecurityPreference
|
368
|
+
# Default type that indicates this enum hasn't been specified.
|
369
|
+
CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED = 0
|
370
|
+
|
371
|
+
# Key tends to show fewer and easier challenges.
|
372
|
+
USABILITY = 1
|
373
|
+
|
374
|
+
# Key tends to show balanced (in amount and difficulty) challenges.
|
375
|
+
BALANCE = 2
|
376
|
+
|
377
|
+
# Key tends to show more and harder challenges.
|
378
|
+
SECURITY = 3
|
379
|
+
end
|
380
|
+
end
|
381
|
+
|
382
|
+
# Settings specific to keys that can be used by Android apps.
|
383
|
+
# @!attribute [rw] allowed_package_names
|
384
|
+
# @return [Array<String>]
|
385
|
+
# Android package names of apps allowed to use the key.
|
386
|
+
# Example: 'com.companyname.appname'
|
387
|
+
class AndroidKeySettings
|
388
|
+
include Google::Protobuf::MessageExts
|
389
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
390
|
+
end
|
391
|
+
|
392
|
+
# Settings specific to keys that can be used by iOS apps.
|
393
|
+
# @!attribute [rw] allowed_bundle_ids
|
394
|
+
# @return [Array<String>]
|
395
|
+
# iOS bundle ids of apps allowed to use the key.
|
396
|
+
# Example: 'com.companyname.productname.appname'
|
397
|
+
class IOSKeySettings
|
398
|
+
include Google::Protobuf::MessageExts
|
399
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
400
|
+
end
|
401
|
+
end
|
402
|
+
end
|
403
|
+
end
|
404
|
+
end
|