google-cloud-web_risk-v1 0.1.0 → 0.2.3

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: e83e3a13009afe42dbf93916f040c675dbb4d298e524970478debe650a20c134
4
- data.tar.gz: 1a9e23109c1a8383844d1c5ab55f0eab0ec1713d236e2036c26c73430531bb16
3
+ metadata.gz: a513d13feadaeb09c5e0664a2eae33baa040be5e4b15af4682f10a7ccf6cda83
4
+ data.tar.gz: 9563bdbba5f890ecab9d34655aaa974e390dbeb23f4a1b0dd7faf8d42d023b68
5
5
  SHA512:
6
- metadata.gz: 0a314cea58fccf1a85dcf96e154e65b75bc5372a09a0429d167c9f2359e30ac9a1c18ed3187b9e8512468073db27300db768a570d10f2190c887088008290001
7
- data.tar.gz: 0bec684d46bfe84566ea9b846ccf45a8e00dd3a96b4dc7944613640ddbf11056e98fdffdd39643b84593c26aff04f2e7a4d0d1b92dc2b5569ede0f7f5793efa7
6
+ metadata.gz: e4ae7a63256051b8b46496bffa3cdbc9b65a5aba59dbbcf71f81ff7e4805ada36b1aec501574eb3867e68dd684be52928be242a5fac90c9da16f0881b7fa4fb6
7
+ data.tar.gz: 7a20b2507bf671235dbb364c45d6302289f01fc53ed4fd4022b5ae568bd390248662087497d7959804654f4911fc70f88e9c4ce2f45846be997d768ccce0c835
@@ -27,7 +27,7 @@ export WEBRISK_CREDENTIALS=path/to/keyfile.json
27
27
  ```ruby
28
28
  require "google/cloud/web_risk/v1"
29
29
 
30
- client = Google::Cloud::WebRisk::V1::WebRiskService::Client.new
30
+ client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new
31
31
  ```
32
32
 
33
33
  ## Credential Lookup
@@ -64,7 +64,7 @@ containers where writing files is difficult or not encouraged.
64
64
 
65
65
  The environment variables that google-cloud-web_risk-v1
66
66
  checks for credentials are configured on the service Credentials class (such as
67
- {Google::Cloud::WebRisk::V1::WebRiskService::Credentials}):
67
+ {::Google::Cloud::WebRisk::V1::WebRiskService::Credentials}):
68
68
 
69
69
  1. `WEBRISK_CREDENTIALS` - Path to JSON file, or JSON contents
70
70
  2. `WEBRISK_KEYFILE` - Path to JSON file, or JSON contents
@@ -77,7 +77,7 @@ require "google/cloud/web_risk/v1"
77
77
 
78
78
  ENV["WEBRISK_CREDENTIALS"] = "path/to/keyfile.json"
79
79
 
80
- client = Google::Cloud::WebRisk::V1::WebRiskService::Client.new
80
+ client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new
81
81
  ```
82
82
 
83
83
  ### Configuration
@@ -88,7 +88,7 @@ environment variables. Either on an individual client initialization:
88
88
  ```ruby
89
89
  require "google/cloud/web_risk/v1"
90
90
 
91
- client = Google::Cloud::WebRisk::V1::WebRiskService::Client.new do |config|
91
+ client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new do |config|
92
92
  config.credentials = "path/to/keyfile.json"
93
93
  end
94
94
  ```
@@ -98,11 +98,11 @@ Or configured globally for all clients:
98
98
  ```ruby
99
99
  require "google/cloud/web_risk/v1"
100
100
 
101
- Google::Cloud::WebRisk::V1::WebRiskService::Client.configure do |config|
101
+ ::Google::Cloud::WebRisk::V1::WebRiskService::Client.configure do |config|
102
102
  config.credentials = "path/to/keyfile.json"
103
103
  end
104
104
 
105
- client = Google::Cloud::WebRisk::V1::WebRiskService::Client.new
105
+ client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new
106
106
  ```
107
107
 
108
108
  ### Cloud SDK
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/webrisk.googleapis.com)
21
22
  1. {file:AUTHENTICATION.md Set up authentication.}
22
23
 
23
24
  ## Quick Start
@@ -25,7 +26,7 @@ In order to use this library, you first need to go through the following steps:
25
26
  ```ruby
26
27
  require "google/cloud/web_risk/v1"
27
28
 
28
- client = Google::Cloud::WebRisk::V1::WebRiskService::Client.new
29
+ client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new
29
30
  request = my_create_request
30
31
  response = client.compute_threat_list_diff request
31
32
  ```
@@ -33,6 +34,9 @@ response = client.compute_threat_list_diff request
33
34
  View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-web_risk-v1/latest)
34
35
  for class and method documentation.
35
36
 
37
+ See also the [Product Documentation](https://cloud.google.com/web-risk)
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.
@@ -26,7 +26,7 @@ module Google
26
26
  # To load this package, including all its services, and instantiate a client:
27
27
  #
28
28
  # require "google/cloud/web_risk/v1"
29
- # client = Google::Cloud::WebRisk::V1::WebRiskService::Client.new
29
+ # client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new
30
30
  #
31
31
  module V1
32
32
  end
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module WebRisk
23
23
  module V1
24
- VERSION = "0.1.0"
24
+ VERSION = "0.2.3"
25
25
  end
26
26
  end
27
27
  end
@@ -37,7 +37,7 @@ module Google
37
37
  # To load this service and instantiate a client:
38
38
  #
39
39
  # require "google/cloud/web_risk/v1/web_risk_service"
40
- # client = Google::Cloud::WebRisk::V1::WebRiskService::Client.new
40
+ # client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new
41
41
  #
42
42
  module WebRiskService
43
43
  end
@@ -39,15 +39,15 @@ module Google
39
39
  ##
40
40
  # Configure the WebRiskService Client class.
41
41
  #
42
- # See {Google::Cloud::WebRisk::V1::WebRiskService::Client::Configuration}
42
+ # See {::Google::Cloud::WebRisk::V1::WebRiskService::Client::Configuration}
43
43
  # for a description of the configuration fields.
44
44
  #
45
45
  # ## Example
46
46
  #
47
47
  # To modify the configuration for all WebRiskService clients:
48
48
  #
49
- # Google::Cloud::WebRisk::V1::WebRiskService::Client.configure do |config|
50
- # config.timeout = 10_000
49
+ # ::Google::Cloud::WebRisk::V1::WebRiskService::Client.configure do |config|
50
+ # config.timeout = 10.0
51
51
  # end
52
52
  #
53
53
  # @yield [config] Configure the Client client.
@@ -103,7 +103,7 @@ module Google
103
103
  # but structural changes (adding new fields, etc.) are not allowed. Structural changes
104
104
  # should be made on {Client.configure}.
105
105
  #
106
- # See {Google::Cloud::WebRisk::V1::WebRiskService::Client::Configuration}
106
+ # See {::Google::Cloud::WebRisk::V1::WebRiskService::Client::Configuration}
107
107
  # for a description of the configuration fields.
108
108
  #
109
109
  # @yield [config] Configure the Client client.
@@ -124,13 +124,13 @@ module Google
124
124
  # To create a new WebRiskService client with the default
125
125
  # configuration:
126
126
  #
127
- # client = Google::Cloud::WebRisk::V1::WebRiskService::Client.new
127
+ # client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new
128
128
  #
129
129
  # To create a new WebRiskService client with a custom
130
130
  # configuration:
131
131
  #
132
- # client = Google::Cloud::WebRisk::V1::WebRiskService::Client.new do |config|
133
- # config.timeout = 10_000
132
+ # client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new do |config|
133
+ # config.timeout = 10.0
134
134
  # end
135
135
  #
136
136
  # @yield [config] Configure the WebRiskService client.
@@ -155,10 +155,11 @@ module Google
155
155
  if credentials.is_a?(String) || credentials.is_a?(Hash)
156
156
  credentials = Credentials.new credentials, scope: @config.scope
157
157
  end
158
- @quota_project_id = credentials.respond_to?(:quota_project_id) ? credentials.quota_project_id : nil
158
+ @quota_project_id = @config.quota_project
159
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
159
160
 
160
- @web_risk_service_stub = Gapic::ServiceStub.new(
161
- Google::Cloud::WebRisk::V1::WebRiskService::Stub,
161
+ @web_risk_service_stub = ::Gapic::ServiceStub.new(
162
+ ::Google::Cloud::WebRisk::V1::WebRiskService::Stub,
162
163
  credentials: credentials,
163
164
  endpoint: @config.endpoint,
164
165
  channel_args: @config.channel_args,
@@ -178,12 +179,12 @@ module Google
178
179
  #
179
180
  # @overload compute_threat_list_diff(request, options = nil)
180
181
  # Pass arguments to `compute_threat_list_diff` via a request object, either of type
181
- # {Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest} or an equivalent Hash.
182
+ # {::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest} or an equivalent Hash.
182
183
  #
183
- # @param request [Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest, Hash]
184
+ # @param request [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest, ::Hash]
184
185
  # A request object representing the call parameters. Required. To specify no
185
186
  # parameters, or to keep all the default parameter values, pass an empty Hash.
186
- # @param options [Gapic::CallOptions, Hash]
187
+ # @param options [::Gapic::CallOptions, ::Hash]
187
188
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
188
189
  #
189
190
  # @overload compute_threat_list_diff(threat_type: nil, version_token: nil, constraints: nil)
@@ -191,38 +192,38 @@ module Google
191
192
  # least one keyword argument is required. To specify no parameters, or to keep all
192
193
  # the default parameter values, pass an empty Hash as a request object (see above).
193
194
  #
194
- # @param threat_type [Google::Cloud::WebRisk::V1::ThreatType]
195
+ # @param threat_type [::Google::Cloud::WebRisk::V1::ThreatType]
195
196
  # Required. The threat list to update. Only a single ThreatType should be specified.
196
- # @param version_token [String]
197
+ # @param version_token [::String]
197
198
  # The current version token of the client for the requested list (the
198
199
  # client version that was received from the last successful diff).
199
200
  # If the client does not have a version token (this is the first time calling
200
201
  # ComputeThreatListDiff), this may be left empty and a full database
201
202
  # snapshot will be returned.
202
- # @param constraints [Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest::Constraints, Hash]
203
+ # @param constraints [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest::Constraints, ::Hash]
203
204
  # Required. The constraints associated with this request.
204
205
  #
205
206
  # @yield [response, operation] Access the result along with the RPC operation
206
- # @yieldparam response [Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse]
207
- # @yieldparam operation [GRPC::ActiveCall::Operation]
207
+ # @yieldparam response [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse]
208
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
208
209
  #
209
- # @return [Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse]
210
+ # @return [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse]
210
211
  #
211
- # @raise [Google::Cloud::Error] if the RPC is aborted.
212
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
212
213
  #
213
214
  def compute_threat_list_diff request, options = nil
214
- raise ArgumentError, "request must be provided" if request.nil?
215
+ raise ::ArgumentError, "request must be provided" if request.nil?
215
216
 
216
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest
217
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest
217
218
 
218
219
  # Converts hash and nil to an options object
219
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
220
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
220
221
 
221
222
  # Customize the options with defaults
222
223
  metadata = @config.rpcs.compute_threat_list_diff.metadata.to_h
223
224
 
224
225
  # Set x-goog-api-client and x-goog-user-project headers
225
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
226
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
226
227
  lib_name: @config.lib_name, lib_version: @config.lib_version,
227
228
  gapic_version: ::Google::Cloud::WebRisk::V1::VERSION
228
229
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -237,8 +238,8 @@ module Google
237
238
  yield response, operation if block_given?
238
239
  return response
239
240
  end
240
- rescue GRPC::BadStatus => e
241
- raise Google::Cloud::Error.from_error(e)
241
+ rescue ::GRPC::BadStatus => e
242
+ raise ::Google::Cloud::Error.from_error(e)
242
243
  end
243
244
 
244
245
  ##
@@ -250,12 +251,12 @@ module Google
250
251
  #
251
252
  # @overload search_uris(request, options = nil)
252
253
  # Pass arguments to `search_uris` via a request object, either of type
253
- # {Google::Cloud::WebRisk::V1::SearchUrisRequest} or an equivalent Hash.
254
+ # {::Google::Cloud::WebRisk::V1::SearchUrisRequest} or an equivalent Hash.
254
255
  #
255
- # @param request [Google::Cloud::WebRisk::V1::SearchUrisRequest, Hash]
256
+ # @param request [::Google::Cloud::WebRisk::V1::SearchUrisRequest, ::Hash]
256
257
  # A request object representing the call parameters. Required. To specify no
257
258
  # parameters, or to keep all the default parameter values, pass an empty Hash.
258
- # @param options [Gapic::CallOptions, Hash]
259
+ # @param options [::Gapic::CallOptions, ::Hash]
259
260
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
260
261
  #
261
262
  # @overload search_uris(uri: nil, threat_types: nil)
@@ -263,32 +264,32 @@ module Google
263
264
  # least one keyword argument is required. To specify no parameters, or to keep all
264
265
  # the default parameter values, pass an empty Hash as a request object (see above).
265
266
  #
266
- # @param uri [String]
267
+ # @param uri [::String]
267
268
  # Required. The URI to be checked for matches.
268
- # @param threat_types [Array<Google::Cloud::WebRisk::V1::ThreatType>]
269
+ # @param threat_types [::Array<::Google::Cloud::WebRisk::V1::ThreatType>]
269
270
  # Required. The ThreatLists to search in. Multiple ThreatLists may be specified.
270
271
  #
271
272
  # @yield [response, operation] Access the result along with the RPC operation
272
- # @yieldparam response [Google::Cloud::WebRisk::V1::SearchUrisResponse]
273
- # @yieldparam operation [GRPC::ActiveCall::Operation]
273
+ # @yieldparam response [::Google::Cloud::WebRisk::V1::SearchUrisResponse]
274
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
274
275
  #
275
- # @return [Google::Cloud::WebRisk::V1::SearchUrisResponse]
276
+ # @return [::Google::Cloud::WebRisk::V1::SearchUrisResponse]
276
277
  #
277
- # @raise [Google::Cloud::Error] if the RPC is aborted.
278
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
278
279
  #
279
280
  def search_uris request, options = nil
280
- raise ArgumentError, "request must be provided" if request.nil?
281
+ raise ::ArgumentError, "request must be provided" if request.nil?
281
282
 
282
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::WebRisk::V1::SearchUrisRequest
283
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1::SearchUrisRequest
283
284
 
284
285
  # Converts hash and nil to an options object
285
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
286
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
286
287
 
287
288
  # Customize the options with defaults
288
289
  metadata = @config.rpcs.search_uris.metadata.to_h
289
290
 
290
291
  # Set x-goog-api-client and x-goog-user-project headers
291
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
292
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
292
293
  lib_name: @config.lib_name, lib_version: @config.lib_version,
293
294
  gapic_version: ::Google::Cloud::WebRisk::V1::VERSION
294
295
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -303,8 +304,8 @@ module Google
303
304
  yield response, operation if block_given?
304
305
  return response
305
306
  end
306
- rescue GRPC::BadStatus => e
307
- raise Google::Cloud::Error.from_error(e)
307
+ rescue ::GRPC::BadStatus => e
308
+ raise ::Google::Cloud::Error.from_error(e)
308
309
  end
309
310
 
310
311
  ##
@@ -316,12 +317,12 @@ module Google
316
317
  #
317
318
  # @overload search_hashes(request, options = nil)
318
319
  # Pass arguments to `search_hashes` via a request object, either of type
319
- # {Google::Cloud::WebRisk::V1::SearchHashesRequest} or an equivalent Hash.
320
+ # {::Google::Cloud::WebRisk::V1::SearchHashesRequest} or an equivalent Hash.
320
321
  #
321
- # @param request [Google::Cloud::WebRisk::V1::SearchHashesRequest, Hash]
322
+ # @param request [::Google::Cloud::WebRisk::V1::SearchHashesRequest, ::Hash]
322
323
  # A request object representing the call parameters. Required. To specify no
323
324
  # parameters, or to keep all the default parameter values, pass an empty Hash.
324
- # @param options [Gapic::CallOptions, Hash]
325
+ # @param options [::Gapic::CallOptions, ::Hash]
325
326
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
326
327
  #
327
328
  # @overload search_hashes(hash_prefix: nil, threat_types: nil)
@@ -329,33 +330,33 @@ module Google
329
330
  # least one keyword argument is required. To specify no parameters, or to keep all
330
331
  # the default parameter values, pass an empty Hash as a request object (see above).
331
332
  #
332
- # @param hash_prefix [String]
333
+ # @param hash_prefix [::String]
333
334
  # A hash prefix, consisting of the most significant 4-32 bytes of a SHA256
334
335
  # hash. For JSON requests, this field is base64-encoded.
335
- # @param threat_types [Array<Google::Cloud::WebRisk::V1::ThreatType>]
336
+ # @param threat_types [::Array<::Google::Cloud::WebRisk::V1::ThreatType>]
336
337
  # Required. The ThreatLists to search in. Multiple ThreatLists may be specified.
337
338
  #
338
339
  # @yield [response, operation] Access the result along with the RPC operation
339
- # @yieldparam response [Google::Cloud::WebRisk::V1::SearchHashesResponse]
340
- # @yieldparam operation [GRPC::ActiveCall::Operation]
340
+ # @yieldparam response [::Google::Cloud::WebRisk::V1::SearchHashesResponse]
341
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
341
342
  #
342
- # @return [Google::Cloud::WebRisk::V1::SearchHashesResponse]
343
+ # @return [::Google::Cloud::WebRisk::V1::SearchHashesResponse]
343
344
  #
344
- # @raise [Google::Cloud::Error] if the RPC is aborted.
345
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
345
346
  #
346
347
  def search_hashes request, options = nil
347
- raise ArgumentError, "request must be provided" if request.nil?
348
+ raise ::ArgumentError, "request must be provided" if request.nil?
348
349
 
349
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::WebRisk::V1::SearchHashesRequest
350
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1::SearchHashesRequest
350
351
 
351
352
  # Converts hash and nil to an options object
352
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
353
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
353
354
 
354
355
  # Customize the options with defaults
355
356
  metadata = @config.rpcs.search_hashes.metadata.to_h
356
357
 
357
358
  # Set x-goog-api-client and x-goog-user-project headers
358
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
359
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
359
360
  lib_name: @config.lib_name, lib_version: @config.lib_version,
360
361
  gapic_version: ::Google::Cloud::WebRisk::V1::VERSION
361
362
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -370,8 +371,8 @@ module Google
370
371
  yield response, operation if block_given?
371
372
  return response
372
373
  end
373
- rescue GRPC::BadStatus => e
374
- raise Google::Cloud::Error.from_error(e)
374
+ rescue ::GRPC::BadStatus => e
375
+ raise ::Google::Cloud::Error.from_error(e)
375
376
  end
376
377
 
377
378
  ##
@@ -384,12 +385,12 @@ module Google
384
385
  #
385
386
  # @overload create_submission(request, options = nil)
386
387
  # Pass arguments to `create_submission` via a request object, either of type
387
- # {Google::Cloud::WebRisk::V1::CreateSubmissionRequest} or an equivalent Hash.
388
+ # {::Google::Cloud::WebRisk::V1::CreateSubmissionRequest} or an equivalent Hash.
388
389
  #
389
- # @param request [Google::Cloud::WebRisk::V1::CreateSubmissionRequest, Hash]
390
+ # @param request [::Google::Cloud::WebRisk::V1::CreateSubmissionRequest, ::Hash]
390
391
  # A request object representing the call parameters. Required. To specify no
391
392
  # parameters, or to keep all the default parameter values, pass an empty Hash.
392
- # @param options [Gapic::CallOptions, Hash]
393
+ # @param options [::Gapic::CallOptions, ::Hash]
393
394
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
394
395
  #
395
396
  # @overload create_submission(parent: nil, submission: nil)
@@ -397,33 +398,33 @@ module Google
397
398
  # least one keyword argument is required. To specify no parameters, or to keep all
398
399
  # the default parameter values, pass an empty Hash as a request object (see above).
399
400
  #
400
- # @param parent [String]
401
+ # @param parent [::String]
401
402
  # Required. The name of the project that is making the submission. This string is in
402
403
  # the format "projects/\\{project_number}".
403
- # @param submission [Google::Cloud::WebRisk::V1::Submission, Hash]
404
+ # @param submission [::Google::Cloud::WebRisk::V1::Submission, ::Hash]
404
405
  # Required. The submission that contains the content of the phishing report.
405
406
  #
406
407
  # @yield [response, operation] Access the result along with the RPC operation
407
- # @yieldparam response [Google::Cloud::WebRisk::V1::Submission]
408
- # @yieldparam operation [GRPC::ActiveCall::Operation]
408
+ # @yieldparam response [::Google::Cloud::WebRisk::V1::Submission]
409
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
409
410
  #
410
- # @return [Google::Cloud::WebRisk::V1::Submission]
411
+ # @return [::Google::Cloud::WebRisk::V1::Submission]
411
412
  #
412
- # @raise [Google::Cloud::Error] if the RPC is aborted.
413
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
413
414
  #
414
415
  def create_submission request, options = nil
415
- raise ArgumentError, "request must be provided" if request.nil?
416
+ raise ::ArgumentError, "request must be provided" if request.nil?
416
417
 
417
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::WebRisk::V1::CreateSubmissionRequest
418
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1::CreateSubmissionRequest
418
419
 
419
420
  # Converts hash and nil to an options object
420
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
421
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
421
422
 
422
423
  # Customize the options with defaults
423
424
  metadata = @config.rpcs.create_submission.metadata.to_h
424
425
 
425
426
  # Set x-goog-api-client and x-goog-user-project headers
426
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
427
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
427
428
  lib_name: @config.lib_name, lib_version: @config.lib_version,
428
429
  gapic_version: ::Google::Cloud::WebRisk::V1::VERSION
429
430
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -444,8 +445,8 @@ module Google
444
445
  yield response, operation if block_given?
445
446
  return response
446
447
  end
447
- rescue GRPC::BadStatus => e
448
- raise Google::Cloud::Error.from_error(e)
448
+ rescue ::GRPC::BadStatus => e
449
+ raise ::Google::Cloud::Error.from_error(e)
449
450
  end
450
451
 
451
452
  ##
@@ -455,7 +456,7 @@ module Google
455
456
  # providing control over timeouts, retry behavior, logging, transport
456
457
  # parameters, and other low-level controls. Certain parameters can also be
457
458
  # applied individually to specific RPCs. See
458
- # {Google::Cloud::WebRisk::V1::WebRiskService::Client::Configuration::Rpcs}
459
+ # {::Google::Cloud::WebRisk::V1::WebRiskService::Client::Configuration::Rpcs}
459
460
  # for a list of RPCs that can be configured independently.
460
461
  #
461
462
  # Configuration can be applied globally to all clients, or to a single client
@@ -466,22 +467,22 @@ module Google
466
467
  # To modify the global config, setting the timeout for compute_threat_list_diff
467
468
  # to 20 seconds, and all remaining timeouts to 10 seconds:
468
469
  #
469
- # Google::Cloud::WebRisk::V1::WebRiskService::Client.configure do |config|
470
- # config.timeout = 10_000
471
- # config.rpcs.compute_threat_list_diff.timeout = 20_000
470
+ # ::Google::Cloud::WebRisk::V1::WebRiskService::Client.configure do |config|
471
+ # config.timeout = 10.0
472
+ # config.rpcs.compute_threat_list_diff.timeout = 20.0
472
473
  # end
473
474
  #
474
475
  # To apply the above configuration only to a new client:
475
476
  #
476
- # client = Google::Cloud::WebRisk::V1::WebRiskService::Client.new do |config|
477
- # config.timeout = 10_000
478
- # config.rpcs.compute_threat_list_diff.timeout = 20_000
477
+ # client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new do |config|
478
+ # config.timeout = 10.0
479
+ # config.rpcs.compute_threat_list_diff.timeout = 20.0
479
480
  # end
480
481
  #
481
482
  # @!attribute [rw] endpoint
482
483
  # The hostname or hostname:port of the service endpoint.
483
484
  # Defaults to `"webrisk.googleapis.com"`.
484
- # @return [String]
485
+ # @return [::String]
485
486
  # @!attribute [rw] credentials
486
487
  # Credentials to send with calls. You may provide any of the following types:
487
488
  # * (`String`) The path to a service account key file in JSON format
@@ -493,29 +494,29 @@ module Google
493
494
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
494
495
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
495
496
  # * (`nil`) indicating no credentials
496
- # @return [Object]
497
+ # @return [::Object]
497
498
  # @!attribute [rw] scope
498
499
  # The OAuth scopes
499
- # @return [Array<String>]
500
+ # @return [::Array<::String>]
500
501
  # @!attribute [rw] lib_name
501
502
  # The library name as recorded in instrumentation and logging
502
- # @return [String]
503
+ # @return [::String]
503
504
  # @!attribute [rw] lib_version
504
505
  # The library version as recorded in instrumentation and logging
505
- # @return [String]
506
+ # @return [::String]
506
507
  # @!attribute [rw] channel_args
507
508
  # Extra parameters passed to the gRPC channel. Note: this is ignored if a
508
509
  # `GRPC::Core::Channel` object is provided as the credential.
509
- # @return [Hash]
510
+ # @return [::Hash]
510
511
  # @!attribute [rw] interceptors
511
512
  # An array of interceptors that are run before calls are executed.
512
- # @return [Array<GRPC::ClientInterceptor>]
513
+ # @return [::Array<::GRPC::ClientInterceptor>]
513
514
  # @!attribute [rw] timeout
514
- # The call timeout in milliseconds.
515
- # @return [Numeric]
515
+ # The call timeout in seconds.
516
+ # @return [::Numeric]
516
517
  # @!attribute [rw] metadata
517
518
  # Additional gRPC headers to be sent with the call.
518
- # @return [Hash{Symbol=>String}]
519
+ # @return [::Hash{::Symbol=>::String}]
519
520
  # @!attribute [rw] retry_policy
520
521
  # The retry policy. The value is a hash with the following keys:
521
522
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
@@ -523,25 +524,29 @@ module Google
523
524
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
524
525
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
525
526
  # trigger a retry.
526
- # @return [Hash]
527
+ # @return [::Hash]
528
+ # @!attribute [rw] quota_project
529
+ # A separate project against which to charge quota.
530
+ # @return [::String]
527
531
  #
528
532
  class Configuration
529
- extend Gapic::Config
533
+ extend ::Gapic::Config
530
534
 
531
- config_attr :endpoint, "webrisk.googleapis.com", String
532
- config_attr :credentials, nil do |value|
535
+ config_attr :endpoint, "webrisk.googleapis.com", ::String
536
+ config_attr :credentials, nil do |value|
533
537
  allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
534
538
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
535
539
  allowed.any? { |klass| klass === value }
536
540
  end
537
- config_attr :scope, nil, String, Array, nil
538
- config_attr :lib_name, nil, String, nil
539
- config_attr :lib_version, nil, String, nil
540
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, Hash, nil)
541
- config_attr :interceptors, nil, Array, nil
542
- config_attr :timeout, nil, Numeric, nil
543
- config_attr :metadata, nil, Hash, nil
544
- config_attr :retry_policy, nil, Hash, Proc, nil
541
+ config_attr :scope, nil, ::String, ::Array, nil
542
+ config_attr :lib_name, nil, ::String, nil
543
+ config_attr :lib_version, nil, ::String, nil
544
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
545
+ config_attr :interceptors, nil, ::Array, nil
546
+ config_attr :timeout, nil, ::Numeric, nil
547
+ config_attr :metadata, nil, ::Hash, nil
548
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
549
+ config_attr :quota_project, nil, ::String, nil
545
550
 
546
551
  # @private
547
552
  def initialize parent_config = nil
@@ -557,7 +562,7 @@ module Google
557
562
  def rpcs
558
563
  @rpcs ||= begin
559
564
  parent_rpcs = nil
560
- parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to? :rpcs
565
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
561
566
  Rpcs.new parent_rpcs
562
567
  end
563
568
  end
@@ -582,35 +587,35 @@ module Google
582
587
  class Rpcs
583
588
  ##
584
589
  # RPC-specific configuration for `compute_threat_list_diff`
585
- # @return [Gapic::Config::Method]
590
+ # @return [::Gapic::Config::Method]
586
591
  #
587
592
  attr_reader :compute_threat_list_diff
588
593
  ##
589
594
  # RPC-specific configuration for `search_uris`
590
- # @return [Gapic::Config::Method]
595
+ # @return [::Gapic::Config::Method]
591
596
  #
592
597
  attr_reader :search_uris
593
598
  ##
594
599
  # RPC-specific configuration for `search_hashes`
595
- # @return [Gapic::Config::Method]
600
+ # @return [::Gapic::Config::Method]
596
601
  #
597
602
  attr_reader :search_hashes
598
603
  ##
599
604
  # RPC-specific configuration for `create_submission`
600
- # @return [Gapic::Config::Method]
605
+ # @return [::Gapic::Config::Method]
601
606
  #
602
607
  attr_reader :create_submission
603
608
 
604
609
  # @private
605
610
  def initialize parent_rpcs = nil
606
611
  compute_threat_list_diff_config = parent_rpcs&.compute_threat_list_diff if parent_rpcs&.respond_to? :compute_threat_list_diff
607
- @compute_threat_list_diff = Gapic::Config::Method.new compute_threat_list_diff_config
612
+ @compute_threat_list_diff = ::Gapic::Config::Method.new compute_threat_list_diff_config
608
613
  search_uris_config = parent_rpcs&.search_uris if parent_rpcs&.respond_to? :search_uris
609
- @search_uris = Gapic::Config::Method.new search_uris_config
614
+ @search_uris = ::Gapic::Config::Method.new search_uris_config
610
615
  search_hashes_config = parent_rpcs&.search_hashes if parent_rpcs&.respond_to? :search_hashes
611
- @search_hashes = Gapic::Config::Method.new search_hashes_config
616
+ @search_hashes = ::Gapic::Config::Method.new search_hashes_config
612
617
  create_submission_config = parent_rpcs&.create_submission if parent_rpcs&.respond_to? :create_submission
613
- @create_submission = Gapic::Config::Method.new create_submission_config
618
+ @create_submission = ::Gapic::Config::Method.new create_submission_config
614
619
 
615
620
  yield self if block_given?
616
621
  end
@@ -24,7 +24,7 @@ module Google
24
24
  module V1
25
25
  module WebRiskService
26
26
  # Credentials for the WebRiskService API.
27
- class Credentials < Google::Auth::Credentials
27
+ class Credentials < ::Google::Auth::Credentials
28
28
  self.scope = [
29
29
  "https://www.googleapis.com/auth/cloud-platform"
30
30
  ]
@@ -33,7 +33,7 @@ module Google
33
33
  #
34
34
  # @param project [String]
35
35
  #
36
- # @return [String]
36
+ # @return [::String]
37
37
  def project_path project:
38
38
  "projects/#{project}"
39
39
  end
@@ -128,7 +128,7 @@ module Google
128
128
  # - pattern: "shelves/{shelf}"
129
129
  # parent_type: "cloudresourcemanager.googleapis.com/Folder"
130
130
  # @!attribute [rw] type
131
- # @return [String]
131
+ # @return [::String]
132
132
  # The resource type. It must be in the format of
133
133
  # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be
134
134
  # singular and must not include version numbers.
@@ -140,7 +140,7 @@ module Google
140
140
  # should use PascalCase (UpperCamelCase). The maximum number of
141
141
  # characters allowed for the `resource_type_kind` is 100.
142
142
  # @!attribute [rw] pattern
143
- # @return [Array<String>]
143
+ # @return [::Array<::String>]
144
144
  # Optional. The relative resource name pattern associated with this resource
145
145
  # type. The DNS prefix of the full resource name shouldn't be specified here.
146
146
  #
@@ -161,11 +161,11 @@ module Google
161
161
  # the same component name (e.g. "project") refers to IDs of the same
162
162
  # type of resource.
163
163
  # @!attribute [rw] name_field
164
- # @return [String]
164
+ # @return [::String]
165
165
  # Optional. The field on the resource that designates the resource name
166
166
  # field. If omitted, this is assumed to be "name".
167
167
  # @!attribute [rw] history
168
- # @return [Google::Api::ResourceDescriptor::History]
168
+ # @return [::Google::Api::ResourceDescriptor::History]
169
169
  # Optional. The historical or future-looking state of the resource pattern.
170
170
  #
171
171
  # Example:
@@ -182,19 +182,19 @@ module Google
182
182
  # };
183
183
  # }
184
184
  # @!attribute [rw] plural
185
- # @return [String]
185
+ # @return [::String]
186
186
  # The plural name used in the resource name, such as 'projects' for
187
187
  # the name of 'projects/\\{project}'. It is the same concept of the `plural`
188
188
  # field in k8s CRD spec
189
189
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
190
190
  # @!attribute [rw] singular
191
- # @return [String]
191
+ # @return [::String]
192
192
  # The same concept of the `singular` field in k8s CRD spec
193
193
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
194
194
  # Such as "project" for the `resourcemanager.googleapis.com/Project` type.
195
195
  class ResourceDescriptor
196
- include Google::Protobuf::MessageExts
197
- extend Google::Protobuf::MessageExts::ClassMethods
196
+ include ::Google::Protobuf::MessageExts
197
+ extend ::Google::Protobuf::MessageExts::ClassMethods
198
198
 
199
199
  # A description of the historical or future-looking state of the
200
200
  # resource pattern.
@@ -216,7 +216,7 @@ module Google
216
216
  # Defines a proto annotation that describes a string field that refers to
217
217
  # an API resource.
218
218
  # @!attribute [rw] type
219
- # @return [String]
219
+ # @return [::String]
220
220
  # The resource type that the annotated field references.
221
221
  #
222
222
  # Example:
@@ -227,7 +227,7 @@ module Google
227
227
  # }];
228
228
  # }
229
229
  # @!attribute [rw] child_type
230
- # @return [String]
230
+ # @return [::String]
231
231
  # The resource type of a child collection that the annotated field
232
232
  # references. This is useful for annotating the `parent` field that
233
233
  # doesn't have a fixed resource type.
@@ -240,8 +240,8 @@ module Google
240
240
  # };
241
241
  # }
242
242
  class ResourceReference
243
- include Google::Protobuf::MessageExts
244
- extend Google::Protobuf::MessageExts::ClassMethods
243
+ include ::Google::Protobuf::MessageExts
244
+ extend ::Google::Protobuf::MessageExts::ClassMethods
245
245
  end
246
246
  end
247
247
  end
@@ -23,82 +23,82 @@ module Google
23
23
  module V1
24
24
  # Describes an API diff request.
25
25
  # @!attribute [rw] threat_type
26
- # @return [Google::Cloud::WebRisk::V1::ThreatType]
26
+ # @return [::Google::Cloud::WebRisk::V1::ThreatType]
27
27
  # Required. The threat list to update. Only a single ThreatType should be specified.
28
28
  # @!attribute [rw] version_token
29
- # @return [String]
29
+ # @return [::String]
30
30
  # The current version token of the client for the requested list (the
31
31
  # client version that was received from the last successful diff).
32
32
  # If the client does not have a version token (this is the first time calling
33
33
  # ComputeThreatListDiff), this may be left empty and a full database
34
34
  # snapshot will be returned.
35
35
  # @!attribute [rw] constraints
36
- # @return [Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest::Constraints]
36
+ # @return [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest::Constraints]
37
37
  # Required. The constraints associated with this request.
38
38
  class ComputeThreatListDiffRequest
39
- include Google::Protobuf::MessageExts
40
- extend Google::Protobuf::MessageExts::ClassMethods
39
+ include ::Google::Protobuf::MessageExts
40
+ extend ::Google::Protobuf::MessageExts::ClassMethods
41
41
 
42
42
  # The constraints for this diff.
43
43
  # @!attribute [rw] max_diff_entries
44
- # @return [Integer]
44
+ # @return [::Integer]
45
45
  # The maximum size in number of entries. The diff will not contain more
46
46
  # entries than this value. This should be a power of 2 between 2**10 and
47
47
  # 2**20. If zero, no diff size limit is set.
48
48
  # @!attribute [rw] max_database_entries
49
- # @return [Integer]
49
+ # @return [::Integer]
50
50
  # Sets the maximum number of entries that the client is willing to have
51
51
  # in the local database. This should be a power of 2 between 2**10 and
52
52
  # 2**20. If zero, no database size limit is set.
53
53
  # @!attribute [rw] supported_compressions
54
- # @return [Array<Google::Cloud::WebRisk::V1::CompressionType>]
54
+ # @return [::Array<::Google::Cloud::WebRisk::V1::CompressionType>]
55
55
  # The compression types supported by the client.
56
56
  class Constraints
57
- include Google::Protobuf::MessageExts
58
- extend Google::Protobuf::MessageExts::ClassMethods
57
+ include ::Google::Protobuf::MessageExts
58
+ extend ::Google::Protobuf::MessageExts::ClassMethods
59
59
  end
60
60
  end
61
61
 
62
62
  # @!attribute [rw] response_type
63
- # @return [Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse::ResponseType]
63
+ # @return [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse::ResponseType]
64
64
  # The type of response. This may indicate that an action must be taken by the
65
65
  # client when the response is received.
66
66
  # @!attribute [rw] additions
67
- # @return [Google::Cloud::WebRisk::V1::ThreatEntryAdditions]
67
+ # @return [::Google::Cloud::WebRisk::V1::ThreatEntryAdditions]
68
68
  # A set of entries to add to a local threat type's list.
69
69
  # @!attribute [rw] removals
70
- # @return [Google::Cloud::WebRisk::V1::ThreatEntryRemovals]
70
+ # @return [::Google::Cloud::WebRisk::V1::ThreatEntryRemovals]
71
71
  # A set of entries to remove from a local threat type's list.
72
72
  # This field may be empty.
73
73
  # @!attribute [rw] new_version_token
74
- # @return [String]
74
+ # @return [::String]
75
75
  # The new opaque client version token. This should be retained by the client
76
76
  # and passed into the next call of ComputeThreatListDiff as 'version_token'.
77
77
  # A separate version token should be stored and used for each threatList.
78
78
  # @!attribute [rw] checksum
79
- # @return [Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse::Checksum]
79
+ # @return [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse::Checksum]
80
80
  # The expected SHA256 hash of the client state; that is, of the sorted list
81
81
  # of all hashes present in the database after applying the provided diff.
82
82
  # If the client state doesn't match the expected state, the client must
83
83
  # discard this diff and retry later.
84
84
  # @!attribute [rw] recommended_next_diff
85
- # @return [Google::Protobuf::Timestamp]
85
+ # @return [::Google::Protobuf::Timestamp]
86
86
  # The soonest the client should wait before issuing any diff
87
87
  # request. Querying sooner is unlikely to produce a meaningful diff.
88
88
  # Waiting longer is acceptable considering the use case.
89
89
  # If this field is not set clients may update as soon as they want.
90
90
  class ComputeThreatListDiffResponse
91
- include Google::Protobuf::MessageExts
92
- extend Google::Protobuf::MessageExts::ClassMethods
91
+ include ::Google::Protobuf::MessageExts
92
+ extend ::Google::Protobuf::MessageExts::ClassMethods
93
93
 
94
94
  # The expected state of a client's local database.
95
95
  # @!attribute [rw] sha256
96
- # @return [String]
96
+ # @return [::String]
97
97
  # The SHA256 hash of the client state; that is, of the sorted list of all
98
98
  # hashes present in the database.
99
99
  class Checksum
100
- include Google::Protobuf::MessageExts
101
- extend Google::Protobuf::MessageExts::ClassMethods
100
+ include ::Google::Protobuf::MessageExts
101
+ extend ::Google::Protobuf::MessageExts::ClassMethods
102
102
  end
103
103
 
104
104
  # The type of response sent to the client.
@@ -118,119 +118,119 @@ module Google
118
118
 
119
119
  # Request to check URI entries against threatLists.
120
120
  # @!attribute [rw] uri
121
- # @return [String]
121
+ # @return [::String]
122
122
  # Required. The URI to be checked for matches.
123
123
  # @!attribute [rw] threat_types
124
- # @return [Array<Google::Cloud::WebRisk::V1::ThreatType>]
124
+ # @return [::Array<::Google::Cloud::WebRisk::V1::ThreatType>]
125
125
  # Required. The ThreatLists to search in. Multiple ThreatLists may be specified.
126
126
  class SearchUrisRequest
127
- include Google::Protobuf::MessageExts
128
- extend Google::Protobuf::MessageExts::ClassMethods
127
+ include ::Google::Protobuf::MessageExts
128
+ extend ::Google::Protobuf::MessageExts::ClassMethods
129
129
  end
130
130
 
131
131
  # @!attribute [rw] threat
132
- # @return [Google::Cloud::WebRisk::V1::SearchUrisResponse::ThreatUri]
132
+ # @return [::Google::Cloud::WebRisk::V1::SearchUrisResponse::ThreatUri]
133
133
  # The threat list matches. This may be empty if the URI is on no list.
134
134
  class SearchUrisResponse
135
- include Google::Protobuf::MessageExts
136
- extend Google::Protobuf::MessageExts::ClassMethods
135
+ include ::Google::Protobuf::MessageExts
136
+ extend ::Google::Protobuf::MessageExts::ClassMethods
137
137
 
138
138
  # Contains threat information on a matching uri.
139
139
  # @!attribute [rw] threat_types
140
- # @return [Array<Google::Cloud::WebRisk::V1::ThreatType>]
140
+ # @return [::Array<::Google::Cloud::WebRisk::V1::ThreatType>]
141
141
  # The ThreatList this threat belongs to.
142
142
  # @!attribute [rw] expire_time
143
- # @return [Google::Protobuf::Timestamp]
143
+ # @return [::Google::Protobuf::Timestamp]
144
144
  # The cache lifetime for the returned match. Clients must not cache this
145
145
  # response past this timestamp to avoid false positives.
146
146
  class ThreatUri
147
- include Google::Protobuf::MessageExts
148
- extend Google::Protobuf::MessageExts::ClassMethods
147
+ include ::Google::Protobuf::MessageExts
148
+ extend ::Google::Protobuf::MessageExts::ClassMethods
149
149
  end
150
150
  end
151
151
 
152
152
  # Request to return full hashes matched by the provided hash prefixes.
153
153
  # @!attribute [rw] hash_prefix
154
- # @return [String]
154
+ # @return [::String]
155
155
  # A hash prefix, consisting of the most significant 4-32 bytes of a SHA256
156
156
  # hash. For JSON requests, this field is base64-encoded.
157
157
  # @!attribute [rw] threat_types
158
- # @return [Array<Google::Cloud::WebRisk::V1::ThreatType>]
158
+ # @return [::Array<::Google::Cloud::WebRisk::V1::ThreatType>]
159
159
  # Required. The ThreatLists to search in. Multiple ThreatLists may be specified.
160
160
  class SearchHashesRequest
161
- include Google::Protobuf::MessageExts
162
- extend Google::Protobuf::MessageExts::ClassMethods
161
+ include ::Google::Protobuf::MessageExts
162
+ extend ::Google::Protobuf::MessageExts::ClassMethods
163
163
  end
164
164
 
165
165
  # @!attribute [rw] threats
166
- # @return [Array<Google::Cloud::WebRisk::V1::SearchHashesResponse::ThreatHash>]
166
+ # @return [::Array<::Google::Cloud::WebRisk::V1::SearchHashesResponse::ThreatHash>]
167
167
  # The full hashes that matched the requested prefixes.
168
168
  # The hash will be populated in the key.
169
169
  # @!attribute [rw] negative_expire_time
170
- # @return [Google::Protobuf::Timestamp]
170
+ # @return [::Google::Protobuf::Timestamp]
171
171
  # For requested entities that did not match the threat list, how long to
172
172
  # cache the response until.
173
173
  class SearchHashesResponse
174
- include Google::Protobuf::MessageExts
175
- extend Google::Protobuf::MessageExts::ClassMethods
174
+ include ::Google::Protobuf::MessageExts
175
+ extend ::Google::Protobuf::MessageExts::ClassMethods
176
176
 
177
177
  # Contains threat information on a matching hash.
178
178
  # @!attribute [rw] threat_types
179
- # @return [Array<Google::Cloud::WebRisk::V1::ThreatType>]
179
+ # @return [::Array<::Google::Cloud::WebRisk::V1::ThreatType>]
180
180
  # The ThreatList this threat belongs to.
181
181
  # This must contain at least one entry.
182
182
  # @!attribute [rw] hash
183
- # @return [String]
183
+ # @return [::String]
184
184
  # A 32 byte SHA256 hash. This field is in binary format. For JSON
185
185
  # requests, hashes are base64-encoded.
186
186
  # @!attribute [rw] expire_time
187
- # @return [Google::Protobuf::Timestamp]
187
+ # @return [::Google::Protobuf::Timestamp]
188
188
  # The cache lifetime for the returned match. Clients must not cache this
189
189
  # response past this timestamp to avoid false positives.
190
190
  class ThreatHash
191
- include Google::Protobuf::MessageExts
192
- extend Google::Protobuf::MessageExts::ClassMethods
191
+ include ::Google::Protobuf::MessageExts
192
+ extend ::Google::Protobuf::MessageExts::ClassMethods
193
193
  end
194
194
  end
195
195
 
196
196
  # Contains the set of entries to add to a local database.
197
197
  # May contain a combination of compressed and raw data in a single response.
198
198
  # @!attribute [rw] raw_hashes
199
- # @return [Array<Google::Cloud::WebRisk::V1::RawHashes>]
199
+ # @return [::Array<::Google::Cloud::WebRisk::V1::RawHashes>]
200
200
  # The raw SHA256-formatted entries.
201
201
  # Repeated to allow returning sets of hashes with different prefix sizes.
202
202
  # @!attribute [rw] rice_hashes
203
- # @return [Google::Cloud::WebRisk::V1::RiceDeltaEncoding]
203
+ # @return [::Google::Cloud::WebRisk::V1::RiceDeltaEncoding]
204
204
  # The encoded 4-byte prefixes of SHA256-formatted entries, using a
205
205
  # Golomb-Rice encoding. The hashes are converted to uint32, sorted in
206
206
  # ascending order, then delta encoded and stored as encoded_data.
207
207
  class ThreatEntryAdditions
208
- include Google::Protobuf::MessageExts
209
- extend Google::Protobuf::MessageExts::ClassMethods
208
+ include ::Google::Protobuf::MessageExts
209
+ extend ::Google::Protobuf::MessageExts::ClassMethods
210
210
  end
211
211
 
212
212
  # Contains the set of entries to remove from a local database.
213
213
  # @!attribute [rw] raw_indices
214
- # @return [Google::Cloud::WebRisk::V1::RawIndices]
214
+ # @return [::Google::Cloud::WebRisk::V1::RawIndices]
215
215
  # The raw removal indices for a local list.
216
216
  # @!attribute [rw] rice_indices
217
- # @return [Google::Cloud::WebRisk::V1::RiceDeltaEncoding]
217
+ # @return [::Google::Cloud::WebRisk::V1::RiceDeltaEncoding]
218
218
  # The encoded local, lexicographically-sorted list indices, using a
219
219
  # Golomb-Rice encoding. Used for sending compressed removal indices. The
220
220
  # removal indices (uint32) are sorted in ascending order, then delta encoded
221
221
  # and stored as encoded_data.
222
222
  class ThreatEntryRemovals
223
- include Google::Protobuf::MessageExts
224
- extend Google::Protobuf::MessageExts::ClassMethods
223
+ include ::Google::Protobuf::MessageExts
224
+ extend ::Google::Protobuf::MessageExts::ClassMethods
225
225
  end
226
226
 
227
227
  # A set of raw indices to remove from a local list.
228
228
  # @!attribute [rw] indices
229
- # @return [Array<Integer>]
229
+ # @return [::Array<::Integer>]
230
230
  # The indices to remove from a lexicographically-sorted local list.
231
231
  class RawIndices
232
- include Google::Protobuf::MessageExts
233
- extend Google::Protobuf::MessageExts::ClassMethods
232
+ include ::Google::Protobuf::MessageExts
233
+ extend ::Google::Protobuf::MessageExts::ClassMethods
234
234
  end
235
235
 
236
236
  # The uncompressed threat entries in hash format.
@@ -242,64 +242,64 @@ module Google
242
242
  # compression, or when sending non-4-byte hashes to clients that do support
243
243
  # compression.
244
244
  # @!attribute [rw] prefix_size
245
- # @return [Integer]
245
+ # @return [::Integer]
246
246
  # The number of bytes for each prefix encoded below. This field can be
247
247
  # anywhere from 4 (shortest prefix) to 32 (full SHA256 hash).
248
248
  # In practice this is almost always 4, except in exceptional circumstances.
249
249
  # @!attribute [rw] raw_hashes
250
- # @return [String]
250
+ # @return [::String]
251
251
  # The hashes, in binary format, concatenated into one long string. Hashes are
252
252
  # sorted in lexicographic order. For JSON API users, hashes are
253
253
  # base64-encoded.
254
254
  class RawHashes
255
- include Google::Protobuf::MessageExts
256
- extend Google::Protobuf::MessageExts::ClassMethods
255
+ include ::Google::Protobuf::MessageExts
256
+ extend ::Google::Protobuf::MessageExts::ClassMethods
257
257
  end
258
258
 
259
259
  # The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or
260
260
  # compressed removal indices.
261
261
  # @!attribute [rw] first_value
262
- # @return [Integer]
262
+ # @return [::Integer]
263
263
  # The offset of the first entry in the encoded data, or, if only a single
264
264
  # integer was encoded, that single integer's value. If the field is empty or
265
265
  # missing, assume zero.
266
266
  # @!attribute [rw] rice_parameter
267
- # @return [Integer]
267
+ # @return [::Integer]
268
268
  # The Golomb-Rice parameter, which is a number between 2 and 28. This field
269
269
  # is missing (that is, zero) if `num_entries` is zero.
270
270
  # @!attribute [rw] entry_count
271
- # @return [Integer]
271
+ # @return [::Integer]
272
272
  # The number of entries that are delta encoded in the encoded data. If only a
273
273
  # single integer was encoded, this will be zero and the single value will be
274
274
  # stored in `first_value`.
275
275
  # @!attribute [rw] encoded_data
276
- # @return [String]
276
+ # @return [::String]
277
277
  # The encoded deltas that are encoded using the Golomb-Rice coder.
278
278
  class RiceDeltaEncoding
279
- include Google::Protobuf::MessageExts
280
- extend Google::Protobuf::MessageExts::ClassMethods
279
+ include ::Google::Protobuf::MessageExts
280
+ extend ::Google::Protobuf::MessageExts::ClassMethods
281
281
  end
282
282
 
283
283
  # Wraps a URI that might be displaying phishing content.
284
284
  # @!attribute [rw] uri
285
- # @return [String]
285
+ # @return [::String]
286
286
  # Required. The URI that is being reported for phishing content to be analyzed.
287
287
  class Submission
288
- include Google::Protobuf::MessageExts
289
- extend Google::Protobuf::MessageExts::ClassMethods
288
+ include ::Google::Protobuf::MessageExts
289
+ extend ::Google::Protobuf::MessageExts::ClassMethods
290
290
  end
291
291
 
292
292
  # Request to send a potentially phishy URI to WebRisk.
293
293
  # @!attribute [rw] parent
294
- # @return [String]
294
+ # @return [::String]
295
295
  # Required. The name of the project that is making the submission. This string is in
296
296
  # the format "projects/\\{project_number}".
297
297
  # @!attribute [rw] submission
298
- # @return [Google::Cloud::WebRisk::V1::Submission]
298
+ # @return [::Google::Cloud::WebRisk::V1::Submission]
299
299
  # Required. The submission that contains the content of the phishing report.
300
300
  class CreateSubmissionRequest
301
- include Google::Protobuf::MessageExts
302
- extend Google::Protobuf::MessageExts::ClassMethods
301
+ include ::Google::Protobuf::MessageExts
302
+ extend ::Google::Protobuf::MessageExts::ClassMethods
303
303
  end
304
304
 
305
305
  # The type of threat. This maps dirrectly to the threat list a threat may
@@ -102,19 +102,19 @@ module Google
102
102
  # http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
103
103
  # ) to obtain a formatter capable of generating timestamps in this format.
104
104
  # @!attribute [rw] seconds
105
- # @return [Integer]
105
+ # @return [::Integer]
106
106
  # Represents seconds of UTC time since Unix epoch
107
107
  # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
108
108
  # 9999-12-31T23:59:59Z inclusive.
109
109
  # @!attribute [rw] nanos
110
- # @return [Integer]
110
+ # @return [::Integer]
111
111
  # Non-negative fractions of a second at nanosecond resolution. Negative
112
112
  # second values with fractions must still have non-negative nanos values
113
113
  # that count forward in time. Must be from 0 to 999,999,999
114
114
  # inclusive.
115
115
  class Timestamp
116
- include Google::Protobuf::MessageExts
117
- extend Google::Protobuf::MessageExts::ClassMethods
116
+ include ::Google::Protobuf::MessageExts
117
+ extend ::Google::Protobuf::MessageExts::ClassMethods
118
118
  end
119
119
  end
120
120
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-web_risk-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.3
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-04-24 00:00:00.000000000 Z
11
+ date: 2020-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -58,14 +58,42 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '5.10'
61
+ version: '5.14'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '5.10'
68
+ version: '5.14'
69
+ - !ruby/object:Gem::Dependency
70
+ name: minitest-focus
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '1.1'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '1.1'
83
+ - !ruby/object:Gem::Dependency
84
+ name: minitest-rg
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '5.2'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '5.2'
69
97
  - !ruby/object:Gem::Dependency
70
98
  name: rake
71
99
  requirement: !ruby/object:Gem::Requirement
@@ -134,7 +162,6 @@ files:
134
162
  - LICENSE.md
135
163
  - README.md
136
164
  - lib/google-cloud-web_risk-v1.rb
137
- - lib/google/cloud/common_resources_pb.rb
138
165
  - lib/google/cloud/web_risk/v1.rb
139
166
  - lib/google/cloud/web_risk/v1/version.rb
140
167
  - lib/google/cloud/web_risk/v1/web_risk_service.rb
@@ -167,7 +194,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
167
194
  - !ruby/object:Gem::Version
168
195
  version: '0'
169
196
  requirements: []
170
- rubygems_version: 3.0.6
197
+ rubygems_version: 3.1.3
171
198
  signing_key:
172
199
  specification_version: 4
173
200
  summary: API Client library for the Web Risk V1 API
@@ -1,15 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: google/cloud/common_resources.proto
3
-
4
- require 'google/protobuf'
5
-
6
- require 'google/api/resource_pb'
7
- Google::Protobuf::DescriptorPool.generated_pool.build do
8
- add_file("google/cloud/common_resources.proto", :syntax => :proto3) do
9
- end
10
- end
11
-
12
- module Google
13
- module Cloud
14
- end
15
- end