google-cloud-web_risk-v1beta1 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +6 -6
- data/README.md +1 -1
- data/lib/google/cloud/web_risk/v1beta1.rb +1 -1
- data/lib/google/cloud/web_risk/v1beta1/version.rb +1 -1
- data/lib/google/cloud/web_risk/v1beta1/web_risk_service.rb +1 -1
- data/lib/google/cloud/web_risk/v1beta1/web_risk_service/client.rb +88 -88
- data/lib/google/cloud/web_risk/v1beta1/web_risk_service/credentials.rb +1 -1
- data/proto_docs/google/api/resource.rb +12 -12
- data/proto_docs/google/cloud/webrisk/v1beta1/webrisk.rb +66 -66
- data/proto_docs/google/protobuf/timestamp.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c719cf0a059792f0654059afbed9e73296dce7f1500898b014d64fb34f94a8c2
|
4
|
+
data.tar.gz: e6a88ba75cdcf655b9511a19544d77c993e736cb125a6df695b4912188d9dc2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e96b9bc53b6f74ed0684a8d3cd3f2c1a0cb5bd9f83489ed40176fbd9aba79993480cde6b5eabef62e242d6ef0a4dd31d6e2be8afd95b0d7331e33fd7dec6143
|
7
|
+
data.tar.gz: 5e7307abf6bd14499460d29fa8dfb8e1f7474b0e3dce99bfd4785f6eaf3eb5a11387cd7176d0e2995b459e3d8d64a9b6cd87bebc31dab3fcf49f0583b217d999
|
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/v1beta1"
|
29
29
|
|
30
|
-
client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new
|
30
|
+
client = ::Google::Cloud::WebRisk::V1beta1::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-v1beta1
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
67
|
-
{Google::Cloud::WebRisk::V1beta1::WebRiskService::Credentials}):
|
67
|
+
{::Google::Cloud::WebRisk::V1beta1::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/v1beta1"
|
|
77
77
|
|
78
78
|
ENV["WEBRISK_CREDENTIALS"] = "path/to/keyfile.json"
|
79
79
|
|
80
|
-
client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new
|
80
|
+
client = ::Google::Cloud::WebRisk::V1beta1::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/v1beta1"
|
90
90
|
|
91
|
-
client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new do |config|
|
91
|
+
client = ::Google::Cloud::WebRisk::V1beta1::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/v1beta1"
|
100
100
|
|
101
|
-
Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.configure do |config|
|
101
|
+
::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.configure do |config|
|
102
102
|
config.credentials = "path/to/keyfile.json"
|
103
103
|
end
|
104
104
|
|
105
|
-
client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new
|
105
|
+
client = ::Google::Cloud::WebRisk::V1beta1::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/v1beta1"
|
27
27
|
|
28
|
-
client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new
|
28
|
+
client = ::Google::Cloud::WebRisk::V1beta1::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/v1beta1"
|
29
|
-
# client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new
|
29
|
+
# client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new
|
30
30
|
#
|
31
31
|
module V1beta1
|
32
32
|
end
|
@@ -36,7 +36,7 @@ module Google
|
|
36
36
|
# To load this service and instantiate a client:
|
37
37
|
#
|
38
38
|
# require "google/cloud/web_risk/v1beta1/web_risk_service"
|
39
|
-
# client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new
|
39
|
+
# client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new
|
40
40
|
#
|
41
41
|
module WebRiskService
|
42
42
|
end
|
@@ -37,15 +37,15 @@ module Google
|
|
37
37
|
##
|
38
38
|
# Configure the WebRiskServiceV1Beta1 Client class.
|
39
39
|
#
|
40
|
-
# See {Google::Cloud::WebRisk::V1beta1::WebRiskService::Client::Configuration}
|
40
|
+
# See {::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client::Configuration}
|
41
41
|
# for a description of the configuration fields.
|
42
42
|
#
|
43
43
|
# ## Example
|
44
44
|
#
|
45
45
|
# To modify the configuration for all WebRiskServiceV1Beta1 clients:
|
46
46
|
#
|
47
|
-
# Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.configure do |config|
|
48
|
-
# config.timeout =
|
47
|
+
# ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.configure do |config|
|
48
|
+
# config.timeout = 10.0
|
49
49
|
# end
|
50
50
|
#
|
51
51
|
# @yield [config] Configure the Client client.
|
@@ -101,7 +101,7 @@ module Google
|
|
101
101
|
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
102
102
|
# should be made on {Client.configure}.
|
103
103
|
#
|
104
|
-
# See {Google::Cloud::WebRisk::V1beta1::WebRiskService::Client::Configuration}
|
104
|
+
# See {::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client::Configuration}
|
105
105
|
# for a description of the configuration fields.
|
106
106
|
#
|
107
107
|
# @yield [config] Configure the Client client.
|
@@ -122,13 +122,13 @@ module Google
|
|
122
122
|
# To create a new WebRiskServiceV1Beta1 client with the default
|
123
123
|
# configuration:
|
124
124
|
#
|
125
|
-
# client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new
|
125
|
+
# client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new
|
126
126
|
#
|
127
127
|
# To create a new WebRiskServiceV1Beta1 client with a custom
|
128
128
|
# configuration:
|
129
129
|
#
|
130
|
-
# client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new do |config|
|
131
|
-
# config.timeout =
|
130
|
+
# client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new do |config|
|
131
|
+
# config.timeout = 10.0
|
132
132
|
# end
|
133
133
|
#
|
134
134
|
# @yield [config] Configure the WebRiskServiceV1Beta1 client.
|
@@ -155,8 +155,8 @@ module Google
|
|
155
155
|
end
|
156
156
|
@quota_project_id = credentials.respond_to?(:quota_project_id) ? credentials.quota_project_id : nil
|
157
157
|
|
158
|
-
@web_risk_service_v1_beta1_stub = Gapic::ServiceStub.new(
|
159
|
-
Google::Cloud::WebRisk::V1beta1::WebRiskServiceV1Beta1::Stub,
|
158
|
+
@web_risk_service_v1_beta1_stub = ::Gapic::ServiceStub.new(
|
159
|
+
::Google::Cloud::WebRisk::V1beta1::WebRiskServiceV1Beta1::Stub,
|
160
160
|
credentials: credentials,
|
161
161
|
endpoint: @config.endpoint,
|
162
162
|
channel_args: @config.channel_args,
|
@@ -171,12 +171,12 @@ module Google
|
|
171
171
|
#
|
172
172
|
# @overload compute_threat_list_diff(request, options = nil)
|
173
173
|
# Pass arguments to `compute_threat_list_diff` via a request object, either of type
|
174
|
-
# {Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest} or an equivalent Hash.
|
174
|
+
# {::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest} or an equivalent Hash.
|
175
175
|
#
|
176
|
-
# @param request [Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest, Hash]
|
176
|
+
# @param request [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest, ::Hash]
|
177
177
|
# A request object representing the call parameters. Required. To specify no
|
178
178
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
179
|
-
# @param options [Gapic::CallOptions, Hash]
|
179
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
180
180
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
181
181
|
#
|
182
182
|
# @overload compute_threat_list_diff(threat_type: nil, version_token: nil, constraints: nil)
|
@@ -184,35 +184,35 @@ module Google
|
|
184
184
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
185
185
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
186
186
|
#
|
187
|
-
# @param threat_type [Google::Cloud::WebRisk::V1beta1::ThreatType]
|
187
|
+
# @param threat_type [::Google::Cloud::WebRisk::V1beta1::ThreatType]
|
188
188
|
# The ThreatList to update.
|
189
|
-
# @param version_token [String]
|
189
|
+
# @param version_token [::String]
|
190
190
|
# The current version token of the client for the requested list (the
|
191
191
|
# client version that was received from the last successful diff).
|
192
|
-
# @param constraints [Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest::Constraints, Hash]
|
192
|
+
# @param constraints [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest::Constraints, ::Hash]
|
193
193
|
# Required. The constraints associated with this request.
|
194
194
|
#
|
195
195
|
# @yield [response, operation] Access the result along with the RPC operation
|
196
|
-
# @yieldparam response [Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse]
|
197
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
196
|
+
# @yieldparam response [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse]
|
197
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
198
198
|
#
|
199
|
-
# @return [Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse]
|
199
|
+
# @return [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse]
|
200
200
|
#
|
201
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
201
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
202
202
|
#
|
203
203
|
def compute_threat_list_diff request, options = nil
|
204
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
204
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
205
205
|
|
206
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest
|
206
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest
|
207
207
|
|
208
208
|
# Converts hash and nil to an options object
|
209
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
209
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
210
210
|
|
211
211
|
# Customize the options with defaults
|
212
212
|
metadata = @config.rpcs.compute_threat_list_diff.metadata.to_h
|
213
213
|
|
214
214
|
# Set x-goog-api-client and x-goog-user-project headers
|
215
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
215
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
216
216
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
217
217
|
gapic_version: ::Google::Cloud::WebRisk::V1beta1::VERSION
|
218
218
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -227,8 +227,8 @@ module Google
|
|
227
227
|
yield response, operation if block_given?
|
228
228
|
return response
|
229
229
|
end
|
230
|
-
rescue GRPC::BadStatus => e
|
231
|
-
raise Google::Cloud::Error.from_error(e)
|
230
|
+
rescue ::GRPC::BadStatus => e
|
231
|
+
raise ::Google::Cloud::Error.from_error(e)
|
232
232
|
end
|
233
233
|
|
234
234
|
##
|
@@ -236,12 +236,12 @@ module Google
|
|
236
236
|
#
|
237
237
|
# @overload search_uris(request, options = nil)
|
238
238
|
# Pass arguments to `search_uris` via a request object, either of type
|
239
|
-
# {Google::Cloud::WebRisk::V1beta1::SearchUrisRequest} or an equivalent Hash.
|
239
|
+
# {::Google::Cloud::WebRisk::V1beta1::SearchUrisRequest} or an equivalent Hash.
|
240
240
|
#
|
241
|
-
# @param request [Google::Cloud::WebRisk::V1beta1::SearchUrisRequest, Hash]
|
241
|
+
# @param request [::Google::Cloud::WebRisk::V1beta1::SearchUrisRequest, ::Hash]
|
242
242
|
# A request object representing the call parameters. Required. To specify no
|
243
243
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
244
|
-
# @param options [Gapic::CallOptions, Hash]
|
244
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
245
245
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
246
246
|
#
|
247
247
|
# @overload search_uris(uri: nil, threat_types: nil)
|
@@ -249,32 +249,32 @@ module Google
|
|
249
249
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
250
250
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
251
251
|
#
|
252
|
-
# @param uri [String]
|
252
|
+
# @param uri [::String]
|
253
253
|
# Required. The URI to be checked for matches.
|
254
|
-
# @param threat_types [Array
|
254
|
+
# @param threat_types [::Array<::Google::Cloud::WebRisk::V1beta1::ThreatType>]
|
255
255
|
# Required. The ThreatLists to search in.
|
256
256
|
#
|
257
257
|
# @yield [response, operation] Access the result along with the RPC operation
|
258
|
-
# @yieldparam response [Google::Cloud::WebRisk::V1beta1::SearchUrisResponse]
|
259
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
258
|
+
# @yieldparam response [::Google::Cloud::WebRisk::V1beta1::SearchUrisResponse]
|
259
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
260
260
|
#
|
261
|
-
# @return [Google::Cloud::WebRisk::V1beta1::SearchUrisResponse]
|
261
|
+
# @return [::Google::Cloud::WebRisk::V1beta1::SearchUrisResponse]
|
262
262
|
#
|
263
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
263
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
264
264
|
#
|
265
265
|
def search_uris request, options = nil
|
266
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
266
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
267
267
|
|
268
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::WebRisk::V1beta1::SearchUrisRequest
|
268
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1beta1::SearchUrisRequest
|
269
269
|
|
270
270
|
# Converts hash and nil to an options object
|
271
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
271
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
272
272
|
|
273
273
|
# Customize the options with defaults
|
274
274
|
metadata = @config.rpcs.search_uris.metadata.to_h
|
275
275
|
|
276
276
|
# Set x-goog-api-client and x-goog-user-project headers
|
277
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
277
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
278
278
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
279
279
|
gapic_version: ::Google::Cloud::WebRisk::V1beta1::VERSION
|
280
280
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -289,8 +289,8 @@ module Google
|
|
289
289
|
yield response, operation if block_given?
|
290
290
|
return response
|
291
291
|
end
|
292
|
-
rescue GRPC::BadStatus => e
|
293
|
-
raise Google::Cloud::Error.from_error(e)
|
292
|
+
rescue ::GRPC::BadStatus => e
|
293
|
+
raise ::Google::Cloud::Error.from_error(e)
|
294
294
|
end
|
295
295
|
|
296
296
|
##
|
@@ -302,12 +302,12 @@ module Google
|
|
302
302
|
#
|
303
303
|
# @overload search_hashes(request, options = nil)
|
304
304
|
# Pass arguments to `search_hashes` via a request object, either of type
|
305
|
-
# {Google::Cloud::WebRisk::V1beta1::SearchHashesRequest} or an equivalent Hash.
|
305
|
+
# {::Google::Cloud::WebRisk::V1beta1::SearchHashesRequest} or an equivalent Hash.
|
306
306
|
#
|
307
|
-
# @param request [Google::Cloud::WebRisk::V1beta1::SearchHashesRequest, Hash]
|
307
|
+
# @param request [::Google::Cloud::WebRisk::V1beta1::SearchHashesRequest, ::Hash]
|
308
308
|
# A request object representing the call parameters. Required. To specify no
|
309
309
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
310
|
-
# @param options [Gapic::CallOptions, Hash]
|
310
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
311
311
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
312
312
|
#
|
313
313
|
# @overload search_hashes(hash_prefix: nil, threat_types: nil)
|
@@ -315,33 +315,33 @@ module Google
|
|
315
315
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
316
316
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
317
317
|
#
|
318
|
-
# @param hash_prefix [String]
|
318
|
+
# @param hash_prefix [::String]
|
319
319
|
# A hash prefix, consisting of the most significant 4-32 bytes of a SHA256
|
320
320
|
# hash. For JSON requests, this field is base64-encoded.
|
321
|
-
# @param threat_types [Array
|
321
|
+
# @param threat_types [::Array<::Google::Cloud::WebRisk::V1beta1::ThreatType>]
|
322
322
|
# Required. The ThreatLists to search in.
|
323
323
|
#
|
324
324
|
# @yield [response, operation] Access the result along with the RPC operation
|
325
|
-
# @yieldparam response [Google::Cloud::WebRisk::V1beta1::SearchHashesResponse]
|
326
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
325
|
+
# @yieldparam response [::Google::Cloud::WebRisk::V1beta1::SearchHashesResponse]
|
326
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
327
327
|
#
|
328
|
-
# @return [Google::Cloud::WebRisk::V1beta1::SearchHashesResponse]
|
328
|
+
# @return [::Google::Cloud::WebRisk::V1beta1::SearchHashesResponse]
|
329
329
|
#
|
330
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
330
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
331
331
|
#
|
332
332
|
def search_hashes request, options = nil
|
333
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
333
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
334
334
|
|
335
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::WebRisk::V1beta1::SearchHashesRequest
|
335
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1beta1::SearchHashesRequest
|
336
336
|
|
337
337
|
# Converts hash and nil to an options object
|
338
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
338
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
339
339
|
|
340
340
|
# Customize the options with defaults
|
341
341
|
metadata = @config.rpcs.search_hashes.metadata.to_h
|
342
342
|
|
343
343
|
# Set x-goog-api-client and x-goog-user-project headers
|
344
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
344
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
345
345
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
346
346
|
gapic_version: ::Google::Cloud::WebRisk::V1beta1::VERSION
|
347
347
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -356,8 +356,8 @@ module Google
|
|
356
356
|
yield response, operation if block_given?
|
357
357
|
return response
|
358
358
|
end
|
359
|
-
rescue GRPC::BadStatus => e
|
360
|
-
raise Google::Cloud::Error.from_error(e)
|
359
|
+
rescue ::GRPC::BadStatus => e
|
360
|
+
raise ::Google::Cloud::Error.from_error(e)
|
361
361
|
end
|
362
362
|
|
363
363
|
##
|
@@ -367,7 +367,7 @@ module Google
|
|
367
367
|
# providing control over timeouts, retry behavior, logging, transport
|
368
368
|
# parameters, and other low-level controls. Certain parameters can also be
|
369
369
|
# applied individually to specific RPCs. See
|
370
|
-
# {Google::Cloud::WebRisk::V1beta1::WebRiskService::Client::Configuration::Rpcs}
|
370
|
+
# {::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client::Configuration::Rpcs}
|
371
371
|
# for a list of RPCs that can be configured independently.
|
372
372
|
#
|
373
373
|
# Configuration can be applied globally to all clients, or to a single client
|
@@ -378,22 +378,22 @@ module Google
|
|
378
378
|
# To modify the global config, setting the timeout for compute_threat_list_diff
|
379
379
|
# to 20 seconds, and all remaining timeouts to 10 seconds:
|
380
380
|
#
|
381
|
-
# Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.configure do |config|
|
382
|
-
# config.timeout =
|
383
|
-
# config.rpcs.compute_threat_list_diff.timeout =
|
381
|
+
# ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.configure do |config|
|
382
|
+
# config.timeout = 10.0
|
383
|
+
# config.rpcs.compute_threat_list_diff.timeout = 20.0
|
384
384
|
# end
|
385
385
|
#
|
386
386
|
# To apply the above configuration only to a new client:
|
387
387
|
#
|
388
|
-
# client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new do |config|
|
389
|
-
# config.timeout =
|
390
|
-
# config.rpcs.compute_threat_list_diff.timeout =
|
388
|
+
# client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new do |config|
|
389
|
+
# config.timeout = 10.0
|
390
|
+
# config.rpcs.compute_threat_list_diff.timeout = 20.0
|
391
391
|
# end
|
392
392
|
#
|
393
393
|
# @!attribute [rw] endpoint
|
394
394
|
# The hostname or hostname:port of the service endpoint.
|
395
395
|
# Defaults to `"webrisk.googleapis.com"`.
|
396
|
-
# @return [String]
|
396
|
+
# @return [::String]
|
397
397
|
# @!attribute [rw] credentials
|
398
398
|
# Credentials to send with calls. You may provide any of the following types:
|
399
399
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -405,29 +405,29 @@ module Google
|
|
405
405
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
406
406
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
407
407
|
# * (`nil`) indicating no credentials
|
408
|
-
# @return [Object]
|
408
|
+
# @return [::Object]
|
409
409
|
# @!attribute [rw] scope
|
410
410
|
# The OAuth scopes
|
411
|
-
# @return [Array
|
411
|
+
# @return [::Array<::String>]
|
412
412
|
# @!attribute [rw] lib_name
|
413
413
|
# The library name as recorded in instrumentation and logging
|
414
|
-
# @return [String]
|
414
|
+
# @return [::String]
|
415
415
|
# @!attribute [rw] lib_version
|
416
416
|
# The library version as recorded in instrumentation and logging
|
417
|
-
# @return [String]
|
417
|
+
# @return [::String]
|
418
418
|
# @!attribute [rw] channel_args
|
419
419
|
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
420
420
|
# `GRPC::Core::Channel` object is provided as the credential.
|
421
|
-
# @return [Hash]
|
421
|
+
# @return [::Hash]
|
422
422
|
# @!attribute [rw] interceptors
|
423
423
|
# An array of interceptors that are run before calls are executed.
|
424
|
-
# @return [Array
|
424
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
425
425
|
# @!attribute [rw] timeout
|
426
|
-
# The call timeout in
|
427
|
-
# @return [Numeric]
|
426
|
+
# The call timeout in seconds.
|
427
|
+
# @return [::Numeric]
|
428
428
|
# @!attribute [rw] metadata
|
429
429
|
# Additional gRPC headers to be sent with the call.
|
430
|
-
# @return [Hash{Symbol
|
430
|
+
# @return [::Hash{::Symbol=>::String}]
|
431
431
|
# @!attribute [rw] retry_policy
|
432
432
|
# The retry policy. The value is a hash with the following keys:
|
433
433
|
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
@@ -435,10 +435,10 @@ module Google
|
|
435
435
|
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
436
436
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
437
437
|
# trigger a retry.
|
438
|
-
# @return [Hash]
|
438
|
+
# @return [::Hash]
|
439
439
|
#
|
440
440
|
class Configuration
|
441
|
-
extend Gapic::Config
|
441
|
+
extend ::Gapic::Config
|
442
442
|
|
443
443
|
config_attr :endpoint, "webrisk.googleapis.com", String
|
444
444
|
config_attr :credentials, nil do |value|
|
@@ -446,14 +446,14 @@ module Google
|
|
446
446
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
447
447
|
allowed.any? { |klass| klass === value }
|
448
448
|
end
|
449
|
-
config_attr :scope, nil, String, Array, nil
|
450
|
-
config_attr :lib_name, nil, String, nil
|
451
|
-
config_attr :lib_version, nil, String, nil
|
452
|
-
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, Hash, nil)
|
453
|
-
config_attr :interceptors, nil, Array, nil
|
454
|
-
config_attr :timeout, nil, Numeric, nil
|
455
|
-
config_attr :metadata, nil, Hash, nil
|
456
|
-
config_attr :retry_policy, nil, Hash, Proc, nil
|
449
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
450
|
+
config_attr :lib_name, nil, ::String, nil
|
451
|
+
config_attr :lib_version, nil, ::String, nil
|
452
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
453
|
+
config_attr :interceptors, nil, ::Array, nil
|
454
|
+
config_attr :timeout, nil, ::Numeric, nil
|
455
|
+
config_attr :metadata, nil, ::Hash, nil
|
456
|
+
config_attr :retry_policy, nil, ::Hash, Proc, nil
|
457
457
|
|
458
458
|
# @private
|
459
459
|
def initialize parent_config = nil
|
@@ -494,28 +494,28 @@ module Google
|
|
494
494
|
class Rpcs
|
495
495
|
##
|
496
496
|
# RPC-specific configuration for `compute_threat_list_diff`
|
497
|
-
# @return [Gapic::Config::Method]
|
497
|
+
# @return [::Gapic::Config::Method]
|
498
498
|
#
|
499
499
|
attr_reader :compute_threat_list_diff
|
500
500
|
##
|
501
501
|
# RPC-specific configuration for `search_uris`
|
502
|
-
# @return [Gapic::Config::Method]
|
502
|
+
# @return [::Gapic::Config::Method]
|
503
503
|
#
|
504
504
|
attr_reader :search_uris
|
505
505
|
##
|
506
506
|
# RPC-specific configuration for `search_hashes`
|
507
|
-
# @return [Gapic::Config::Method]
|
507
|
+
# @return [::Gapic::Config::Method]
|
508
508
|
#
|
509
509
|
attr_reader :search_hashes
|
510
510
|
|
511
511
|
# @private
|
512
512
|
def initialize parent_rpcs = nil
|
513
513
|
compute_threat_list_diff_config = parent_rpcs&.compute_threat_list_diff if parent_rpcs&.respond_to? :compute_threat_list_diff
|
514
|
-
@compute_threat_list_diff = Gapic::Config::Method.new compute_threat_list_diff_config
|
514
|
+
@compute_threat_list_diff = ::Gapic::Config::Method.new compute_threat_list_diff_config
|
515
515
|
search_uris_config = parent_rpcs&.search_uris if parent_rpcs&.respond_to? :search_uris
|
516
|
-
@search_uris = Gapic::Config::Method.new search_uris_config
|
516
|
+
@search_uris = ::Gapic::Config::Method.new search_uris_config
|
517
517
|
search_hashes_config = parent_rpcs&.search_hashes if parent_rpcs&.respond_to? :search_hashes
|
518
|
-
@search_hashes = Gapic::Config::Method.new search_hashes_config
|
518
|
+
@search_hashes = ::Gapic::Config::Method.new search_hashes_config
|
519
519
|
|
520
520
|
yield self if block_given?
|
521
521
|
end
|
@@ -24,7 +24,7 @@ module Google
|
|
24
24
|
module V1beta1
|
25
25
|
module WebRiskService
|
26
26
|
# Credentials for the WebRiskServiceV1Beta1 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
|
]
|
@@ -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
|
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,77 +23,77 @@ module Google
|
|
23
23
|
module V1beta1
|
24
24
|
# Describes an API diff request.
|
25
25
|
# @!attribute [rw] threat_type
|
26
|
-
# @return [Google::Cloud::WebRisk::V1beta1::ThreatType]
|
26
|
+
# @return [::Google::Cloud::WebRisk::V1beta1::ThreatType]
|
27
27
|
# The ThreatList to update.
|
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
|
# @!attribute [rw] constraints
|
33
|
-
# @return [Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest::Constraints]
|
33
|
+
# @return [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest::Constraints]
|
34
34
|
# Required. The constraints associated with this request.
|
35
35
|
class ComputeThreatListDiffRequest
|
36
|
-
include Google::Protobuf::MessageExts
|
37
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
36
|
+
include ::Google::Protobuf::MessageExts
|
37
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
38
38
|
|
39
39
|
# The constraints for this diff.
|
40
40
|
# @!attribute [rw] max_diff_entries
|
41
|
-
# @return [Integer]
|
41
|
+
# @return [::Integer]
|
42
42
|
# The maximum size in number of entries. The diff will not contain more
|
43
43
|
# entries than this value. This should be a power of 2 between 2**10 and
|
44
44
|
# 2**20. If zero, no diff size limit is set.
|
45
45
|
# @!attribute [rw] max_database_entries
|
46
|
-
# @return [Integer]
|
46
|
+
# @return [::Integer]
|
47
47
|
# Sets the maximum number of entries that the client is willing to have
|
48
48
|
# in the local database. This should be a power of 2 between 2**10 and
|
49
49
|
# 2**20. If zero, no database size limit is set.
|
50
50
|
# @!attribute [rw] supported_compressions
|
51
|
-
# @return [Array
|
51
|
+
# @return [::Array<::Google::Cloud::WebRisk::V1beta1::CompressionType>]
|
52
52
|
# The compression types supported by the client.
|
53
53
|
class Constraints
|
54
|
-
include Google::Protobuf::MessageExts
|
55
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
54
|
+
include ::Google::Protobuf::MessageExts
|
55
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
59
59
|
# @!attribute [rw] response_type
|
60
|
-
# @return [Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse::ResponseType]
|
60
|
+
# @return [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse::ResponseType]
|
61
61
|
# The type of response. This may indicate that an action must be taken by the
|
62
62
|
# client when the response is received.
|
63
63
|
# @!attribute [rw] additions
|
64
|
-
# @return [Google::Cloud::WebRisk::V1beta1::ThreatEntryAdditions]
|
64
|
+
# @return [::Google::Cloud::WebRisk::V1beta1::ThreatEntryAdditions]
|
65
65
|
# A set of entries to add to a local threat type's list.
|
66
66
|
# @!attribute [rw] removals
|
67
|
-
# @return [Google::Cloud::WebRisk::V1beta1::ThreatEntryRemovals]
|
67
|
+
# @return [::Google::Cloud::WebRisk::V1beta1::ThreatEntryRemovals]
|
68
68
|
# A set of entries to remove from a local threat type's list.
|
69
69
|
# This field may be empty.
|
70
70
|
# @!attribute [rw] new_version_token
|
71
|
-
# @return [String]
|
71
|
+
# @return [::String]
|
72
72
|
# The new opaque client version token.
|
73
73
|
# @!attribute [rw] checksum
|
74
|
-
# @return [Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse::Checksum]
|
74
|
+
# @return [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse::Checksum]
|
75
75
|
# The expected SHA256 hash of the client state; that is, of the sorted list
|
76
76
|
# of all hashes present in the database after applying the provided diff.
|
77
77
|
# If the client state doesn't match the expected state, the client must
|
78
78
|
# disregard this diff and retry later.
|
79
79
|
# @!attribute [rw] recommended_next_diff
|
80
|
-
# @return [Google::Protobuf::Timestamp]
|
80
|
+
# @return [::Google::Protobuf::Timestamp]
|
81
81
|
# The soonest the client should wait before issuing any diff
|
82
82
|
# request. Querying sooner is unlikely to produce a meaningful diff.
|
83
83
|
# Waiting longer is acceptable considering the use case.
|
84
84
|
# If this field is not set clients may update as soon as they want.
|
85
85
|
class ComputeThreatListDiffResponse
|
86
|
-
include Google::Protobuf::MessageExts
|
87
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
86
|
+
include ::Google::Protobuf::MessageExts
|
87
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
88
88
|
|
89
89
|
# The expected state of a client's local database.
|
90
90
|
# @!attribute [rw] sha256
|
91
|
-
# @return [String]
|
91
|
+
# @return [::String]
|
92
92
|
# The SHA256 hash of the client state; that is, of the sorted list of all
|
93
93
|
# hashes present in the database.
|
94
94
|
class Checksum
|
95
|
-
include Google::Protobuf::MessageExts
|
96
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
95
|
+
include ::Google::Protobuf::MessageExts
|
96
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
97
97
|
end
|
98
98
|
|
99
99
|
# The type of response sent to the client.
|
@@ -113,119 +113,119 @@ module Google
|
|
113
113
|
|
114
114
|
# Request to check URI entries against threatLists.
|
115
115
|
# @!attribute [rw] uri
|
116
|
-
# @return [String]
|
116
|
+
# @return [::String]
|
117
117
|
# Required. The URI to be checked for matches.
|
118
118
|
# @!attribute [rw] threat_types
|
119
|
-
# @return [Array
|
119
|
+
# @return [::Array<::Google::Cloud::WebRisk::V1beta1::ThreatType>]
|
120
120
|
# Required. The ThreatLists to search in.
|
121
121
|
class SearchUrisRequest
|
122
|
-
include Google::Protobuf::MessageExts
|
123
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
122
|
+
include ::Google::Protobuf::MessageExts
|
123
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
124
124
|
end
|
125
125
|
|
126
126
|
# @!attribute [rw] threat
|
127
|
-
# @return [Google::Cloud::WebRisk::V1beta1::SearchUrisResponse::ThreatUri]
|
127
|
+
# @return [::Google::Cloud::WebRisk::V1beta1::SearchUrisResponse::ThreatUri]
|
128
128
|
# The threat list matches. This may be empty if the URI is on no list.
|
129
129
|
class SearchUrisResponse
|
130
|
-
include Google::Protobuf::MessageExts
|
131
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
130
|
+
include ::Google::Protobuf::MessageExts
|
131
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
132
132
|
|
133
133
|
# Contains threat information on a matching uri.
|
134
134
|
# @!attribute [rw] threat_types
|
135
|
-
# @return [Array
|
135
|
+
# @return [::Array<::Google::Cloud::WebRisk::V1beta1::ThreatType>]
|
136
136
|
# The ThreatList this threat belongs to.
|
137
137
|
# @!attribute [rw] expire_time
|
138
|
-
# @return [Google::Protobuf::Timestamp]
|
138
|
+
# @return [::Google::Protobuf::Timestamp]
|
139
139
|
# The cache lifetime for the returned match. Clients must not cache this
|
140
140
|
# response past this timestamp to avoid false positives.
|
141
141
|
class ThreatUri
|
142
|
-
include Google::Protobuf::MessageExts
|
143
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
142
|
+
include ::Google::Protobuf::MessageExts
|
143
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
144
144
|
end
|
145
145
|
end
|
146
146
|
|
147
147
|
# Request to return full hashes matched by the provided hash prefixes.
|
148
148
|
# @!attribute [rw] hash_prefix
|
149
|
-
# @return [String]
|
149
|
+
# @return [::String]
|
150
150
|
# A hash prefix, consisting of the most significant 4-32 bytes of a SHA256
|
151
151
|
# hash. For JSON requests, this field is base64-encoded.
|
152
152
|
# @!attribute [rw] threat_types
|
153
|
-
# @return [Array
|
153
|
+
# @return [::Array<::Google::Cloud::WebRisk::V1beta1::ThreatType>]
|
154
154
|
# Required. The ThreatLists to search in.
|
155
155
|
class SearchHashesRequest
|
156
|
-
include Google::Protobuf::MessageExts
|
157
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
156
|
+
include ::Google::Protobuf::MessageExts
|
157
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
158
158
|
end
|
159
159
|
|
160
160
|
# @!attribute [rw] threats
|
161
|
-
# @return [Array
|
161
|
+
# @return [::Array<::Google::Cloud::WebRisk::V1beta1::SearchHashesResponse::ThreatHash>]
|
162
162
|
# The full hashes that matched the requested prefixes.
|
163
163
|
# The hash will be populated in the key.
|
164
164
|
# @!attribute [rw] negative_expire_time
|
165
|
-
# @return [Google::Protobuf::Timestamp]
|
165
|
+
# @return [::Google::Protobuf::Timestamp]
|
166
166
|
# For requested entities that did not match the threat list, how long to
|
167
167
|
# cache the response until.
|
168
168
|
class SearchHashesResponse
|
169
|
-
include Google::Protobuf::MessageExts
|
170
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
169
|
+
include ::Google::Protobuf::MessageExts
|
170
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
171
171
|
|
172
172
|
# Contains threat information on a matching hash.
|
173
173
|
# @!attribute [rw] threat_types
|
174
|
-
# @return [Array
|
174
|
+
# @return [::Array<::Google::Cloud::WebRisk::V1beta1::ThreatType>]
|
175
175
|
# The ThreatList this threat belongs to.
|
176
176
|
# This must contain at least one entry.
|
177
177
|
# @!attribute [rw] hash
|
178
|
-
# @return [String]
|
178
|
+
# @return [::String]
|
179
179
|
# A 32 byte SHA256 hash. This field is in binary format. For JSON
|
180
180
|
# requests, hashes are base64-encoded.
|
181
181
|
# @!attribute [rw] expire_time
|
182
|
-
# @return [Google::Protobuf::Timestamp]
|
182
|
+
# @return [::Google::Protobuf::Timestamp]
|
183
183
|
# The cache lifetime for the returned match. Clients must not cache this
|
184
184
|
# response past this timestamp to avoid false positives.
|
185
185
|
class ThreatHash
|
186
|
-
include Google::Protobuf::MessageExts
|
187
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
186
|
+
include ::Google::Protobuf::MessageExts
|
187
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
188
188
|
end
|
189
189
|
end
|
190
190
|
|
191
191
|
# Contains the set of entries to add to a local database.
|
192
192
|
# May contain a combination of compressed and raw data in a single response.
|
193
193
|
# @!attribute [rw] raw_hashes
|
194
|
-
# @return [Array
|
194
|
+
# @return [::Array<::Google::Cloud::WebRisk::V1beta1::RawHashes>]
|
195
195
|
# The raw SHA256-formatted entries.
|
196
196
|
# Repeated to allow returning sets of hashes with different prefix sizes.
|
197
197
|
# @!attribute [rw] rice_hashes
|
198
|
-
# @return [Google::Cloud::WebRisk::V1beta1::RiceDeltaEncoding]
|
198
|
+
# @return [::Google::Cloud::WebRisk::V1beta1::RiceDeltaEncoding]
|
199
199
|
# The encoded 4-byte prefixes of SHA256-formatted entries, using a
|
200
200
|
# Golomb-Rice encoding. The hashes are converted to uint32, sorted in
|
201
201
|
# ascending order, then delta encoded and stored as encoded_data.
|
202
202
|
class ThreatEntryAdditions
|
203
|
-
include Google::Protobuf::MessageExts
|
204
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
203
|
+
include ::Google::Protobuf::MessageExts
|
204
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
205
205
|
end
|
206
206
|
|
207
207
|
# Contains the set of entries to remove from a local database.
|
208
208
|
# @!attribute [rw] raw_indices
|
209
|
-
# @return [Google::Cloud::WebRisk::V1beta1::RawIndices]
|
209
|
+
# @return [::Google::Cloud::WebRisk::V1beta1::RawIndices]
|
210
210
|
# The raw removal indices for a local list.
|
211
211
|
# @!attribute [rw] rice_indices
|
212
|
-
# @return [Google::Cloud::WebRisk::V1beta1::RiceDeltaEncoding]
|
212
|
+
# @return [::Google::Cloud::WebRisk::V1beta1::RiceDeltaEncoding]
|
213
213
|
# The encoded local, lexicographically-sorted list indices, using a
|
214
214
|
# Golomb-Rice encoding. Used for sending compressed removal indices. The
|
215
215
|
# removal indices (uint32) are sorted in ascending order, then delta encoded
|
216
216
|
# and stored as encoded_data.
|
217
217
|
class ThreatEntryRemovals
|
218
|
-
include Google::Protobuf::MessageExts
|
219
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
218
|
+
include ::Google::Protobuf::MessageExts
|
219
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
220
220
|
end
|
221
221
|
|
222
222
|
# A set of raw indices to remove from a local list.
|
223
223
|
# @!attribute [rw] indices
|
224
|
-
# @return [Array
|
224
|
+
# @return [::Array<::Integer>]
|
225
225
|
# The indices to remove from a lexicographically-sorted local list.
|
226
226
|
class RawIndices
|
227
|
-
include Google::Protobuf::MessageExts
|
228
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
227
|
+
include ::Google::Protobuf::MessageExts
|
228
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
229
229
|
end
|
230
230
|
|
231
231
|
# The uncompressed threat entries in hash format.
|
@@ -237,41 +237,41 @@ module Google
|
|
237
237
|
# compression, or when sending non-4-byte hashes to clients that do support
|
238
238
|
# compression.
|
239
239
|
# @!attribute [rw] prefix_size
|
240
|
-
# @return [Integer]
|
240
|
+
# @return [::Integer]
|
241
241
|
# The number of bytes for each prefix encoded below. This field can be
|
242
242
|
# anywhere from 4 (shortest prefix) to 32 (full SHA256 hash).
|
243
243
|
# @!attribute [rw] raw_hashes
|
244
|
-
# @return [String]
|
244
|
+
# @return [::String]
|
245
245
|
# The hashes, in binary format, concatenated into one long string. Hashes are
|
246
246
|
# sorted in lexicographic order. For JSON API users, hashes are
|
247
247
|
# base64-encoded.
|
248
248
|
class RawHashes
|
249
|
-
include Google::Protobuf::MessageExts
|
250
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
249
|
+
include ::Google::Protobuf::MessageExts
|
250
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
251
251
|
end
|
252
252
|
|
253
253
|
# The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or
|
254
254
|
# compressed removal indices.
|
255
255
|
# @!attribute [rw] first_value
|
256
|
-
# @return [Integer]
|
256
|
+
# @return [::Integer]
|
257
257
|
# The offset of the first entry in the encoded data, or, if only a single
|
258
258
|
# integer was encoded, that single integer's value. If the field is empty or
|
259
259
|
# missing, assume zero.
|
260
260
|
# @!attribute [rw] rice_parameter
|
261
|
-
# @return [Integer]
|
261
|
+
# @return [::Integer]
|
262
262
|
# The Golomb-Rice parameter, which is a number between 2 and 28. This field
|
263
263
|
# is missing (that is, zero) if `num_entries` is zero.
|
264
264
|
# @!attribute [rw] entry_count
|
265
|
-
# @return [Integer]
|
265
|
+
# @return [::Integer]
|
266
266
|
# The number of entries that are delta encoded in the encoded data. If only a
|
267
267
|
# single integer was encoded, this will be zero and the single value will be
|
268
268
|
# stored in `first_value`.
|
269
269
|
# @!attribute [rw] encoded_data
|
270
|
-
# @return [String]
|
270
|
+
# @return [::String]
|
271
271
|
# The encoded deltas that are encoded using the Golomb-Rice coder.
|
272
272
|
class RiceDeltaEncoding
|
273
|
-
include Google::Protobuf::MessageExts
|
274
|
-
extend Google::Protobuf::MessageExts::ClassMethods
|
273
|
+
include ::Google::Protobuf::MessageExts
|
274
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
275
275
|
end
|
276
276
|
|
277
277
|
# 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-v1beta1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
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-
|
11
|
+
date: 2020-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|