google-cloud-web_risk-v1beta1 0.4.0 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 463c3beac8ca44e42114b000af71a96b672b4ebb6d18acb8e9e4ca01b7230b99
4
- data.tar.gz: 7bdbaeabfa7df2edfdb790c4f1b0d05a4a903a28b90942e995c8f56485d6d15b
3
+ metadata.gz: 59f19aff490ae4ddf3f224344a3b65e2865694faf7b40fc2224b7346ae1580df
4
+ data.tar.gz: 65c8b748e51d3db99fea696114b66a5dacbff8ce154a5e8601a5cad5da2eb88f
5
5
  SHA512:
6
- metadata.gz: c1beaa9b5d8cbc33c2906ba204b5350a71d852a072f14ea4f69b847ebce9e1698a7527437d25770017b8d3347b5fdf24c9e2b08d2ea7c7120da4245870053c29
7
- data.tar.gz: f837fe45104ac44e2e74bf9b8521fdbf22f678b59777539076537db21c6c5617ae1b279ae6104ec8cc7bbd9d282e603b4e8085578700bb290f5cdd0a67a1bbfc
6
+ metadata.gz: 8c9caa8c9730844a7dbc12ceff12659619d01321aca4fa9438fcff209a399cea135c3e04a65beba7f466137b92cc21d41a2e5ecb224c1ac8dae69d7c75cf3b16
7
+ data.tar.gz: 3c8f45f207efe3c47e9f2588f56d091011a26897378cf0efbe35c75b40e4e931b6b42ecd5570dde4511600ec07512d4ad9bd062dd18e1682bdf83f7afc222565
data/AUTHENTICATION.md CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-web_risk-v1beta1
66
66
  checks for credentials are configured on the service Credentials class (such as
67
67
  {::Google::Cloud::WebRisk::V1beta1::WebRiskService::Credentials}):
68
68
 
69
- 1. `WEBRISK_CREDENTIALS` - Path to JSON file, or JSON contents
70
- 2. `WEBRISK_KEYFILE` - Path to JSON file, or JSON contents
71
- 3. `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
- 4. `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
- 5. `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
69
+ * `WEBRISK_CREDENTIALS` - Path to JSON file, or JSON contents
70
+ * `WEBRISK_KEYFILE` - Path to JSON file, or JSON contents
71
+ * `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
+ * `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
+ * `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
74
74
 
75
75
  ```ruby
76
76
  require "google/cloud/web_risk/v1beta1"
@@ -82,8 +82,8 @@ client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new
82
82
 
83
83
  ### Configuration
84
84
 
85
- The **Credentials JSON** can be configured instead of placing them in
86
- environment variables. Either on an individual client initialization:
85
+ The path to the **Credentials JSON** file can be configured instead of storing
86
+ it in an environment variable. Either on an individual client initialization:
87
87
 
88
88
  ```ruby
89
89
  require "google/cloud/web_risk/v1beta1"
@@ -93,7 +93,7 @@ client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new do |confi
93
93
  end
94
94
  ```
95
95
 
96
- Or configured globally for all clients:
96
+ Or globally for all clients:
97
97
 
98
98
  ```ruby
99
99
  require "google/cloud/web_risk/v1beta1"
data/README.md CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
33
33
  require "google/cloud/web_risk/v1beta1"
34
34
 
35
35
  client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new
36
- request = my_create_request
36
+ request = ::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest.new # (request fields as keyword arguments...)
37
37
  response = client.compute_threat_list_diff request
38
38
  ```
39
39
 
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module WebRisk
23
23
  module V1beta1
24
- VERSION = "0.4.0"
24
+ VERSION = "0.4.4"
25
25
  end
26
26
  end
27
27
  end
@@ -40,13 +40,12 @@ module Google
40
40
  # See {::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client::Configuration}
41
41
  # for a description of the configuration fields.
42
42
  #
43
- # ## Example
43
+ # @example
44
44
  #
45
- # To modify the configuration for all WebRiskService clients:
46
- #
47
- # ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.configure do |config|
48
- # config.timeout = 10.0
49
- # end
45
+ # # Modify the configuration for all WebRiskService clients
46
+ # ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.configure do |config|
47
+ # config.timeout = 10.0
48
+ # end
50
49
  #
51
50
  # @yield [config] Configure the Client client.
52
51
  # @yieldparam config [Client::Configuration]
@@ -66,26 +65,17 @@ module Google
66
65
 
67
66
  default_config.rpcs.compute_threat_list_diff.timeout = 600.0
68
67
  default_config.rpcs.compute_threat_list_diff.retry_policy = {
69
- initial_delay: 0.1,
70
- max_delay: 60.0,
71
- multiplier: 1.3,
72
- retry_codes: [4, 14]
68
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
73
69
  }
74
70
 
75
71
  default_config.rpcs.search_uris.timeout = 600.0
76
72
  default_config.rpcs.search_uris.retry_policy = {
77
- initial_delay: 0.1,
78
- max_delay: 60.0,
79
- multiplier: 1.3,
80
- retry_codes: [4, 14]
73
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
81
74
  }
82
75
 
83
76
  default_config.rpcs.search_hashes.timeout = 600.0
84
77
  default_config.rpcs.search_hashes.retry_policy = {
85
- initial_delay: 0.1,
86
- max_delay: 60.0,
87
- multiplier: 1.3,
88
- retry_codes: [4, 14]
78
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
89
79
  }
90
80
 
91
81
  default_config
@@ -117,19 +107,15 @@ module Google
117
107
  ##
118
108
  # Create a new WebRiskService client object.
119
109
  #
120
- # ## Examples
121
- #
122
- # To create a new WebRiskService client with the default
123
- # configuration:
110
+ # @example
124
111
  #
125
- # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new
112
+ # # Create a client using the default configuration
113
+ # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new
126
114
  #
127
- # To create a new WebRiskService client with a custom
128
- # configuration:
129
- #
130
- # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new do |config|
131
- # config.timeout = 10.0
132
- # end
115
+ # # Create a client using a custom configuration
116
+ # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new do |config|
117
+ # config.timeout = 10.0
118
+ # end
133
119
  #
134
120
  # @yield [config] Configure the WebRiskService client.
135
121
  # @yieldparam config [Client::Configuration]
@@ -149,14 +135,13 @@ module Google
149
135
 
150
136
  # Create credentials
151
137
  credentials = @config.credentials
152
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
138
+ # Use self-signed JWT if the endpoint is unchanged from default,
153
139
  # but only if the default endpoint does not have a region prefix.
154
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
155
- @config.endpoint == Client.configure.endpoint &&
140
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
156
141
  !@config.endpoint.split(".").first.include?("-")
157
142
  credentials ||= Credentials.default scope: @config.scope,
158
143
  enable_self_signed_jwt: enable_self_signed_jwt
159
- if credentials.is_a?(String) || credentials.is_a?(Hash)
144
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
160
145
  credentials = Credentials.new credentials, scope: @config.scope
161
146
  end
162
147
  @quota_project_id = @config.quota_project
@@ -207,6 +192,21 @@ module Google
207
192
  #
208
193
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
209
194
  #
195
+ # @example Basic example
196
+ # require "google/cloud/web_risk/v1beta1"
197
+ #
198
+ # # Create a client object. The client can be reused for multiple calls.
199
+ # client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new
200
+ #
201
+ # # Create a request. To set request fields, pass in keyword arguments.
202
+ # request = Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest.new
203
+ #
204
+ # # Call the compute_threat_list_diff method.
205
+ # result = client.compute_threat_list_diff request
206
+ #
207
+ # # The returned object is of type Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse.
208
+ # p result
209
+ #
210
210
  def compute_threat_list_diff request, options = nil
211
211
  raise ::ArgumentError, "request must be provided" if request.nil?
212
212
 
@@ -227,7 +227,9 @@ module Google
227
227
  options.apply_defaults timeout: @config.rpcs.compute_threat_list_diff.timeout,
228
228
  metadata: metadata,
229
229
  retry_policy: @config.rpcs.compute_threat_list_diff.retry_policy
230
- options.apply_defaults metadata: @config.metadata,
230
+
231
+ options.apply_defaults timeout: @config.timeout,
232
+ metadata: @config.metadata,
231
233
  retry_policy: @config.retry_policy
232
234
 
233
235
  @web_risk_service_stub.call_rpc :compute_threat_list_diff, request, options: options do |response, operation|
@@ -269,6 +271,21 @@ module Google
269
271
  #
270
272
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
271
273
  #
274
+ # @example Basic example
275
+ # require "google/cloud/web_risk/v1beta1"
276
+ #
277
+ # # Create a client object. The client can be reused for multiple calls.
278
+ # client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new
279
+ #
280
+ # # Create a request. To set request fields, pass in keyword arguments.
281
+ # request = Google::Cloud::WebRisk::V1beta1::SearchUrisRequest.new
282
+ #
283
+ # # Call the search_uris method.
284
+ # result = client.search_uris request
285
+ #
286
+ # # The returned object is of type Google::Cloud::WebRisk::V1beta1::SearchUrisResponse.
287
+ # p result
288
+ #
272
289
  def search_uris request, options = nil
273
290
  raise ::ArgumentError, "request must be provided" if request.nil?
274
291
 
@@ -289,7 +306,9 @@ module Google
289
306
  options.apply_defaults timeout: @config.rpcs.search_uris.timeout,
290
307
  metadata: metadata,
291
308
  retry_policy: @config.rpcs.search_uris.retry_policy
292
- options.apply_defaults metadata: @config.metadata,
309
+
310
+ options.apply_defaults timeout: @config.timeout,
311
+ metadata: @config.metadata,
293
312
  retry_policy: @config.retry_policy
294
313
 
295
314
  @web_risk_service_stub.call_rpc :search_uris, request, options: options do |response, operation|
@@ -336,6 +355,21 @@ module Google
336
355
  #
337
356
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
338
357
  #
358
+ # @example Basic example
359
+ # require "google/cloud/web_risk/v1beta1"
360
+ #
361
+ # # Create a client object. The client can be reused for multiple calls.
362
+ # client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new
363
+ #
364
+ # # Create a request. To set request fields, pass in keyword arguments.
365
+ # request = Google::Cloud::WebRisk::V1beta1::SearchHashesRequest.new
366
+ #
367
+ # # Call the search_hashes method.
368
+ # result = client.search_hashes request
369
+ #
370
+ # # The returned object is of type Google::Cloud::WebRisk::V1beta1::SearchHashesResponse.
371
+ # p result
372
+ #
339
373
  def search_hashes request, options = nil
340
374
  raise ::ArgumentError, "request must be provided" if request.nil?
341
375
 
@@ -356,7 +390,9 @@ module Google
356
390
  options.apply_defaults timeout: @config.rpcs.search_hashes.timeout,
357
391
  metadata: metadata,
358
392
  retry_policy: @config.rpcs.search_hashes.retry_policy
359
- options.apply_defaults metadata: @config.metadata,
393
+
394
+ options.apply_defaults timeout: @config.timeout,
395
+ metadata: @config.metadata,
360
396
  retry_policy: @config.retry_policy
361
397
 
362
398
  @web_risk_service_stub.call_rpc :search_hashes, request, options: options do |response, operation|
@@ -380,22 +416,21 @@ module Google
380
416
  # Configuration can be applied globally to all clients, or to a single client
381
417
  # on construction.
382
418
  #
383
- # # Examples
384
- #
385
- # To modify the global config, setting the timeout for compute_threat_list_diff
386
- # to 20 seconds, and all remaining timeouts to 10 seconds:
387
- #
388
- # ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.configure do |config|
389
- # config.timeout = 10.0
390
- # config.rpcs.compute_threat_list_diff.timeout = 20.0
391
- # end
392
- #
393
- # To apply the above configuration only to a new client:
394
- #
395
- # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new do |config|
396
- # config.timeout = 10.0
397
- # config.rpcs.compute_threat_list_diff.timeout = 20.0
398
- # end
419
+ # @example
420
+ #
421
+ # # Modify the global config, setting the timeout for
422
+ # # compute_threat_list_diff to 20 seconds,
423
+ # # and all remaining timeouts to 10 seconds.
424
+ # ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.configure do |config|
425
+ # config.timeout = 10.0
426
+ # config.rpcs.compute_threat_list_diff.timeout = 20.0
427
+ # end
428
+ #
429
+ # # Apply the above configuration only to a new client.
430
+ # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new do |config|
431
+ # config.timeout = 10.0
432
+ # config.rpcs.compute_threat_list_diff.timeout = 20.0
433
+ # end
399
434
  #
400
435
  # @!attribute [rw] endpoint
401
436
  # The hostname or hostname:port of the service endpoint.
@@ -1,12 +1,12 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/webrisk/v1beta1/webrisk.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/client_pb'
8
6
  require 'google/api/field_behavior_pb'
9
7
  require 'google/protobuf/timestamp_pb'
8
+ require 'google/protobuf'
9
+
10
10
  Google::Protobuf::DescriptorPool.generated_pool.build do
11
11
  add_file("google/cloud/webrisk/v1beta1/webrisk.proto", :syntax => :proto3) do
12
12
  add_message "google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest" do
@@ -29,7 +29,7 @@ module Google
29
29
  # website and in client applications.
30
30
  class Service
31
31
 
32
- include GRPC::GenericService
32
+ include ::GRPC::GenericService
33
33
 
34
34
  self.marshal_class_method = :encode
35
35
  self.unmarshal_class_method = :decode
@@ -57,9 +57,15 @@ module Google
57
57
 
58
58
  # Denotes that a (repeated) field is an unordered list.
59
59
  # This indicates that the service may provide the elements of the list
60
- # in any arbitrary order, rather than the order the user originally
60
+ # in any arbitrary order, rather than the order the user originally
61
61
  # provided. Additionally, the list's order may or may not be stable.
62
62
  UNORDERED_LIST = 6
63
+
64
+ # Denotes that this field returns a non-empty default value if not set.
65
+ # This indicates that if the user provides the empty value in a request,
66
+ # a non-empty value will be returned. The user will not be aware of what
67
+ # non-empty value to expect.
68
+ NON_EMPTY_DEFAULT = 7
63
69
  end
64
70
  end
65
71
  end
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-web_risk-v1beta1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-09 00:00:00.000000000 Z
11
+ date: 2021-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0.7'
20
+ - - "<"
18
21
  - !ruby/object:Gem::Version
19
- version: '0.3'
22
+ version: 2.a
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '0.7'
30
+ - - "<"
25
31
  - !ruby/object:Gem::Version
26
- version: '0.3'
32
+ version: 2.a
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: google-cloud-errors
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -196,7 +202,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
196
202
  - !ruby/object:Gem::Version
197
203
  version: '0'
198
204
  requirements: []
199
- rubygems_version: 3.2.13
205
+ rubygems_version: 3.2.17
200
206
  signing_key:
201
207
  specification_version: 4
202
208
  summary: API Client library for the Web Risk V1beta1 API