google-apis-safebrowsing_v4 0.16.0 → 0.18.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -22,8 +22,24 @@ module Google
|
|
22
22
|
module Apis
|
23
23
|
module SafebrowsingV4
|
24
24
|
|
25
|
+
# A generic empty message that you can re-use to avoid defining duplicated empty
|
26
|
+
# messages in your APIs. A typical example is to use it as the request or the
|
27
|
+
# response type of an API method. For instance: service Foo ` rpc Bar(google.
|
28
|
+
# protobuf.Empty) returns (google.protobuf.Empty); `
|
29
|
+
class GoogleProtobufEmpty
|
30
|
+
include Google::Apis::Core::Hashable
|
31
|
+
|
32
|
+
def initialize(**args)
|
33
|
+
update!(**args)
|
34
|
+
end
|
35
|
+
|
36
|
+
# Update properties of this object
|
37
|
+
def update!(**args)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
25
41
|
# The expected state of a client's local database.
|
26
|
-
class
|
42
|
+
class GoogleSecuritySafebrowsingV4Checksum
|
27
43
|
include Google::Apis::Core::Hashable
|
28
44
|
|
29
45
|
# The SHA256 hash of the client state; that is, of the sorted list of all hashes
|
@@ -44,7 +60,7 @@ module Google
|
|
44
60
|
end
|
45
61
|
|
46
62
|
# The client metadata associated with Safe Browsing API requests.
|
47
|
-
class
|
63
|
+
class GoogleSecuritySafebrowsingV4ClientInfo
|
48
64
|
include Google::Apis::Core::Hashable
|
49
65
|
|
50
66
|
# A client ID that (hopefully) uniquely identifies the client implementation of
|
@@ -69,8 +85,81 @@ module Google
|
|
69
85
|
end
|
70
86
|
end
|
71
87
|
|
88
|
+
# Describes a Safe Browsing API update request. Clients can request updates for
|
89
|
+
# multiple lists in a single request. The server may not respond to all requests,
|
90
|
+
# if the server has no updates for that list. NOTE: Field index 2 is unused.
|
91
|
+
# NEXT: 5
|
92
|
+
class GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequest
|
93
|
+
include Google::Apis::Core::Hashable
|
94
|
+
|
95
|
+
# The client metadata associated with Safe Browsing API requests.
|
96
|
+
# Corresponds to the JSON property `client`
|
97
|
+
# @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ClientInfo]
|
98
|
+
attr_accessor :client
|
99
|
+
|
100
|
+
# The requested threat list updates.
|
101
|
+
# Corresponds to the JSON property `listUpdateRequests`
|
102
|
+
# @return [Array<Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequest>]
|
103
|
+
attr_accessor :list_update_requests
|
104
|
+
|
105
|
+
def initialize(**args)
|
106
|
+
update!(**args)
|
107
|
+
end
|
108
|
+
|
109
|
+
# Update properties of this object
|
110
|
+
def update!(**args)
|
111
|
+
@client = args[:client] if args.key?(:client)
|
112
|
+
@list_update_requests = args[:list_update_requests] if args.key?(:list_update_requests)
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
# A single list update request.
|
117
|
+
class GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequest
|
118
|
+
include Google::Apis::Core::Hashable
|
119
|
+
|
120
|
+
# The constraints for this update.
|
121
|
+
# Corresponds to the JSON property `constraints`
|
122
|
+
# @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequestConstraints]
|
123
|
+
attr_accessor :constraints
|
124
|
+
|
125
|
+
# The type of platform at risk by entries present in the list.
|
126
|
+
# Corresponds to the JSON property `platformType`
|
127
|
+
# @return [String]
|
128
|
+
attr_accessor :platform_type
|
129
|
+
|
130
|
+
# The current state of the client for the requested list (the encrypted client
|
131
|
+
# state that was received from the last successful list update).
|
132
|
+
# Corresponds to the JSON property `state`
|
133
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
134
|
+
# @return [String]
|
135
|
+
attr_accessor :state
|
136
|
+
|
137
|
+
# The types of entries present in the list.
|
138
|
+
# Corresponds to the JSON property `threatEntryType`
|
139
|
+
# @return [String]
|
140
|
+
attr_accessor :threat_entry_type
|
141
|
+
|
142
|
+
# The type of threat posed by entries present in the list.
|
143
|
+
# Corresponds to the JSON property `threatType`
|
144
|
+
# @return [String]
|
145
|
+
attr_accessor :threat_type
|
146
|
+
|
147
|
+
def initialize(**args)
|
148
|
+
update!(**args)
|
149
|
+
end
|
150
|
+
|
151
|
+
# Update properties of this object
|
152
|
+
def update!(**args)
|
153
|
+
@constraints = args[:constraints] if args.key?(:constraints)
|
154
|
+
@platform_type = args[:platform_type] if args.key?(:platform_type)
|
155
|
+
@state = args[:state] if args.key?(:state)
|
156
|
+
@threat_entry_type = args[:threat_entry_type] if args.key?(:threat_entry_type)
|
157
|
+
@threat_type = args[:threat_type] if args.key?(:threat_type)
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
72
161
|
# The constraints for this update.
|
73
|
-
class
|
162
|
+
class GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequestConstraints
|
74
163
|
include Google::Apis::Core::Hashable
|
75
164
|
|
76
165
|
# A client's physical location, expressed as a ISO 31166-1 alpha-2 region code.
|
@@ -124,66 +213,81 @@ module Google
|
|
124
213
|
end
|
125
214
|
end
|
126
215
|
|
127
|
-
#
|
128
|
-
|
129
|
-
# response type of an API method. For instance: service Foo ` rpc Bar(google.
|
130
|
-
# protobuf.Empty) returns (google.protobuf.Empty); `
|
131
|
-
class Empty
|
216
|
+
#
|
217
|
+
class GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse
|
132
218
|
include Google::Apis::Core::Hashable
|
133
219
|
|
220
|
+
# The list updates requested by the clients. The number of responses here may be
|
221
|
+
# less than the number of requests sent by clients. This is the case, for
|
222
|
+
# example, if the server has no updates for a particular list.
|
223
|
+
# Corresponds to the JSON property `listUpdateResponses`
|
224
|
+
# @return [Array<Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponseListUpdateResponse>]
|
225
|
+
attr_accessor :list_update_responses
|
226
|
+
|
227
|
+
# The minimum duration the client must wait before issuing any update request.
|
228
|
+
# If this field is not set clients may update as soon as they want.
|
229
|
+
# Corresponds to the JSON property `minimumWaitDuration`
|
230
|
+
# @return [String]
|
231
|
+
attr_accessor :minimum_wait_duration
|
232
|
+
|
134
233
|
def initialize(**args)
|
135
234
|
update!(**args)
|
136
235
|
end
|
137
236
|
|
138
237
|
# Update properties of this object
|
139
238
|
def update!(**args)
|
239
|
+
@list_update_responses = args[:list_update_responses] if args.key?(:list_update_responses)
|
240
|
+
@minimum_wait_duration = args[:minimum_wait_duration] if args.key?(:minimum_wait_duration)
|
140
241
|
end
|
141
242
|
end
|
142
243
|
|
143
|
-
#
|
144
|
-
|
145
|
-
# if the server has no updates for that list. NOTE: Field index 2 is unused.
|
146
|
-
# NEXT: 5
|
147
|
-
class FetchThreatListUpdatesRequest
|
244
|
+
# An update to an individual list.
|
245
|
+
class GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponseListUpdateResponse
|
148
246
|
include Google::Apis::Core::Hashable
|
149
247
|
|
150
|
-
#
|
151
|
-
#
|
152
|
-
#
|
153
|
-
|
248
|
+
# A set of entries to add to a local threat type's list. Repeated to allow for a
|
249
|
+
# combination of compressed and raw data to be sent in a single response.
|
250
|
+
# Corresponds to the JSON property `additions`
|
251
|
+
# @return [Array<Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatEntrySet>]
|
252
|
+
attr_accessor :additions
|
154
253
|
|
155
|
-
# The
|
156
|
-
# Corresponds to the JSON property `
|
157
|
-
# @return [
|
158
|
-
attr_accessor :
|
254
|
+
# The expected state of a client's local database.
|
255
|
+
# Corresponds to the JSON property `checksum`
|
256
|
+
# @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4Checksum]
|
257
|
+
attr_accessor :checksum
|
159
258
|
|
160
|
-
|
161
|
-
|
162
|
-
|
259
|
+
# The new client state, in encrypted format. Opaque to clients.
|
260
|
+
# Corresponds to the JSON property `newClientState`
|
261
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
262
|
+
# @return [String]
|
263
|
+
attr_accessor :new_client_state
|
163
264
|
|
164
|
-
#
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
end
|
169
|
-
end
|
265
|
+
# The platform type for which data is returned.
|
266
|
+
# Corresponds to the JSON property `platformType`
|
267
|
+
# @return [String]
|
268
|
+
attr_accessor :platform_type
|
170
269
|
|
171
|
-
|
172
|
-
|
173
|
-
|
270
|
+
# A set of entries to remove from a local threat type's list. In practice, this
|
271
|
+
# field is empty or contains exactly one ThreatEntrySet.
|
272
|
+
# Corresponds to the JSON property `removals`
|
273
|
+
# @return [Array<Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatEntrySet>]
|
274
|
+
attr_accessor :removals
|
174
275
|
|
175
|
-
# The
|
176
|
-
#
|
177
|
-
#
|
178
|
-
#
|
179
|
-
|
180
|
-
attr_accessor :list_update_responses
|
276
|
+
# The type of response. This may indicate that an action is required by the
|
277
|
+
# client when the response is received.
|
278
|
+
# Corresponds to the JSON property `responseType`
|
279
|
+
# @return [String]
|
280
|
+
attr_accessor :response_type
|
181
281
|
|
182
|
-
# The
|
183
|
-
#
|
184
|
-
# Corresponds to the JSON property `minimumWaitDuration`
|
282
|
+
# The format of the threats.
|
283
|
+
# Corresponds to the JSON property `threatEntryType`
|
185
284
|
# @return [String]
|
186
|
-
attr_accessor :
|
285
|
+
attr_accessor :threat_entry_type
|
286
|
+
|
287
|
+
# The threat type for which data is returned.
|
288
|
+
# Corresponds to the JSON property `threatType`
|
289
|
+
# @return [String]
|
290
|
+
attr_accessor :threat_type
|
187
291
|
|
188
292
|
def initialize(**args)
|
189
293
|
update!(**args)
|
@@ -191,23 +295,29 @@ module Google
|
|
191
295
|
|
192
296
|
# Update properties of this object
|
193
297
|
def update!(**args)
|
194
|
-
@
|
195
|
-
@
|
298
|
+
@additions = args[:additions] if args.key?(:additions)
|
299
|
+
@checksum = args[:checksum] if args.key?(:checksum)
|
300
|
+
@new_client_state = args[:new_client_state] if args.key?(:new_client_state)
|
301
|
+
@platform_type = args[:platform_type] if args.key?(:platform_type)
|
302
|
+
@removals = args[:removals] if args.key?(:removals)
|
303
|
+
@response_type = args[:response_type] if args.key?(:response_type)
|
304
|
+
@threat_entry_type = args[:threat_entry_type] if args.key?(:threat_entry_type)
|
305
|
+
@threat_type = args[:threat_type] if args.key?(:threat_type)
|
196
306
|
end
|
197
307
|
end
|
198
308
|
|
199
309
|
# Request to return full hashes matched by the provided hash prefixes.
|
200
|
-
class
|
310
|
+
class GoogleSecuritySafebrowsingV4FindFullHashesRequest
|
201
311
|
include Google::Apis::Core::Hashable
|
202
312
|
|
203
313
|
# The client metadata associated with Safe Browsing API requests.
|
204
314
|
# Corresponds to the JSON property `apiClient`
|
205
|
-
# @return [Google::Apis::SafebrowsingV4::
|
315
|
+
# @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ClientInfo]
|
206
316
|
attr_accessor :api_client
|
207
317
|
|
208
318
|
# The client metadata associated with Safe Browsing API requests.
|
209
319
|
# Corresponds to the JSON property `client`
|
210
|
-
# @return [Google::Apis::SafebrowsingV4::
|
320
|
+
# @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ClientInfo]
|
211
321
|
attr_accessor :client
|
212
322
|
|
213
323
|
# The current client states for each of the client's local threat lists.
|
@@ -218,7 +328,7 @@ module Google
|
|
218
328
|
# The information regarding one or more threats that a client submits when
|
219
329
|
# checking for matches in threat lists.
|
220
330
|
# Corresponds to the JSON property `threatInfo`
|
221
|
-
# @return [Google::Apis::SafebrowsingV4::
|
331
|
+
# @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatInfo]
|
222
332
|
attr_accessor :threat_info
|
223
333
|
|
224
334
|
def initialize(**args)
|
@@ -235,12 +345,12 @@ module Google
|
|
235
345
|
end
|
236
346
|
|
237
347
|
#
|
238
|
-
class
|
348
|
+
class GoogleSecuritySafebrowsingV4FindFullHashesResponse
|
239
349
|
include Google::Apis::Core::Hashable
|
240
350
|
|
241
351
|
# The full hashes that matched the requested prefixes.
|
242
352
|
# Corresponds to the JSON property `matches`
|
243
|
-
# @return [Array<Google::Apis::SafebrowsingV4::
|
353
|
+
# @return [Array<Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatMatch>]
|
244
354
|
attr_accessor :matches
|
245
355
|
|
246
356
|
# The minimum duration the client must wait before issuing any find hashes
|
@@ -269,18 +379,18 @@ module Google
|
|
269
379
|
end
|
270
380
|
|
271
381
|
# Request to check entries against lists.
|
272
|
-
class
|
382
|
+
class GoogleSecuritySafebrowsingV4FindThreatMatchesRequest
|
273
383
|
include Google::Apis::Core::Hashable
|
274
384
|
|
275
385
|
# The client metadata associated with Safe Browsing API requests.
|
276
386
|
# Corresponds to the JSON property `client`
|
277
|
-
# @return [Google::Apis::SafebrowsingV4::
|
387
|
+
# @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ClientInfo]
|
278
388
|
attr_accessor :client
|
279
389
|
|
280
390
|
# The information regarding one or more threats that a client submits when
|
281
391
|
# checking for matches in threat lists.
|
282
392
|
# Corresponds to the JSON property `threatInfo`
|
283
|
-
# @return [Google::Apis::SafebrowsingV4::
|
393
|
+
# @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatInfo]
|
284
394
|
attr_accessor :threat_info
|
285
395
|
|
286
396
|
def initialize(**args)
|
@@ -295,12 +405,12 @@ module Google
|
|
295
405
|
end
|
296
406
|
|
297
407
|
#
|
298
|
-
class
|
408
|
+
class GoogleSecuritySafebrowsingV4FindThreatMatchesResponse
|
299
409
|
include Google::Apis::Core::Hashable
|
300
410
|
|
301
411
|
# The threat list matches.
|
302
412
|
# Corresponds to the JSON property `matches`
|
303
|
-
# @return [Array<Google::Apis::SafebrowsingV4::
|
413
|
+
# @return [Array<Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatMatch>]
|
304
414
|
attr_accessor :matches
|
305
415
|
|
306
416
|
def initialize(**args)
|
@@ -314,12 +424,12 @@ module Google
|
|
314
424
|
end
|
315
425
|
|
316
426
|
#
|
317
|
-
class
|
427
|
+
class GoogleSecuritySafebrowsingV4ListThreatListsResponse
|
318
428
|
include Google::Apis::Core::Hashable
|
319
429
|
|
320
430
|
# The lists available for download by the client.
|
321
431
|
# Corresponds to the JSON property `threatLists`
|
322
|
-
# @return [Array<Google::Apis::SafebrowsingV4::
|
432
|
+
# @return [Array<Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatListDescriptor>]
|
323
433
|
attr_accessor :threat_lists
|
324
434
|
|
325
435
|
def initialize(**args)
|
@@ -332,150 +442,13 @@ module Google
|
|
332
442
|
end
|
333
443
|
end
|
334
444
|
|
335
|
-
# A single list update request.
|
336
|
-
class ListUpdateRequest
|
337
|
-
include Google::Apis::Core::Hashable
|
338
|
-
|
339
|
-
# The constraints for this update.
|
340
|
-
# Corresponds to the JSON property `constraints`
|
341
|
-
# @return [Google::Apis::SafebrowsingV4::Constraints]
|
342
|
-
attr_accessor :constraints
|
343
|
-
|
344
|
-
# The type of platform at risk by entries present in the list.
|
345
|
-
# Corresponds to the JSON property `platformType`
|
346
|
-
# @return [String]
|
347
|
-
attr_accessor :platform_type
|
348
|
-
|
349
|
-
# The current state of the client for the requested list (the encrypted client
|
350
|
-
# state that was received from the last successful list update).
|
351
|
-
# Corresponds to the JSON property `state`
|
352
|
-
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
353
|
-
# @return [String]
|
354
|
-
attr_accessor :state
|
355
|
-
|
356
|
-
# The types of entries present in the list.
|
357
|
-
# Corresponds to the JSON property `threatEntryType`
|
358
|
-
# @return [String]
|
359
|
-
attr_accessor :threat_entry_type
|
360
|
-
|
361
|
-
# The type of threat posed by entries present in the list.
|
362
|
-
# Corresponds to the JSON property `threatType`
|
363
|
-
# @return [String]
|
364
|
-
attr_accessor :threat_type
|
365
|
-
|
366
|
-
def initialize(**args)
|
367
|
-
update!(**args)
|
368
|
-
end
|
369
|
-
|
370
|
-
# Update properties of this object
|
371
|
-
def update!(**args)
|
372
|
-
@constraints = args[:constraints] if args.key?(:constraints)
|
373
|
-
@platform_type = args[:platform_type] if args.key?(:platform_type)
|
374
|
-
@state = args[:state] if args.key?(:state)
|
375
|
-
@threat_entry_type = args[:threat_entry_type] if args.key?(:threat_entry_type)
|
376
|
-
@threat_type = args[:threat_type] if args.key?(:threat_type)
|
377
|
-
end
|
378
|
-
end
|
379
|
-
|
380
|
-
# An update to an individual list.
|
381
|
-
class ListUpdateResponse
|
382
|
-
include Google::Apis::Core::Hashable
|
383
|
-
|
384
|
-
# A set of entries to add to a local threat type's list. Repeated to allow for a
|
385
|
-
# combination of compressed and raw data to be sent in a single response.
|
386
|
-
# Corresponds to the JSON property `additions`
|
387
|
-
# @return [Array<Google::Apis::SafebrowsingV4::ThreatEntrySet>]
|
388
|
-
attr_accessor :additions
|
389
|
-
|
390
|
-
# The expected state of a client's local database.
|
391
|
-
# Corresponds to the JSON property `checksum`
|
392
|
-
# @return [Google::Apis::SafebrowsingV4::Checksum]
|
393
|
-
attr_accessor :checksum
|
394
|
-
|
395
|
-
# The new client state, in encrypted format. Opaque to clients.
|
396
|
-
# Corresponds to the JSON property `newClientState`
|
397
|
-
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
398
|
-
# @return [String]
|
399
|
-
attr_accessor :new_client_state
|
400
|
-
|
401
|
-
# The platform type for which data is returned.
|
402
|
-
# Corresponds to the JSON property `platformType`
|
403
|
-
# @return [String]
|
404
|
-
attr_accessor :platform_type
|
405
|
-
|
406
|
-
# A set of entries to remove from a local threat type's list. In practice, this
|
407
|
-
# field is empty or contains exactly one ThreatEntrySet.
|
408
|
-
# Corresponds to the JSON property `removals`
|
409
|
-
# @return [Array<Google::Apis::SafebrowsingV4::ThreatEntrySet>]
|
410
|
-
attr_accessor :removals
|
411
|
-
|
412
|
-
# The type of response. This may indicate that an action is required by the
|
413
|
-
# client when the response is received.
|
414
|
-
# Corresponds to the JSON property `responseType`
|
415
|
-
# @return [String]
|
416
|
-
attr_accessor :response_type
|
417
|
-
|
418
|
-
# The format of the threats.
|
419
|
-
# Corresponds to the JSON property `threatEntryType`
|
420
|
-
# @return [String]
|
421
|
-
attr_accessor :threat_entry_type
|
422
|
-
|
423
|
-
# The threat type for which data is returned.
|
424
|
-
# Corresponds to the JSON property `threatType`
|
425
|
-
# @return [String]
|
426
|
-
attr_accessor :threat_type
|
427
|
-
|
428
|
-
def initialize(**args)
|
429
|
-
update!(**args)
|
430
|
-
end
|
431
|
-
|
432
|
-
# Update properties of this object
|
433
|
-
def update!(**args)
|
434
|
-
@additions = args[:additions] if args.key?(:additions)
|
435
|
-
@checksum = args[:checksum] if args.key?(:checksum)
|
436
|
-
@new_client_state = args[:new_client_state] if args.key?(:new_client_state)
|
437
|
-
@platform_type = args[:platform_type] if args.key?(:platform_type)
|
438
|
-
@removals = args[:removals] if args.key?(:removals)
|
439
|
-
@response_type = args[:response_type] if args.key?(:response_type)
|
440
|
-
@threat_entry_type = args[:threat_entry_type] if args.key?(:threat_entry_type)
|
441
|
-
@threat_type = args[:threat_type] if args.key?(:threat_type)
|
442
|
-
end
|
443
|
-
end
|
444
|
-
|
445
|
-
# A single metadata entry.
|
446
|
-
class MetadataEntry
|
447
|
-
include Google::Apis::Core::Hashable
|
448
|
-
|
449
|
-
# The metadata entry key. For JSON requests, the key is base64-encoded.
|
450
|
-
# Corresponds to the JSON property `key`
|
451
|
-
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
452
|
-
# @return [String]
|
453
|
-
attr_accessor :key
|
454
|
-
|
455
|
-
# The metadata entry value. For JSON requests, the value is base64-encoded.
|
456
|
-
# Corresponds to the JSON property `value`
|
457
|
-
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
458
|
-
# @return [String]
|
459
|
-
attr_accessor :value
|
460
|
-
|
461
|
-
def initialize(**args)
|
462
|
-
update!(**args)
|
463
|
-
end
|
464
|
-
|
465
|
-
# Update properties of this object
|
466
|
-
def update!(**args)
|
467
|
-
@key = args[:key] if args.key?(:key)
|
468
|
-
@value = args[:value] if args.key?(:value)
|
469
|
-
end
|
470
|
-
end
|
471
|
-
|
472
445
|
# The uncompressed threat entries in hash format of a particular prefix length.
|
473
446
|
# Hashes can be anywhere from 4 to 32 bytes in size. A large majority are 4
|
474
447
|
# bytes, but some hashes are lengthened if they collide with the hash of a
|
475
448
|
# popular URL. Used for sending ThreatEntrySet to clients that do not support
|
476
449
|
# compression, or when sending non-4-byte hashes to clients that do support
|
477
450
|
# compression.
|
478
|
-
class
|
451
|
+
class GoogleSecuritySafebrowsingV4RawHashes
|
479
452
|
include Google::Apis::Core::Hashable
|
480
453
|
|
481
454
|
# The number of bytes for each prefix encoded below. This field can be anywhere
|
@@ -503,7 +476,7 @@ module Google
|
|
503
476
|
end
|
504
477
|
|
505
478
|
# A set of raw indices to remove from a local list.
|
506
|
-
class
|
479
|
+
class GoogleSecuritySafebrowsingV4RawIndices
|
507
480
|
include Google::Apis::Core::Hashable
|
508
481
|
|
509
482
|
# The indices to remove from a lexicographically-sorted local list.
|
@@ -523,7 +496,7 @@ module Google
|
|
523
496
|
|
524
497
|
# The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or
|
525
498
|
# compressed removal indices.
|
526
|
-
class
|
499
|
+
class GoogleSecuritySafebrowsingV4RiceDeltaEncoding
|
527
500
|
include Google::Apis::Core::Hashable
|
528
501
|
|
529
502
|
# The encoded deltas that are encoded using the Golomb-Rice coder.
|
@@ -567,7 +540,7 @@ module Google
|
|
567
540
|
|
568
541
|
# An individual threat; for example, a malicious URL or its hash representation.
|
569
542
|
# Only one of these fields should be set.
|
570
|
-
class
|
543
|
+
class GoogleSecuritySafebrowsingV4ThreatEntry
|
571
544
|
include Google::Apis::Core::Hashable
|
572
545
|
|
573
546
|
# The digest of an executable in SHA256 format. The API supports both binary and
|
@@ -603,12 +576,12 @@ module Google
|
|
603
576
|
|
604
577
|
# The metadata associated with a specific threat entry. The client is expected
|
605
578
|
# to know the metadata key/value pairs associated with each threat type.
|
606
|
-
class
|
579
|
+
class GoogleSecuritySafebrowsingV4ThreatEntryMetadata
|
607
580
|
include Google::Apis::Core::Hashable
|
608
581
|
|
609
582
|
# The metadata entries.
|
610
583
|
# Corresponds to the JSON property `entries`
|
611
|
-
# @return [Array<Google::Apis::SafebrowsingV4::
|
584
|
+
# @return [Array<Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatEntryMetadataMetadataEntry>]
|
612
585
|
attr_accessor :entries
|
613
586
|
|
614
587
|
def initialize(**args)
|
@@ -621,9 +594,36 @@ module Google
|
|
621
594
|
end
|
622
595
|
end
|
623
596
|
|
597
|
+
# A single metadata entry.
|
598
|
+
class GoogleSecuritySafebrowsingV4ThreatEntryMetadataMetadataEntry
|
599
|
+
include Google::Apis::Core::Hashable
|
600
|
+
|
601
|
+
# The metadata entry key. For JSON requests, the key is base64-encoded.
|
602
|
+
# Corresponds to the JSON property `key`
|
603
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
604
|
+
# @return [String]
|
605
|
+
attr_accessor :key
|
606
|
+
|
607
|
+
# The metadata entry value. For JSON requests, the value is base64-encoded.
|
608
|
+
# Corresponds to the JSON property `value`
|
609
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
610
|
+
# @return [String]
|
611
|
+
attr_accessor :value
|
612
|
+
|
613
|
+
def initialize(**args)
|
614
|
+
update!(**args)
|
615
|
+
end
|
616
|
+
|
617
|
+
# Update properties of this object
|
618
|
+
def update!(**args)
|
619
|
+
@key = args[:key] if args.key?(:key)
|
620
|
+
@value = args[:value] if args.key?(:value)
|
621
|
+
end
|
622
|
+
end
|
623
|
+
|
624
624
|
# A set of threats that should be added or removed from a client's local
|
625
625
|
# database.
|
626
|
-
class
|
626
|
+
class GoogleSecuritySafebrowsingV4ThreatEntrySet
|
627
627
|
include Google::Apis::Core::Hashable
|
628
628
|
|
629
629
|
# The compression type for the entries in this set.
|
@@ -638,24 +638,24 @@ module Google
|
|
638
638
|
# compression, or when sending non-4-byte hashes to clients that do support
|
639
639
|
# compression.
|
640
640
|
# Corresponds to the JSON property `rawHashes`
|
641
|
-
# @return [Google::Apis::SafebrowsingV4::
|
641
|
+
# @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4RawHashes]
|
642
642
|
attr_accessor :raw_hashes
|
643
643
|
|
644
644
|
# A set of raw indices to remove from a local list.
|
645
645
|
# Corresponds to the JSON property `rawIndices`
|
646
|
-
# @return [Google::Apis::SafebrowsingV4::
|
646
|
+
# @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4RawIndices]
|
647
647
|
attr_accessor :raw_indices
|
648
648
|
|
649
649
|
# The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or
|
650
650
|
# compressed removal indices.
|
651
651
|
# Corresponds to the JSON property `riceHashes`
|
652
|
-
# @return [Google::Apis::SafebrowsingV4::
|
652
|
+
# @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4RiceDeltaEncoding]
|
653
653
|
attr_accessor :rice_hashes
|
654
654
|
|
655
655
|
# The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or
|
656
656
|
# compressed removal indices.
|
657
657
|
# Corresponds to the JSON property `riceIndices`
|
658
|
-
# @return [Google::Apis::SafebrowsingV4::
|
658
|
+
# @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4RiceDeltaEncoding]
|
659
659
|
attr_accessor :rice_indices
|
660
660
|
|
661
661
|
def initialize(**args)
|
@@ -673,18 +673,18 @@ module Google
|
|
673
673
|
end
|
674
674
|
|
675
675
|
#
|
676
|
-
class
|
676
|
+
class GoogleSecuritySafebrowsingV4ThreatHit
|
677
677
|
include Google::Apis::Core::Hashable
|
678
678
|
|
679
679
|
# The client metadata associated with Safe Browsing API requests.
|
680
680
|
# Corresponds to the JSON property `clientInfo`
|
681
|
-
# @return [Google::Apis::SafebrowsingV4::
|
681
|
+
# @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ClientInfo]
|
682
682
|
attr_accessor :client_info
|
683
683
|
|
684
684
|
# An individual threat; for example, a malicious URL or its hash representation.
|
685
685
|
# Only one of these fields should be set.
|
686
686
|
# Corresponds to the JSON property `entry`
|
687
|
-
# @return [Google::Apis::SafebrowsingV4::
|
687
|
+
# @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatEntry]
|
688
688
|
attr_accessor :entry
|
689
689
|
|
690
690
|
# The platform type reported.
|
@@ -694,7 +694,7 @@ module Google
|
|
694
694
|
|
695
695
|
# The resources related to the threat hit.
|
696
696
|
# Corresponds to the JSON property `resources`
|
697
|
-
# @return [Array<Google::Apis::SafebrowsingV4::
|
697
|
+
# @return [Array<Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatHitThreatSource>]
|
698
698
|
attr_accessor :resources
|
699
699
|
|
700
700
|
# The threat type reported.
|
@@ -704,7 +704,7 @@ module Google
|
|
704
704
|
|
705
705
|
# Details about the user that encountered the threat.
|
706
706
|
# Corresponds to the JSON property `userInfo`
|
707
|
-
# @return [Google::Apis::SafebrowsingV4::
|
707
|
+
# @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatHitUserInfo]
|
708
708
|
attr_accessor :user_info
|
709
709
|
|
710
710
|
def initialize(**args)
|
@@ -722,9 +722,72 @@ module Google
|
|
722
722
|
end
|
723
723
|
end
|
724
724
|
|
725
|
+
# A single resource related to a threat hit.
|
726
|
+
class GoogleSecuritySafebrowsingV4ThreatHitThreatSource
|
727
|
+
include Google::Apis::Core::Hashable
|
728
|
+
|
729
|
+
# Referrer of the resource. Only set if the referrer is available.
|
730
|
+
# Corresponds to the JSON property `referrer`
|
731
|
+
# @return [String]
|
732
|
+
attr_accessor :referrer
|
733
|
+
|
734
|
+
# The remote IP of the resource in ASCII format. Either IPv4 or IPv6.
|
735
|
+
# Corresponds to the JSON property `remoteIp`
|
736
|
+
# @return [String]
|
737
|
+
attr_accessor :remote_ip
|
738
|
+
|
739
|
+
# The type of source reported.
|
740
|
+
# Corresponds to the JSON property `type`
|
741
|
+
# @return [String]
|
742
|
+
attr_accessor :type
|
743
|
+
|
744
|
+
# The URL of the resource.
|
745
|
+
# Corresponds to the JSON property `url`
|
746
|
+
# @return [String]
|
747
|
+
attr_accessor :url
|
748
|
+
|
749
|
+
def initialize(**args)
|
750
|
+
update!(**args)
|
751
|
+
end
|
752
|
+
|
753
|
+
# Update properties of this object
|
754
|
+
def update!(**args)
|
755
|
+
@referrer = args[:referrer] if args.key?(:referrer)
|
756
|
+
@remote_ip = args[:remote_ip] if args.key?(:remote_ip)
|
757
|
+
@type = args[:type] if args.key?(:type)
|
758
|
+
@url = args[:url] if args.key?(:url)
|
759
|
+
end
|
760
|
+
end
|
761
|
+
|
762
|
+
# Details about the user that encountered the threat.
|
763
|
+
class GoogleSecuritySafebrowsingV4ThreatHitUserInfo
|
764
|
+
include Google::Apis::Core::Hashable
|
765
|
+
|
766
|
+
# The UN M.49 region code associated with the user's location.
|
767
|
+
# Corresponds to the JSON property `regionCode`
|
768
|
+
# @return [String]
|
769
|
+
attr_accessor :region_code
|
770
|
+
|
771
|
+
# Unique user identifier defined by the client.
|
772
|
+
# Corresponds to the JSON property `userId`
|
773
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
774
|
+
# @return [String]
|
775
|
+
attr_accessor :user_id
|
776
|
+
|
777
|
+
def initialize(**args)
|
778
|
+
update!(**args)
|
779
|
+
end
|
780
|
+
|
781
|
+
# Update properties of this object
|
782
|
+
def update!(**args)
|
783
|
+
@region_code = args[:region_code] if args.key?(:region_code)
|
784
|
+
@user_id = args[:user_id] if args.key?(:user_id)
|
785
|
+
end
|
786
|
+
end
|
787
|
+
|
725
788
|
# The information regarding one or more threats that a client submits when
|
726
789
|
# checking for matches in threat lists.
|
727
|
-
class
|
790
|
+
class GoogleSecuritySafebrowsingV4ThreatInfo
|
728
791
|
include Google::Apis::Core::Hashable
|
729
792
|
|
730
793
|
# The platform types to be checked.
|
@@ -734,7 +797,7 @@ module Google
|
|
734
797
|
|
735
798
|
# The threat entries to be checked.
|
736
799
|
# Corresponds to the JSON property `threatEntries`
|
737
|
-
# @return [Array<Google::Apis::SafebrowsingV4::
|
800
|
+
# @return [Array<Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatEntry>]
|
738
801
|
attr_accessor :threat_entries
|
739
802
|
|
740
803
|
# The entry types to be checked.
|
@@ -763,7 +826,7 @@ module Google
|
|
763
826
|
# Describes an individual threat list. A list is defined by three parameters:
|
764
827
|
# the type of threat posed, the type of platform targeted by the threat, and the
|
765
828
|
# type of entries in the list.
|
766
|
-
class
|
829
|
+
class GoogleSecuritySafebrowsingV4ThreatListDescriptor
|
767
830
|
include Google::Apis::Core::Hashable
|
768
831
|
|
769
832
|
# The platform type targeted by the list's entries.
|
@@ -794,7 +857,7 @@ module Google
|
|
794
857
|
end
|
795
858
|
|
796
859
|
# A match when checking a threat entry in the Safe Browsing threat lists.
|
797
|
-
class
|
860
|
+
class GoogleSecuritySafebrowsingV4ThreatMatch
|
798
861
|
include Google::Apis::Core::Hashable
|
799
862
|
|
800
863
|
# The cache lifetime for the returned match. Clients must not cache this
|
@@ -811,13 +874,13 @@ module Google
|
|
811
874
|
# An individual threat; for example, a malicious URL or its hash representation.
|
812
875
|
# Only one of these fields should be set.
|
813
876
|
# Corresponds to the JSON property `threat`
|
814
|
-
# @return [Google::Apis::SafebrowsingV4::
|
877
|
+
# @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatEntry]
|
815
878
|
attr_accessor :threat
|
816
879
|
|
817
880
|
# The metadata associated with a specific threat entry. The client is expected
|
818
881
|
# to know the metadata key/value pairs associated with each threat type.
|
819
882
|
# Corresponds to the JSON property `threatEntryMetadata`
|
820
|
-
# @return [Google::Apis::SafebrowsingV4::
|
883
|
+
# @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatEntryMetadata]
|
821
884
|
attr_accessor :threat_entry_metadata
|
822
885
|
|
823
886
|
# The threat entry type matching this threat.
|
@@ -844,69 +907,6 @@ module Google
|
|
844
907
|
@threat_type = args[:threat_type] if args.key?(:threat_type)
|
845
908
|
end
|
846
909
|
end
|
847
|
-
|
848
|
-
# A single resource related to a threat hit.
|
849
|
-
class ThreatSource
|
850
|
-
include Google::Apis::Core::Hashable
|
851
|
-
|
852
|
-
# Referrer of the resource. Only set if the referrer is available.
|
853
|
-
# Corresponds to the JSON property `referrer`
|
854
|
-
# @return [String]
|
855
|
-
attr_accessor :referrer
|
856
|
-
|
857
|
-
# The remote IP of the resource in ASCII format. Either IPv4 or IPv6.
|
858
|
-
# Corresponds to the JSON property `remoteIp`
|
859
|
-
# @return [String]
|
860
|
-
attr_accessor :remote_ip
|
861
|
-
|
862
|
-
# The type of source reported.
|
863
|
-
# Corresponds to the JSON property `type`
|
864
|
-
# @return [String]
|
865
|
-
attr_accessor :type
|
866
|
-
|
867
|
-
# The URL of the resource.
|
868
|
-
# Corresponds to the JSON property `url`
|
869
|
-
# @return [String]
|
870
|
-
attr_accessor :url
|
871
|
-
|
872
|
-
def initialize(**args)
|
873
|
-
update!(**args)
|
874
|
-
end
|
875
|
-
|
876
|
-
# Update properties of this object
|
877
|
-
def update!(**args)
|
878
|
-
@referrer = args[:referrer] if args.key?(:referrer)
|
879
|
-
@remote_ip = args[:remote_ip] if args.key?(:remote_ip)
|
880
|
-
@type = args[:type] if args.key?(:type)
|
881
|
-
@url = args[:url] if args.key?(:url)
|
882
|
-
end
|
883
|
-
end
|
884
|
-
|
885
|
-
# Details about the user that encountered the threat.
|
886
|
-
class UserInfo
|
887
|
-
include Google::Apis::Core::Hashable
|
888
|
-
|
889
|
-
# The UN M.49 region code associated with the user's location.
|
890
|
-
# Corresponds to the JSON property `regionCode`
|
891
|
-
# @return [String]
|
892
|
-
attr_accessor :region_code
|
893
|
-
|
894
|
-
# Unique user identifier defined by the client.
|
895
|
-
# Corresponds to the JSON property `userId`
|
896
|
-
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
897
|
-
# @return [String]
|
898
|
-
attr_accessor :user_id
|
899
|
-
|
900
|
-
def initialize(**args)
|
901
|
-
update!(**args)
|
902
|
-
end
|
903
|
-
|
904
|
-
# Update properties of this object
|
905
|
-
def update!(**args)
|
906
|
-
@region_code = args[:region_code] if args.key?(:region_code)
|
907
|
-
@user_id = args[:user_id] if args.key?(:user_id)
|
908
|
-
end
|
909
|
-
end
|
910
910
|
end
|
911
911
|
end
|
912
912
|
end
|