google-cloud-web_risk-v1 0.1.0 → 0.1.1

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: dd3d038c6f9681db512fa9303fedf7b5809e119ce7e3ac0801897e41e58e040c
4
+ data.tar.gz: eb593e104c712264a4560f06092c494547ba0a9b1da0044658bd9986041ae6c6
5
5
  SHA512:
6
- metadata.gz: 0a314cea58fccf1a85dcf96e154e65b75bc5372a09a0429d167c9f2359e30ac9a1c18ed3187b9e8512468073db27300db768a570d10f2190c887088008290001
7
- data.tar.gz: 0bec684d46bfe84566ea9b846ccf45a8e00dd3a96b4dc7944613640ddbf11056e98fdffdd39643b84593c26aff04f2e7a4d0d1b92dc2b5569ede0f7f5793efa7
6
+ metadata.gz: ec0d08659eba5a4ab9e72bd7d6702c0f58c303c17623cbecffe0ace7b0c08d2687c3e96a987f2456256a0b5a813f2c4afd342460210fc90013f88da980846772
7
+ data.tar.gz: 8b90fbe567a6dc7ccc2e186fdb00d4bfe3d6e792c040056c3164d134d205a0f1abe030cce337e6e57cfd7fd85a9012adef32d0b47af9f0e19f77723ff3c782dc
data/AUTHENTICATION.md CHANGED
@@ -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
@@ -25,7 +25,7 @@ In order to use this library, you first need to go through the following steps:
25
25
  ```ruby
26
26
  require "google/cloud/web_risk/v1"
27
27
 
28
- client = Google::Cloud::WebRisk::V1::WebRiskService::Client.new
28
+ client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new
29
29
  request = my_create_request
30
30
  response = client.compute_threat_list_diff request
31
31
  ```
@@ -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.1.1"
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.
@@ -157,8 +157,8 @@ module Google
157
157
  end
158
158
  @quota_project_id = credentials.respond_to?(:quota_project_id) ? credentials.quota_project_id : nil
159
159
 
160
- @web_risk_service_stub = Gapic::ServiceStub.new(
161
- Google::Cloud::WebRisk::V1::WebRiskService::Stub,
160
+ @web_risk_service_stub = ::Gapic::ServiceStub.new(
161
+ ::Google::Cloud::WebRisk::V1::WebRiskService::Stub,
162
162
  credentials: credentials,
163
163
  endpoint: @config.endpoint,
164
164
  channel_args: @config.channel_args,
@@ -178,12 +178,12 @@ module Google
178
178
  #
179
179
  # @overload compute_threat_list_diff(request, options = nil)
180
180
  # Pass arguments to `compute_threat_list_diff` via a request object, either of type
181
- # {Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest} or an equivalent Hash.
181
+ # {::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest} or an equivalent Hash.
182
182
  #
183
- # @param request [Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest, Hash]
183
+ # @param request [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest, ::Hash]
184
184
  # A request object representing the call parameters. Required. To specify no
185
185
  # parameters, or to keep all the default parameter values, pass an empty Hash.
186
- # @param options [Gapic::CallOptions, Hash]
186
+ # @param options [::Gapic::CallOptions, ::Hash]
187
187
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
188
188
  #
189
189
  # @overload compute_threat_list_diff(threat_type: nil, version_token: nil, constraints: nil)
@@ -191,38 +191,38 @@ module Google
191
191
  # least one keyword argument is required. To specify no parameters, or to keep all
192
192
  # the default parameter values, pass an empty Hash as a request object (see above).
193
193
  #
194
- # @param threat_type [Google::Cloud::WebRisk::V1::ThreatType]
194
+ # @param threat_type [::Google::Cloud::WebRisk::V1::ThreatType]
195
195
  # Required. The threat list to update. Only a single ThreatType should be specified.
196
- # @param version_token [String]
196
+ # @param version_token [::String]
197
197
  # The current version token of the client for the requested list (the
198
198
  # client version that was received from the last successful diff).
199
199
  # If the client does not have a version token (this is the first time calling
200
200
  # ComputeThreatListDiff), this may be left empty and a full database
201
201
  # snapshot will be returned.
202
- # @param constraints [Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest::Constraints, Hash]
202
+ # @param constraints [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest::Constraints, ::Hash]
203
203
  # Required. The constraints associated with this request.
204
204
  #
205
205
  # @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]
206
+ # @yieldparam response [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse]
207
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
208
208
  #
209
- # @return [Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse]
209
+ # @return [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse]
210
210
  #
211
- # @raise [Google::Cloud::Error] if the RPC is aborted.
211
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
212
212
  #
213
213
  def compute_threat_list_diff request, options = nil
214
- raise ArgumentError, "request must be provided" if request.nil?
214
+ raise ::ArgumentError, "request must be provided" if request.nil?
215
215
 
216
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest
216
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest
217
217
 
218
218
  # Converts hash and nil to an options object
219
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
219
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
220
220
 
221
221
  # Customize the options with defaults
222
222
  metadata = @config.rpcs.compute_threat_list_diff.metadata.to_h
223
223
 
224
224
  # Set x-goog-api-client and x-goog-user-project headers
225
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
225
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
226
226
  lib_name: @config.lib_name, lib_version: @config.lib_version,
227
227
  gapic_version: ::Google::Cloud::WebRisk::V1::VERSION
228
228
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -237,8 +237,8 @@ module Google
237
237
  yield response, operation if block_given?
238
238
  return response
239
239
  end
240
- rescue GRPC::BadStatus => e
241
- raise Google::Cloud::Error.from_error(e)
240
+ rescue ::GRPC::BadStatus => e
241
+ raise ::Google::Cloud::Error.from_error(e)
242
242
  end
243
243
 
244
244
  ##
@@ -250,12 +250,12 @@ module Google
250
250
  #
251
251
  # @overload search_uris(request, options = nil)
252
252
  # Pass arguments to `search_uris` via a request object, either of type
253
- # {Google::Cloud::WebRisk::V1::SearchUrisRequest} or an equivalent Hash.
253
+ # {::Google::Cloud::WebRisk::V1::SearchUrisRequest} or an equivalent Hash.
254
254
  #
255
- # @param request [Google::Cloud::WebRisk::V1::SearchUrisRequest, Hash]
255
+ # @param request [::Google::Cloud::WebRisk::V1::SearchUrisRequest, ::Hash]
256
256
  # A request object representing the call parameters. Required. To specify no
257
257
  # parameters, or to keep all the default parameter values, pass an empty Hash.
258
- # @param options [Gapic::CallOptions, Hash]
258
+ # @param options [::Gapic::CallOptions, ::Hash]
259
259
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
260
260
  #
261
261
  # @overload search_uris(uri: nil, threat_types: nil)
@@ -263,32 +263,32 @@ module Google
263
263
  # least one keyword argument is required. To specify no parameters, or to keep all
264
264
  # the default parameter values, pass an empty Hash as a request object (see above).
265
265
  #
266
- # @param uri [String]
266
+ # @param uri [::String]
267
267
  # Required. The URI to be checked for matches.
268
- # @param threat_types [Array<Google::Cloud::WebRisk::V1::ThreatType>]
268
+ # @param threat_types [::Array<::Google::Cloud::WebRisk::V1::ThreatType>]
269
269
  # Required. The ThreatLists to search in. Multiple ThreatLists may be specified.
270
270
  #
271
271
  # @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]
272
+ # @yieldparam response [::Google::Cloud::WebRisk::V1::SearchUrisResponse]
273
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
274
274
  #
275
- # @return [Google::Cloud::WebRisk::V1::SearchUrisResponse]
275
+ # @return [::Google::Cloud::WebRisk::V1::SearchUrisResponse]
276
276
  #
277
- # @raise [Google::Cloud::Error] if the RPC is aborted.
277
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
278
278
  #
279
279
  def search_uris request, options = nil
280
- raise ArgumentError, "request must be provided" if request.nil?
280
+ raise ::ArgumentError, "request must be provided" if request.nil?
281
281
 
282
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::WebRisk::V1::SearchUrisRequest
282
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1::SearchUrisRequest
283
283
 
284
284
  # Converts hash and nil to an options object
285
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
285
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
286
286
 
287
287
  # Customize the options with defaults
288
288
  metadata = @config.rpcs.search_uris.metadata.to_h
289
289
 
290
290
  # Set x-goog-api-client and x-goog-user-project headers
291
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
291
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
292
292
  lib_name: @config.lib_name, lib_version: @config.lib_version,
293
293
  gapic_version: ::Google::Cloud::WebRisk::V1::VERSION
294
294
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -303,8 +303,8 @@ module Google
303
303
  yield response, operation if block_given?
304
304
  return response
305
305
  end
306
- rescue GRPC::BadStatus => e
307
- raise Google::Cloud::Error.from_error(e)
306
+ rescue ::GRPC::BadStatus => e
307
+ raise ::Google::Cloud::Error.from_error(e)
308
308
  end
309
309
 
310
310
  ##
@@ -316,12 +316,12 @@ module Google
316
316
  #
317
317
  # @overload search_hashes(request, options = nil)
318
318
  # Pass arguments to `search_hashes` via a request object, either of type
319
- # {Google::Cloud::WebRisk::V1::SearchHashesRequest} or an equivalent Hash.
319
+ # {::Google::Cloud::WebRisk::V1::SearchHashesRequest} or an equivalent Hash.
320
320
  #
321
- # @param request [Google::Cloud::WebRisk::V1::SearchHashesRequest, Hash]
321
+ # @param request [::Google::Cloud::WebRisk::V1::SearchHashesRequest, ::Hash]
322
322
  # A request object representing the call parameters. Required. To specify no
323
323
  # parameters, or to keep all the default parameter values, pass an empty Hash.
324
- # @param options [Gapic::CallOptions, Hash]
324
+ # @param options [::Gapic::CallOptions, ::Hash]
325
325
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
326
326
  #
327
327
  # @overload search_hashes(hash_prefix: nil, threat_types: nil)
@@ -329,33 +329,33 @@ module Google
329
329
  # least one keyword argument is required. To specify no parameters, or to keep all
330
330
  # the default parameter values, pass an empty Hash as a request object (see above).
331
331
  #
332
- # @param hash_prefix [String]
332
+ # @param hash_prefix [::String]
333
333
  # A hash prefix, consisting of the most significant 4-32 bytes of a SHA256
334
334
  # hash. For JSON requests, this field is base64-encoded.
335
- # @param threat_types [Array<Google::Cloud::WebRisk::V1::ThreatType>]
335
+ # @param threat_types [::Array<::Google::Cloud::WebRisk::V1::ThreatType>]
336
336
  # Required. The ThreatLists to search in. Multiple ThreatLists may be specified.
337
337
  #
338
338
  # @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]
339
+ # @yieldparam response [::Google::Cloud::WebRisk::V1::SearchHashesResponse]
340
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
341
341
  #
342
- # @return [Google::Cloud::WebRisk::V1::SearchHashesResponse]
342
+ # @return [::Google::Cloud::WebRisk::V1::SearchHashesResponse]
343
343
  #
344
- # @raise [Google::Cloud::Error] if the RPC is aborted.
344
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
345
345
  #
346
346
  def search_hashes request, options = nil
347
- raise ArgumentError, "request must be provided" if request.nil?
347
+ raise ::ArgumentError, "request must be provided" if request.nil?
348
348
 
349
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::WebRisk::V1::SearchHashesRequest
349
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1::SearchHashesRequest
350
350
 
351
351
  # Converts hash and nil to an options object
352
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
352
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
353
353
 
354
354
  # Customize the options with defaults
355
355
  metadata = @config.rpcs.search_hashes.metadata.to_h
356
356
 
357
357
  # Set x-goog-api-client and x-goog-user-project headers
358
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
358
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
359
359
  lib_name: @config.lib_name, lib_version: @config.lib_version,
360
360
  gapic_version: ::Google::Cloud::WebRisk::V1::VERSION
361
361
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -370,8 +370,8 @@ module Google
370
370
  yield response, operation if block_given?
371
371
  return response
372
372
  end
373
- rescue GRPC::BadStatus => e
374
- raise Google::Cloud::Error.from_error(e)
373
+ rescue ::GRPC::BadStatus => e
374
+ raise ::Google::Cloud::Error.from_error(e)
375
375
  end
376
376
 
377
377
  ##
@@ -384,12 +384,12 @@ module Google
384
384
  #
385
385
  # @overload create_submission(request, options = nil)
386
386
  # Pass arguments to `create_submission` via a request object, either of type
387
- # {Google::Cloud::WebRisk::V1::CreateSubmissionRequest} or an equivalent Hash.
387
+ # {::Google::Cloud::WebRisk::V1::CreateSubmissionRequest} or an equivalent Hash.
388
388
  #
389
- # @param request [Google::Cloud::WebRisk::V1::CreateSubmissionRequest, Hash]
389
+ # @param request [::Google::Cloud::WebRisk::V1::CreateSubmissionRequest, ::Hash]
390
390
  # A request object representing the call parameters. Required. To specify no
391
391
  # parameters, or to keep all the default parameter values, pass an empty Hash.
392
- # @param options [Gapic::CallOptions, Hash]
392
+ # @param options [::Gapic::CallOptions, ::Hash]
393
393
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
394
394
  #
395
395
  # @overload create_submission(parent: nil, submission: nil)
@@ -397,33 +397,33 @@ module Google
397
397
  # least one keyword argument is required. To specify no parameters, or to keep all
398
398
  # the default parameter values, pass an empty Hash as a request object (see above).
399
399
  #
400
- # @param parent [String]
400
+ # @param parent [::String]
401
401
  # Required. The name of the project that is making the submission. This string is in
402
402
  # the format "projects/\\{project_number}".
403
- # @param submission [Google::Cloud::WebRisk::V1::Submission, Hash]
403
+ # @param submission [::Google::Cloud::WebRisk::V1::Submission, ::Hash]
404
404
  # Required. The submission that contains the content of the phishing report.
405
405
  #
406
406
  # @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]
407
+ # @yieldparam response [::Google::Cloud::WebRisk::V1::Submission]
408
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
409
409
  #
410
- # @return [Google::Cloud::WebRisk::V1::Submission]
410
+ # @return [::Google::Cloud::WebRisk::V1::Submission]
411
411
  #
412
- # @raise [Google::Cloud::Error] if the RPC is aborted.
412
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
413
413
  #
414
414
  def create_submission request, options = nil
415
- raise ArgumentError, "request must be provided" if request.nil?
415
+ raise ::ArgumentError, "request must be provided" if request.nil?
416
416
 
417
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::WebRisk::V1::CreateSubmissionRequest
417
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1::CreateSubmissionRequest
418
418
 
419
419
  # Converts hash and nil to an options object
420
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
420
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
421
421
 
422
422
  # Customize the options with defaults
423
423
  metadata = @config.rpcs.create_submission.metadata.to_h
424
424
 
425
425
  # Set x-goog-api-client and x-goog-user-project headers
426
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
426
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
427
427
  lib_name: @config.lib_name, lib_version: @config.lib_version,
428
428
  gapic_version: ::Google::Cloud::WebRisk::V1::VERSION
429
429
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -444,8 +444,8 @@ module Google
444
444
  yield response, operation if block_given?
445
445
  return response
446
446
  end
447
- rescue GRPC::BadStatus => e
448
- raise Google::Cloud::Error.from_error(e)
447
+ rescue ::GRPC::BadStatus => e
448
+ raise ::Google::Cloud::Error.from_error(e)
449
449
  end
450
450
 
451
451
  ##
@@ -455,7 +455,7 @@ module Google
455
455
  # providing control over timeouts, retry behavior, logging, transport
456
456
  # parameters, and other low-level controls. Certain parameters can also be
457
457
  # applied individually to specific RPCs. See
458
- # {Google::Cloud::WebRisk::V1::WebRiskService::Client::Configuration::Rpcs}
458
+ # {::Google::Cloud::WebRisk::V1::WebRiskService::Client::Configuration::Rpcs}
459
459
  # for a list of RPCs that can be configured independently.
460
460
  #
461
461
  # Configuration can be applied globally to all clients, or to a single client
@@ -466,22 +466,22 @@ module Google
466
466
  # To modify the global config, setting the timeout for compute_threat_list_diff
467
467
  # to 20 seconds, and all remaining timeouts to 10 seconds:
468
468
  #
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
469
+ # ::Google::Cloud::WebRisk::V1::WebRiskService::Client.configure do |config|
470
+ # config.timeout = 10.0
471
+ # config.rpcs.compute_threat_list_diff.timeout = 20.0
472
472
  # end
473
473
  #
474
474
  # To apply the above configuration only to a new client:
475
475
  #
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
476
+ # client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new do |config|
477
+ # config.timeout = 10.0
478
+ # config.rpcs.compute_threat_list_diff.timeout = 20.0
479
479
  # end
480
480
  #
481
481
  # @!attribute [rw] endpoint
482
482
  # The hostname or hostname:port of the service endpoint.
483
483
  # Defaults to `"webrisk.googleapis.com"`.
484
- # @return [String]
484
+ # @return [::String]
485
485
  # @!attribute [rw] credentials
486
486
  # Credentials to send with calls. You may provide any of the following types:
487
487
  # * (`String`) The path to a service account key file in JSON format
@@ -493,29 +493,29 @@ module Google
493
493
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
494
494
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
495
495
  # * (`nil`) indicating no credentials
496
- # @return [Object]
496
+ # @return [::Object]
497
497
  # @!attribute [rw] scope
498
498
  # The OAuth scopes
499
- # @return [Array<String>]
499
+ # @return [::Array<::String>]
500
500
  # @!attribute [rw] lib_name
501
501
  # The library name as recorded in instrumentation and logging
502
- # @return [String]
502
+ # @return [::String]
503
503
  # @!attribute [rw] lib_version
504
504
  # The library version as recorded in instrumentation and logging
505
- # @return [String]
505
+ # @return [::String]
506
506
  # @!attribute [rw] channel_args
507
507
  # Extra parameters passed to the gRPC channel. Note: this is ignored if a
508
508
  # `GRPC::Core::Channel` object is provided as the credential.
509
- # @return [Hash]
509
+ # @return [::Hash]
510
510
  # @!attribute [rw] interceptors
511
511
  # An array of interceptors that are run before calls are executed.
512
- # @return [Array<GRPC::ClientInterceptor>]
512
+ # @return [::Array<::GRPC::ClientInterceptor>]
513
513
  # @!attribute [rw] timeout
514
- # The call timeout in milliseconds.
515
- # @return [Numeric]
514
+ # The call timeout in seconds.
515
+ # @return [::Numeric]
516
516
  # @!attribute [rw] metadata
517
517
  # Additional gRPC headers to be sent with the call.
518
- # @return [Hash{Symbol=>String}]
518
+ # @return [::Hash{::Symbol=>::String}]
519
519
  # @!attribute [rw] retry_policy
520
520
  # The retry policy. The value is a hash with the following keys:
521
521
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
@@ -523,10 +523,10 @@ module Google
523
523
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
524
524
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
525
525
  # trigger a retry.
526
- # @return [Hash]
526
+ # @return [::Hash]
527
527
  #
528
528
  class Configuration
529
- extend Gapic::Config
529
+ extend ::Gapic::Config
530
530
 
531
531
  config_attr :endpoint, "webrisk.googleapis.com", String
532
532
  config_attr :credentials, nil do |value|
@@ -534,14 +534,14 @@ module Google
534
534
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
535
535
  allowed.any? { |klass| klass === value }
536
536
  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
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
545
545
 
546
546
  # @private
547
547
  def initialize parent_config = nil
@@ -582,35 +582,35 @@ module Google
582
582
  class Rpcs
583
583
  ##
584
584
  # RPC-specific configuration for `compute_threat_list_diff`
585
- # @return [Gapic::Config::Method]
585
+ # @return [::Gapic::Config::Method]
586
586
  #
587
587
  attr_reader :compute_threat_list_diff
588
588
  ##
589
589
  # RPC-specific configuration for `search_uris`
590
- # @return [Gapic::Config::Method]
590
+ # @return [::Gapic::Config::Method]
591
591
  #
592
592
  attr_reader :search_uris
593
593
  ##
594
594
  # RPC-specific configuration for `search_hashes`
595
- # @return [Gapic::Config::Method]
595
+ # @return [::Gapic::Config::Method]
596
596
  #
597
597
  attr_reader :search_hashes
598
598
  ##
599
599
  # RPC-specific configuration for `create_submission`
600
- # @return [Gapic::Config::Method]
600
+ # @return [::Gapic::Config::Method]
601
601
  #
602
602
  attr_reader :create_submission
603
603
 
604
604
  # @private
605
605
  def initialize parent_rpcs = nil
606
606
  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
607
+ @compute_threat_list_diff = ::Gapic::Config::Method.new compute_threat_list_diff_config
608
608
  search_uris_config = parent_rpcs&.search_uris if parent_rpcs&.respond_to? :search_uris
609
- @search_uris = Gapic::Config::Method.new search_uris_config
609
+ @search_uris = ::Gapic::Config::Method.new search_uris_config
610
610
  search_hashes_config = parent_rpcs&.search_hashes if parent_rpcs&.respond_to? :search_hashes
611
- @search_hashes = Gapic::Config::Method.new search_hashes_config
611
+ @search_hashes = ::Gapic::Config::Method.new search_hashes_config
612
612
  create_submission_config = parent_rpcs&.create_submission if parent_rpcs&.respond_to? :create_submission
613
- @create_submission = Gapic::Config::Method.new create_submission_config
613
+ @create_submission = ::Gapic::Config::Method.new create_submission_config
614
614
 
615
615
  yield self if block_given?
616
616
  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.1.1
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-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common