google-cloud-recaptcha_enterprise-v1beta1 0.2.0 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 13895e6383b426579d758bfd3755b915c02c7d621fea14c0ab33691c96155071
4
- data.tar.gz: 821de78bee6685734f21649d3bf4f9cbccdc7abb603de2b43246029d0d6ad9ce
3
+ metadata.gz: b75bc47e82287668f5e185c7c63d39af91194a5905bcbdbc35939db15d45c0a8
4
+ data.tar.gz: 7316ade7feac929b69d4199a5b58aee4c7ae86094b00beb5c92fd2952e636db0
5
5
  SHA512:
6
- metadata.gz: fee8d49df918000add055a1fa01eed925d97dd96c94421f0e0e4d8c3af92f4390183a7f4849095591da265a86d94ef884f0441b9153a9e1e9d272eabad08d0e1
7
- data.tar.gz: 8a60e4601fef904d8ea5207ed8157c18ece662187de5fb0668e1c1280a1a20b19dd177e4a943ea7c556a8bda88562e036b9103c1d6d4ac67066b0dc08e6e6daa
6
+ metadata.gz: 53a3dbd257f5a6666111e3b570f570c0aca9616a32a0a991db198c45813657bddd17bd66815e6594d9be6e8062f95ec1b532bd0e217b64727c78c36b73849aa5
7
+ data.tar.gz: 6a5706d5dabcd23c8625b0126bde32491972aef3d6c3d195ab98fd1d2b63adc12892fb985ade2bcb87c8857f442fdda616819843cc4b65dc1520a8c6cdc4aa3f
data/README.md CHANGED
@@ -18,6 +18,7 @@ In order to use this library, you first need to go through the following steps:
18
18
 
19
19
  1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
20
20
  1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
21
+ 1. [Enable the API.](https://console.cloud.google.com/apis/library/recaptchaenterprise.googleapis.com)
21
22
  1. {file:AUTHENTICATION.md Set up authentication.}
22
23
 
23
24
  ## Quick Start
@@ -33,6 +34,9 @@ response = client.create_assessment request
33
34
  View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-recaptcha_enterprise-v1beta1/latest)
34
35
  for class and method documentation.
35
36
 
37
+ See also the [Product Documentation](https://cloud.google.com/recaptcha-enterprise)
38
+ for general usage information.
39
+
36
40
  ## Enabling Logging
37
41
 
38
42
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
@@ -33,3 +33,6 @@ module Google
33
33
  end
34
34
  end
35
35
  end
36
+
37
+ helper_path = ::File.join __dir__, "v1beta1", "_helpers.rb"
38
+ require "google/cloud/recaptcha_enterprise/v1beta1/_helpers" if ::File.file? helper_path
@@ -25,7 +25,7 @@ module Google
25
25
  module V1beta1
26
26
  module RecaptchaEnterpriseService
27
27
  ##
28
- # Client for the RecaptchaEnterpriseServiceV1Beta1 service.
28
+ # Client for the RecaptchaEnterpriseService service.
29
29
  #
30
30
  # Service to determine the likelihood an event is legitimate.
31
31
  #
@@ -33,17 +33,17 @@ module Google
33
33
  include Paths
34
34
 
35
35
  # @private
36
- attr_reader :recaptcha_enterprise_service_v1_beta1_stub
36
+ attr_reader :recaptcha_enterprise_service_stub
37
37
 
38
38
  ##
39
- # Configure the RecaptchaEnterpriseServiceV1Beta1 Client class.
39
+ # Configure the RecaptchaEnterpriseService Client class.
40
40
  #
41
41
  # See {::Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client::Configuration}
42
42
  # for a description of the configuration fields.
43
43
  #
44
44
  # ## Example
45
45
  #
46
- # To modify the configuration for all RecaptchaEnterpriseServiceV1Beta1 clients:
46
+ # To modify the configuration for all RecaptchaEnterpriseService clients:
47
47
  #
48
48
  # ::Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.configure do |config|
49
49
  # config.timeout = 10.0
@@ -86,7 +86,7 @@ module Google
86
86
  end
87
87
 
88
88
  ##
89
- # Configure the RecaptchaEnterpriseServiceV1Beta1 Client instance.
89
+ # Configure the RecaptchaEnterpriseService Client instance.
90
90
  #
91
91
  # The configuration is set to the derived mode, meaning that values can be changed,
92
92
  # but structural changes (adding new fields, etc.) are not allowed. Structural changes
@@ -106,23 +106,23 @@ module Google
106
106
  end
107
107
 
108
108
  ##
109
- # Create a new RecaptchaEnterpriseServiceV1Beta1 client object.
109
+ # Create a new RecaptchaEnterpriseService client object.
110
110
  #
111
111
  # ## Examples
112
112
  #
113
- # To create a new RecaptchaEnterpriseServiceV1Beta1 client with the default
113
+ # To create a new RecaptchaEnterpriseService client with the default
114
114
  # configuration:
115
115
  #
116
116
  # client = ::Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.new
117
117
  #
118
- # To create a new RecaptchaEnterpriseServiceV1Beta1 client with a custom
118
+ # To create a new RecaptchaEnterpriseService client with a custom
119
119
  # configuration:
120
120
  #
121
121
  # client = ::Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.new do |config|
122
122
  # config.timeout = 10.0
123
123
  # end
124
124
  #
125
- # @yield [config] Configure the RecaptchaEnterpriseServiceV1Beta1 client.
125
+ # @yield [config] Configure the RecaptchaEnterpriseService client.
126
126
  # @yieldparam config [Client::Configuration]
127
127
  #
128
128
  def initialize
@@ -147,7 +147,7 @@ module Google
147
147
  @quota_project_id = @config.quota_project
148
148
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
149
149
 
150
- @recaptcha_enterprise_service_v1_beta1_stub = ::Gapic::ServiceStub.new(
150
+ @recaptcha_enterprise_service_stub = ::Gapic::ServiceStub.new(
151
151
  ::Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseServiceV1Beta1::Stub,
152
152
  credentials: credentials,
153
153
  endpoint: @config.endpoint,
@@ -219,7 +219,7 @@ module Google
219
219
  options.apply_defaults metadata: @config.metadata,
220
220
  retry_policy: @config.retry_policy
221
221
 
222
- @recaptcha_enterprise_service_v1_beta1_stub.call_rpc :create_assessment, request, options: options do |response, operation|
222
+ @recaptcha_enterprise_service_stub.call_rpc :create_assessment, request, options: options do |response, operation|
223
223
  yield response, operation if block_given?
224
224
  return response
225
225
  end
@@ -289,7 +289,7 @@ module Google
289
289
  options.apply_defaults metadata: @config.metadata,
290
290
  retry_policy: @config.retry_policy
291
291
 
292
- @recaptcha_enterprise_service_v1_beta1_stub.call_rpc :annotate_assessment, request, options: options do |response, operation|
292
+ @recaptcha_enterprise_service_stub.call_rpc :annotate_assessment, request, options: options do |response, operation|
293
293
  yield response, operation if block_given?
294
294
  return response
295
295
  end
@@ -358,7 +358,7 @@ module Google
358
358
  options.apply_defaults metadata: @config.metadata,
359
359
  retry_policy: @config.retry_policy
360
360
 
361
- @recaptcha_enterprise_service_v1_beta1_stub.call_rpc :create_key, request, options: options do |response, operation|
361
+ @recaptcha_enterprise_service_stub.call_rpc :create_key, request, options: options do |response, operation|
362
362
  yield response, operation if block_given?
363
363
  return response
364
364
  end
@@ -431,8 +431,8 @@ module Google
431
431
  options.apply_defaults metadata: @config.metadata,
432
432
  retry_policy: @config.retry_policy
433
433
 
434
- @recaptcha_enterprise_service_v1_beta1_stub.call_rpc :list_keys, request, options: options do |response, operation|
435
- response = ::Gapic::PagedEnumerable.new @recaptcha_enterprise_service_v1_beta1_stub, :list_keys, request, response, operation, options
434
+ @recaptcha_enterprise_service_stub.call_rpc :list_keys, request, options: options do |response, operation|
435
+ response = ::Gapic::PagedEnumerable.new @recaptcha_enterprise_service_stub, :list_keys, request, response, operation, options
436
436
  yield response, operation if block_given?
437
437
  return response
438
438
  end
@@ -499,7 +499,7 @@ module Google
499
499
  options.apply_defaults metadata: @config.metadata,
500
500
  retry_policy: @config.retry_policy
501
501
 
502
- @recaptcha_enterprise_service_v1_beta1_stub.call_rpc :get_key, request, options: options do |response, operation|
502
+ @recaptcha_enterprise_service_stub.call_rpc :get_key, request, options: options do |response, operation|
503
503
  yield response, operation if block_given?
504
504
  return response
505
505
  end
@@ -568,7 +568,7 @@ module Google
568
568
  options.apply_defaults metadata: @config.metadata,
569
569
  retry_policy: @config.retry_policy
570
570
 
571
- @recaptcha_enterprise_service_v1_beta1_stub.call_rpc :update_key, request, options: options do |response, operation|
571
+ @recaptcha_enterprise_service_stub.call_rpc :update_key, request, options: options do |response, operation|
572
572
  yield response, operation if block_given?
573
573
  return response
574
574
  end
@@ -635,7 +635,7 @@ module Google
635
635
  options.apply_defaults metadata: @config.metadata,
636
636
  retry_policy: @config.retry_policy
637
637
 
638
- @recaptcha_enterprise_service_v1_beta1_stub.call_rpc :delete_key, request, options: options do |response, operation|
638
+ @recaptcha_enterprise_service_stub.call_rpc :delete_key, request, options: options do |response, operation|
639
639
  yield response, operation if block_given?
640
640
  return response
641
641
  end
@@ -644,9 +644,9 @@ module Google
644
644
  end
645
645
 
646
646
  ##
647
- # Configuration class for the RecaptchaEnterpriseServiceV1Beta1 API.
647
+ # Configuration class for the RecaptchaEnterpriseService API.
648
648
  #
649
- # This class represents the configuration for RecaptchaEnterpriseServiceV1Beta1,
649
+ # This class represents the configuration for RecaptchaEnterpriseService,
650
650
  # providing control over timeouts, retry behavior, logging, transport
651
651
  # parameters, and other low-level controls. Certain parameters can also be
652
652
  # applied individually to specific RPCs. See
@@ -728,7 +728,7 @@ module Google
728
728
 
729
729
  config_attr :endpoint, "recaptchaenterprise.googleapis.com", ::String
730
730
  config_attr :credentials, nil do |value|
731
- allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
731
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
732
732
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
733
733
  allowed.any? { |klass| klass === value }
734
734
  end
@@ -756,19 +756,19 @@ module Google
756
756
  def rpcs
757
757
  @rpcs ||= begin
758
758
  parent_rpcs = nil
759
- parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to? :rpcs
759
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
760
760
  Rpcs.new parent_rpcs
761
761
  end
762
762
  end
763
763
 
764
764
  ##
765
- # Configuration RPC class for the RecaptchaEnterpriseServiceV1Beta1 API.
765
+ # Configuration RPC class for the RecaptchaEnterpriseService API.
766
766
  #
767
767
  # Includes fields providing the configuration for each RPC in this service.
768
768
  # Each configuration object is of type `Gapic::Config::Method` and includes
769
769
  # the following configuration fields:
770
770
  #
771
- # * `timeout` (*type:* `Numeric`) - The call timeout in milliseconds
771
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
772
772
  # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
773
773
  # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
774
774
  # include the following keys:
@@ -23,7 +23,7 @@ module Google
23
23
  module RecaptchaEnterprise
24
24
  module V1beta1
25
25
  module RecaptchaEnterpriseService
26
- # Credentials for the RecaptchaEnterpriseServiceV1Beta1 API.
26
+ # Credentials for the RecaptchaEnterpriseService API.
27
27
  class Credentials < ::Google::Auth::Credentials
28
28
  self.scope = [
29
29
  "https://www.googleapis.com/auth/cloud-platform"
@@ -22,7 +22,7 @@ module Google
22
22
  module RecaptchaEnterprise
23
23
  module V1beta1
24
24
  module RecaptchaEnterpriseService
25
- # Path helper methods for the RecaptchaEnterpriseServiceV1Beta1 API.
25
+ # Path helper methods for the RecaptchaEnterpriseService API.
26
26
  module Paths
27
27
  ##
28
28
  # Create a fully-qualified Assessment resource string.
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module RecaptchaEnterprise
23
23
  module V1beta1
24
- VERSION = "0.2.0"
24
+ VERSION = "0.2.5"
25
25
  end
26
26
  end
27
27
  end
@@ -35,20 +35,20 @@ module Google
35
35
  self.service_name = 'google.cloud.recaptchaenterprise.v1beta1.RecaptchaEnterpriseServiceV1Beta1'
36
36
 
37
37
  # Creates an Assessment of the likelihood an event is legitimate.
38
- rpc :CreateAssessment, Google::Cloud::RecaptchaEnterprise::V1beta1::CreateAssessmentRequest, Google::Cloud::RecaptchaEnterprise::V1beta1::Assessment
38
+ rpc :CreateAssessment, ::Google::Cloud::RecaptchaEnterprise::V1beta1::CreateAssessmentRequest, ::Google::Cloud::RecaptchaEnterprise::V1beta1::Assessment
39
39
  # Annotates a previously created Assessment to provide additional information
40
40
  # on whether the event turned out to be authentic or fradulent.
41
- rpc :AnnotateAssessment, Google::Cloud::RecaptchaEnterprise::V1beta1::AnnotateAssessmentRequest, Google::Cloud::RecaptchaEnterprise::V1beta1::AnnotateAssessmentResponse
41
+ rpc :AnnotateAssessment, ::Google::Cloud::RecaptchaEnterprise::V1beta1::AnnotateAssessmentRequest, ::Google::Cloud::RecaptchaEnterprise::V1beta1::AnnotateAssessmentResponse
42
42
  # Creates a new reCAPTCHA Enterprise key.
43
- rpc :CreateKey, Google::Cloud::RecaptchaEnterprise::V1beta1::CreateKeyRequest, Google::Cloud::RecaptchaEnterprise::V1beta1::Key
43
+ rpc :CreateKey, ::Google::Cloud::RecaptchaEnterprise::V1beta1::CreateKeyRequest, ::Google::Cloud::RecaptchaEnterprise::V1beta1::Key
44
44
  # Returns the list of all keys that belong to a project.
45
- rpc :ListKeys, Google::Cloud::RecaptchaEnterprise::V1beta1::ListKeysRequest, Google::Cloud::RecaptchaEnterprise::V1beta1::ListKeysResponse
45
+ rpc :ListKeys, ::Google::Cloud::RecaptchaEnterprise::V1beta1::ListKeysRequest, ::Google::Cloud::RecaptchaEnterprise::V1beta1::ListKeysResponse
46
46
  # Returns the specified key.
47
- rpc :GetKey, Google::Cloud::RecaptchaEnterprise::V1beta1::GetKeyRequest, Google::Cloud::RecaptchaEnterprise::V1beta1::Key
47
+ rpc :GetKey, ::Google::Cloud::RecaptchaEnterprise::V1beta1::GetKeyRequest, ::Google::Cloud::RecaptchaEnterprise::V1beta1::Key
48
48
  # Updates the specified key.
49
- rpc :UpdateKey, Google::Cloud::RecaptchaEnterprise::V1beta1::UpdateKeyRequest, Google::Cloud::RecaptchaEnterprise::V1beta1::Key
49
+ rpc :UpdateKey, ::Google::Cloud::RecaptchaEnterprise::V1beta1::UpdateKeyRequest, ::Google::Cloud::RecaptchaEnterprise::V1beta1::Key
50
50
  # Deletes the specified key.
51
- rpc :DeleteKey, Google::Cloud::RecaptchaEnterprise::V1beta1::DeleteKeyRequest, Google::Protobuf::Empty
51
+ rpc :DeleteKey, ::Google::Cloud::RecaptchaEnterprise::V1beta1::DeleteKeyRequest, ::Google::Protobuf::Empty
52
52
  end
53
53
 
54
54
  Stub = Service.rpc_stub_class
@@ -43,12 +43,12 @@ module Google
43
43
  #
44
44
  # The ResourceDescriptor Yaml config will look like:
45
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}"
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
52
  #
53
53
  # Sometimes, resources have multiple patterns, typically because they can
54
54
  # live under multiple parents.
@@ -183,15 +183,24 @@ module Google
183
183
  # }
184
184
  # @!attribute [rw] plural
185
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
186
+ # The plural name used in the resource name and permission names, such as
187
+ # 'projects' for the resource name of 'projects/\\{project}' and the permission
188
+ # name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
189
+ # concept of the `plural` field in k8s CRD spec
189
190
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
191
+ #
192
+ # Note: The plural form is required even for singleton resources. See
193
+ # https://aip.dev/156
190
194
  # @!attribute [rw] singular
191
195
  # @return [::String]
192
196
  # The same concept of the `singular` field in k8s CRD spec
193
197
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
194
198
  # Such as "project" for the `resourcemanager.googleapis.com/Project` type.
199
+ # @!attribute [rw] style
200
+ # @return [::Array<::Google::Api::ResourceDescriptor::Style>]
201
+ # Style flag(s) for this resource.
202
+ # These indicate that a resource is expected to conform to a given
203
+ # style. See the specific style flags for additional information.
195
204
  class ResourceDescriptor
196
205
  include ::Google::Protobuf::MessageExts
197
206
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -211,6 +220,22 @@ module Google
211
220
  # that from being necessary once there are multiple patterns.)
212
221
  FUTURE_MULTI_PATTERN = 2
213
222
  end
223
+
224
+ # A flag representing a specific style that a resource claims to conform to.
225
+ module Style
226
+ # The unspecified value. Do not use.
227
+ STYLE_UNSPECIFIED = 0
228
+
229
+ # This resource is intended to be "declarative-friendly".
230
+ #
231
+ # Declarative-friendly resources must be more strictly consistent, and
232
+ # setting this to true communicates to tools that this resource should
233
+ # adhere to declarative-friendly expectations.
234
+ #
235
+ # Note: This is used by the API linter (linter.aip.dev) to enable
236
+ # additional checks.
237
+ DECLARATIVE_FRIENDLY = 1
238
+ end
214
239
  end
215
240
 
216
241
  # Defines a proto annotation that describes a string field that refers to
@@ -226,6 +251,17 @@ module Google
226
251
  # type: "pubsub.googleapis.com/Topic"
227
252
  # }];
228
253
  # }
254
+ #
255
+ # Occasionally, a field may reference an arbitrary resource. In this case,
256
+ # APIs use the special value * in their resource reference.
257
+ #
258
+ # Example:
259
+ #
260
+ # message GetIamPolicyRequest {
261
+ # string resource = 2 [(google.api.resource_reference) = {
262
+ # type: "*"
263
+ # }];
264
+ # }
229
265
  # @!attribute [rw] child_type
230
266
  # @return [::String]
231
267
  # The resource type of a child collection that the annotated field
@@ -234,11 +270,11 @@ module Google
234
270
  #
235
271
  # Example:
236
272
  #
237
- # message ListLogEntriesRequest {
238
- # string parent = 1 [(google.api.resource_reference) = {
239
- # child_type: "logging.googleapis.com/LogEntry"
240
- # };
241
- # }
273
+ # message ListLogEntriesRequest {
274
+ # string parent = 1 [(google.api.resource_reference) = {
275
+ # child_type: "logging.googleapis.com/LogEntry"
276
+ # };
277
+ # }
242
278
  class ResourceReference
243
279
  include ::Google::Protobuf::MessageExts
244
280
  extend ::Google::Protobuf::MessageExts::ClassMethods
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-recaptcha_enterprise-v1beta1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-21 00:00:00.000000000 Z
11
+ date: 2021-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.2'
19
+ version: '0.3'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.2'
26
+ version: '0.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: google-cloud-errors
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -196,7 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
196
196
  - !ruby/object:Gem::Version
197
197
  version: '0'
198
198
  requirements: []
199
- rubygems_version: 3.0.6
199
+ rubygems_version: 3.2.6
200
200
  signing_key:
201
201
  specification_version: 4
202
202
  summary: API Client library for the reCAPTCHA Enterprise V1beta1 API