google-cloud-recaptcha_enterprise-v1beta1 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-v1beta1.rb +21 -0
- data/lib/google/cloud/recaptcha_enterprise/v1beta1.rb +35 -0
- data/lib/google/cloud/recaptcha_enterprise/v1beta1/recaptcha_enterprise_service.rb +49 -0
- data/lib/google/cloud/recaptcha_enterprise/v1beta1/recaptcha_enterprise_service/client.rb +839 -0
- data/lib/google/cloud/recaptcha_enterprise/v1beta1/recaptcha_enterprise_service/credentials.rb +51 -0
- data/lib/google/cloud/recaptcha_enterprise/v1beta1/recaptcha_enterprise_service/paths.rb +81 -0
- data/lib/google/cloud/recaptcha_enterprise/v1beta1/version.rb +28 -0
- data/lib/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise_pb.rb +156 -0
- data/lib/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise_services_pb.rb +59 -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/v1beta1/recaptchaenterprise.rb +373 -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 +175 -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,373 @@
|
|
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 V1beta1
|
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_number}".
|
29
|
+
# @!attribute [rw] assessment
|
30
|
+
# @return [Google::Cloud::RecaptchaEnterprise::V1beta1::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_number}/assessments/\\{assessment_id}".
|
42
|
+
# @!attribute [rw] annotation
|
43
|
+
# @return [Google::Cloud::RecaptchaEnterprise::V1beta1::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
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
# Empty response for AnnotateAssessment.
|
63
|
+
class AnnotateAssessmentResponse
|
64
|
+
include Google::Protobuf::MessageExts
|
65
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
66
|
+
end
|
67
|
+
|
68
|
+
# A recaptcha assessment resource.
|
69
|
+
# @!attribute [r] name
|
70
|
+
# @return [String]
|
71
|
+
# Output only. The resource name for the Assessment in the format
|
72
|
+
# "projects/\\{project_number}/assessments/\\{assessment_id}".
|
73
|
+
# @!attribute [rw] event
|
74
|
+
# @return [Google::Cloud::RecaptchaEnterprise::V1beta1::Event]
|
75
|
+
# The event being assessed.
|
76
|
+
# @!attribute [r] score
|
77
|
+
# @return [Float]
|
78
|
+
# Output only. Legitimate event score from 0.0 to 1.0.
|
79
|
+
# (1.0 means very likely legitimate traffic while 0.0 means very likely
|
80
|
+
# non-legitimate traffic).
|
81
|
+
# @!attribute [r] token_properties
|
82
|
+
# @return [Google::Cloud::RecaptchaEnterprise::V1beta1::TokenProperties]
|
83
|
+
# Output only. Properties of the provided event token.
|
84
|
+
# @!attribute [r] reasons
|
85
|
+
# @return [Array<Google::Cloud::RecaptchaEnterprise::V1beta1::Assessment::ClassificationReason>]
|
86
|
+
# Output only. Reasons contributing to the risk analysis verdict.
|
87
|
+
class Assessment
|
88
|
+
include Google::Protobuf::MessageExts
|
89
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
90
|
+
|
91
|
+
# LINT.IfChange(classification_reason)
|
92
|
+
# Reasons contributing to the risk analysis verdict.
|
93
|
+
module ClassificationReason
|
94
|
+
# Default unspecified type.
|
95
|
+
CLASSIFICATION_REASON_UNSPECIFIED = 0
|
96
|
+
|
97
|
+
# Interactions matched the behavior of an automated agent.
|
98
|
+
AUTOMATION = 1
|
99
|
+
|
100
|
+
# The event originated from an illegitimate environment.
|
101
|
+
UNEXPECTED_ENVIRONMENT = 2
|
102
|
+
|
103
|
+
# Traffic volume from the event source is higher than normal.
|
104
|
+
TOO_MUCH_TRAFFIC = 3
|
105
|
+
|
106
|
+
# Interactions with the site were significantly different than expected
|
107
|
+
# patterns.
|
108
|
+
UNEXPECTED_USAGE_PATTERNS = 4
|
109
|
+
|
110
|
+
# Too little traffic has been received from this site thus far to generate
|
111
|
+
# quality risk analysis.
|
112
|
+
LOW_CONFIDENCE_SCORE = 5
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
# @!attribute [rw] token
|
117
|
+
# @return [String]
|
118
|
+
# Optional. The user response token provided by the reCAPTCHA client-side integration
|
119
|
+
# on your site.
|
120
|
+
# @!attribute [rw] site_key
|
121
|
+
# @return [String]
|
122
|
+
# Optional. The site key that was used to invoke reCAPTCHA on your site and generate
|
123
|
+
# the token.
|
124
|
+
# @!attribute [rw] user_agent
|
125
|
+
# @return [String]
|
126
|
+
# Optional. The user agent present in the request from the user's device related to
|
127
|
+
# this event.
|
128
|
+
# @!attribute [rw] user_ip_address
|
129
|
+
# @return [String]
|
130
|
+
# Optional. The IP address in the request from the user's device related to this event.
|
131
|
+
# @!attribute [rw] expected_action
|
132
|
+
# @return [String]
|
133
|
+
# Optional. The expected action for this type of event. This should be the same action
|
134
|
+
# provided at token generation time on client-side platforms already
|
135
|
+
# integrated with recaptcha enterprise.
|
136
|
+
class Event
|
137
|
+
include Google::Protobuf::MessageExts
|
138
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
139
|
+
end
|
140
|
+
|
141
|
+
# @!attribute [rw] valid
|
142
|
+
# @return [Boolean]
|
143
|
+
# Whether the provided user response token is valid.
|
144
|
+
# @!attribute [rw] invalid_reason
|
145
|
+
# @return [Google::Cloud::RecaptchaEnterprise::V1beta1::TokenProperties::InvalidReason]
|
146
|
+
# Reason associated with the response when valid = false.
|
147
|
+
# @!attribute [rw] create_time
|
148
|
+
# @return [Google::Protobuf::Timestamp]
|
149
|
+
# The timestamp corresponding to the generation of the token.
|
150
|
+
# @!attribute [rw] hostname
|
151
|
+
# @return [String]
|
152
|
+
# The hostname of the page on which the token was generated.
|
153
|
+
# @!attribute [rw] action
|
154
|
+
# @return [String]
|
155
|
+
# Action name provided at token generation.
|
156
|
+
class TokenProperties
|
157
|
+
include Google::Protobuf::MessageExts
|
158
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
159
|
+
|
160
|
+
# LINT.IfChange
|
161
|
+
# Enum that represents the types of invalid token reasons.
|
162
|
+
module InvalidReason
|
163
|
+
# Default unspecified type.
|
164
|
+
INVALID_REASON_UNSPECIFIED = 0
|
165
|
+
|
166
|
+
# If the failure reason was not accounted for.
|
167
|
+
UNKNOWN_INVALID_REASON = 1
|
168
|
+
|
169
|
+
# The provided user verification token was malformed.
|
170
|
+
MALFORMED = 2
|
171
|
+
|
172
|
+
# The user verification token had expired.
|
173
|
+
EXPIRED = 3
|
174
|
+
|
175
|
+
# The user verification had already been seen.
|
176
|
+
DUPE = 4
|
177
|
+
|
178
|
+
# The user verification token did not match the provided site key.
|
179
|
+
# This may be a configuration error (e.g. development keys used in
|
180
|
+
# production) or end users trying to use verification tokens from other
|
181
|
+
# sites.
|
182
|
+
SITE_MISMATCH = 5
|
183
|
+
|
184
|
+
# The user verification token was not present. It is a required input.
|
185
|
+
MISSING = 6
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
# The create key request message.
|
190
|
+
# @!attribute [rw] parent
|
191
|
+
# @return [String]
|
192
|
+
# Required. The name of the project in which the key will be created, in the
|
193
|
+
# format "projects/\\{project_number}".
|
194
|
+
# @!attribute [rw] key
|
195
|
+
# @return [Google::Cloud::RecaptchaEnterprise::V1beta1::Key]
|
196
|
+
# Required. Information to create a reCAPTCHA Enterprise key.
|
197
|
+
class CreateKeyRequest
|
198
|
+
include Google::Protobuf::MessageExts
|
199
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
200
|
+
end
|
201
|
+
|
202
|
+
# The list keys request message.
|
203
|
+
# @!attribute [rw] parent
|
204
|
+
# @return [String]
|
205
|
+
# Required. The name of the project that contains the keys that will be
|
206
|
+
# listed, in the format "projects/\\{project_number}".
|
207
|
+
# @!attribute [rw] page_size
|
208
|
+
# @return [Integer]
|
209
|
+
# Optional. The maximum number of keys to return. Default is 10. Max limit is
|
210
|
+
# 1000.
|
211
|
+
# @!attribute [rw] page_token
|
212
|
+
# @return [String]
|
213
|
+
# Optional. The next_page_token value returned from a previous.
|
214
|
+
# ListKeysRequest, if any.
|
215
|
+
class ListKeysRequest
|
216
|
+
include Google::Protobuf::MessageExts
|
217
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
218
|
+
end
|
219
|
+
|
220
|
+
# Response to request to list keys in a project.
|
221
|
+
# @!attribute [rw] keys
|
222
|
+
# @return [Array<Google::Cloud::RecaptchaEnterprise::V1beta1::Key>]
|
223
|
+
# Key details.
|
224
|
+
# @!attribute [rw] next_page_token
|
225
|
+
# @return [String]
|
226
|
+
# Token to retrieve the next page of results. It is set to empty if no keys
|
227
|
+
# remain in results.
|
228
|
+
class ListKeysResponse
|
229
|
+
include Google::Protobuf::MessageExts
|
230
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
231
|
+
end
|
232
|
+
|
233
|
+
# The get key request message.
|
234
|
+
# @!attribute [rw] name
|
235
|
+
# @return [String]
|
236
|
+
# Required. The name of the requested key, in the format
|
237
|
+
# "projects/\\{project_number}/keys/\\{key_id}".
|
238
|
+
class GetKeyRequest
|
239
|
+
include Google::Protobuf::MessageExts
|
240
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
241
|
+
end
|
242
|
+
|
243
|
+
# The update key request message.
|
244
|
+
# @!attribute [rw] key
|
245
|
+
# @return [Google::Cloud::RecaptchaEnterprise::V1beta1::Key]
|
246
|
+
# Required. The key to update.
|
247
|
+
# @!attribute [rw] update_mask
|
248
|
+
# @return [Google::Protobuf::FieldMask]
|
249
|
+
# Optional. The mask to control which field of the key get updated. If the mask is not
|
250
|
+
# present, all fields will be updated.
|
251
|
+
class UpdateKeyRequest
|
252
|
+
include Google::Protobuf::MessageExts
|
253
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
254
|
+
end
|
255
|
+
|
256
|
+
# The delete key request message.
|
257
|
+
# @!attribute [rw] name
|
258
|
+
# @return [String]
|
259
|
+
# Required. The name of the key to be deleted, in the format
|
260
|
+
# "projects/\\{project_number}/keys/\\{key_id}".
|
261
|
+
class DeleteKeyRequest
|
262
|
+
include Google::Protobuf::MessageExts
|
263
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
264
|
+
end
|
265
|
+
|
266
|
+
# A key used to identify and configure applications (web and/or mobile) that
|
267
|
+
# use reCAPTCHA Enterprise.
|
268
|
+
# @!attribute [rw] name
|
269
|
+
# @return [String]
|
270
|
+
# The resource name for the Key in the format
|
271
|
+
# "projects/\\{project_number}/keys/\\{key_id}".
|
272
|
+
# @!attribute [rw] display_name
|
273
|
+
# @return [String]
|
274
|
+
# Human-readable display name of this key. Modifiable by user.
|
275
|
+
# @!attribute [rw] web_settings
|
276
|
+
# @return [Google::Cloud::RecaptchaEnterprise::V1beta1::WebKeySettings]
|
277
|
+
# Settings for keys that can be used by websites.
|
278
|
+
# @!attribute [rw] android_settings
|
279
|
+
# @return [Google::Cloud::RecaptchaEnterprise::V1beta1::AndroidKeySettings]
|
280
|
+
# Settings for keys that can be used by Android apps.
|
281
|
+
# @!attribute [rw] ios_settings
|
282
|
+
# @return [Google::Cloud::RecaptchaEnterprise::V1beta1::IOSKeySettings]
|
283
|
+
# Settings for keys that can be used by iOS apps.
|
284
|
+
class Key
|
285
|
+
include Google::Protobuf::MessageExts
|
286
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
287
|
+
end
|
288
|
+
|
289
|
+
# Settings specific to keys that can be used by websites.
|
290
|
+
# @!attribute [rw] enforce_allowed_domains
|
291
|
+
# @return [Boolean]
|
292
|
+
# Whether allowed_domains is enforced or not.
|
293
|
+
# @!attribute [rw] allowed_domains
|
294
|
+
# @return [Array<String>]
|
295
|
+
# Domains or subdomains of websites allowed to use the key. All subdomains
|
296
|
+
# of an allowed domain are automatically allowed. A valid domain requires a
|
297
|
+
# host and must not include any path, port, query or fragment.
|
298
|
+
# Examples: 'example.com' or 'subdomain.example.com'
|
299
|
+
# @!attribute [rw] allow_amp_traffic
|
300
|
+
# @return [Boolean]
|
301
|
+
# Whether this key can be used on AMP (Accelerated Mobile Pages) websites.
|
302
|
+
# @!attribute [rw] integration_type
|
303
|
+
# @return [Google::Cloud::RecaptchaEnterprise::V1beta1::WebKeySettings::IntegrationType]
|
304
|
+
# Required. Describes how this key is integrated with the website.
|
305
|
+
# @!attribute [rw] challenge_security_preference
|
306
|
+
# @return [Google::Cloud::RecaptchaEnterprise::V1beta1::WebKeySettings::ChallengeSecurityPreference]
|
307
|
+
# Settings for the frequency and difficulty at which this key triggers
|
308
|
+
# captcha challenges. This should only be specified for IntegrationTypes
|
309
|
+
# CHECKBOX_CHALLENGE and INVISIBLE_CHALLENGE.
|
310
|
+
class WebKeySettings
|
311
|
+
include Google::Protobuf::MessageExts
|
312
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
313
|
+
|
314
|
+
# Enum that represents the integration types for web keys.
|
315
|
+
module IntegrationType
|
316
|
+
# Default type that indicates this enum hasn't been specified. This is not
|
317
|
+
# a valid IntegrationType, one of the other types must be specified
|
318
|
+
# instead.
|
319
|
+
INTEGRATION_TYPE_UNSPECIFIED = 0
|
320
|
+
|
321
|
+
# Only used to produce scores. It doesn't display the "I'm not a robot"
|
322
|
+
# checkbox and never shows captcha challenges.
|
323
|
+
SCORE_ONLY = 1
|
324
|
+
|
325
|
+
# Displays the "I'm not a robot" checkbox and may show captcha challenges
|
326
|
+
# after it is checked.
|
327
|
+
CHECKBOX_CHALLENGE = 2
|
328
|
+
|
329
|
+
# Doesn't display the "I'm not a robot" checkbox, but may show captcha
|
330
|
+
# challenges after risk analysis.
|
331
|
+
INVISIBLE_CHALLENGE = 3
|
332
|
+
end
|
333
|
+
|
334
|
+
# Enum that represents the possible challenge frequency and difficulty
|
335
|
+
# configurations for a web key.
|
336
|
+
module ChallengeSecurityPreference
|
337
|
+
# Default type that indicates this enum hasn't been specified.
|
338
|
+
CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED = 0
|
339
|
+
|
340
|
+
# Key tends to show fewer and easier challenges.
|
341
|
+
USABILITY = 1
|
342
|
+
|
343
|
+
# Key tends to show balanced (in amount and difficulty) challenges.
|
344
|
+
BALANCED = 2
|
345
|
+
|
346
|
+
# Key tends to show more and harder challenges.
|
347
|
+
SECURITY = 3
|
348
|
+
end
|
349
|
+
end
|
350
|
+
|
351
|
+
# Settings specific to keys that can be used by Android apps.
|
352
|
+
# @!attribute [rw] allowed_package_names
|
353
|
+
# @return [Array<String>]
|
354
|
+
# Android package names of apps allowed to use the key.
|
355
|
+
# Example: 'com.companyname.appname'
|
356
|
+
class AndroidKeySettings
|
357
|
+
include Google::Protobuf::MessageExts
|
358
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
359
|
+
end
|
360
|
+
|
361
|
+
# Settings specific to keys that can be used by iOS apps.
|
362
|
+
# @!attribute [rw] allowed_bundle_ids
|
363
|
+
# @return [Array<String>]
|
364
|
+
# iOS bundle ids of apps allowed to use the key.
|
365
|
+
# Example: 'com.companyname.productname.appname'
|
366
|
+
class IOSKeySettings
|
367
|
+
include Google::Protobuf::MessageExts
|
368
|
+
extend Google::Protobuf::MessageExts::ClassMethods
|
369
|
+
end
|
370
|
+
end
|
371
|
+
end
|
372
|
+
end
|
373
|
+
end
|