google-apis-safebrowsing_v4 0.15.0 → 0.16.0

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.
@@ -22,24 +22,8 @@ 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
-
41
25
  # The expected state of a client's local database.
42
- class GoogleSecuritySafebrowsingV4Checksum
26
+ class Checksum
43
27
  include Google::Apis::Core::Hashable
44
28
 
45
29
  # The SHA256 hash of the client state; that is, of the sorted list of all hashes
@@ -60,7 +44,7 @@ module Google
60
44
  end
61
45
 
62
46
  # The client metadata associated with Safe Browsing API requests.
63
- class GoogleSecuritySafebrowsingV4ClientInfo
47
+ class ClientInfo
64
48
  include Google::Apis::Core::Hashable
65
49
 
66
50
  # A client ID that (hopefully) uniquely identifies the client implementation of
@@ -85,81 +69,8 @@ module Google
85
69
  end
86
70
  end
87
71
 
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
-
161
72
  # The constraints for this update.
162
- class GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequestConstraints
73
+ class Constraints
163
74
  include Google::Apis::Core::Hashable
164
75
 
165
76
  # A client's physical location, expressed as a ISO 31166-1 alpha-2 region code.
@@ -213,81 +124,66 @@ module Google
213
124
  end
214
125
  end
215
126
 
216
- #
217
- class GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse
127
+ # A generic empty message that you can re-use to avoid defining duplicated empty
128
+ # messages in your APIs. A typical example is to use it as the request or the
129
+ # response type of an API method. For instance: service Foo ` rpc Bar(google.
130
+ # protobuf.Empty) returns (google.protobuf.Empty); `
131
+ class Empty
218
132
  include Google::Apis::Core::Hashable
219
133
 
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
-
233
134
  def initialize(**args)
234
135
  update!(**args)
235
136
  end
236
137
 
237
138
  # Update properties of this object
238
139
  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)
241
140
  end
242
141
  end
243
142
 
244
- # An update to an individual list.
245
- class GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponseListUpdateResponse
143
+ # Describes a Safe Browsing API update request. Clients can request updates for
144
+ # multiple lists in a single request. The server may not respond to all requests,
145
+ # if the server has no updates for that list. NOTE: Field index 2 is unused.
146
+ # NEXT: 5
147
+ class FetchThreatListUpdatesRequest
246
148
  include Google::Apis::Core::Hashable
247
149
 
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
253
-
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
150
+ # The client metadata associated with Safe Browsing API requests.
151
+ # Corresponds to the JSON property `client`
152
+ # @return [Google::Apis::SafebrowsingV4::ClientInfo]
153
+ attr_accessor :client
258
154
 
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
155
+ # The requested threat list updates.
156
+ # Corresponds to the JSON property `listUpdateRequests`
157
+ # @return [Array<Google::Apis::SafebrowsingV4::ListUpdateRequest>]
158
+ attr_accessor :list_update_requests
264
159
 
265
- # The platform type for which data is returned.
266
- # Corresponds to the JSON property `platformType`
267
- # @return [String]
268
- attr_accessor :platform_type
160
+ def initialize(**args)
161
+ update!(**args)
162
+ end
269
163
 
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
164
+ # Update properties of this object
165
+ def update!(**args)
166
+ @client = args[:client] if args.key?(:client)
167
+ @list_update_requests = args[:list_update_requests] if args.key?(:list_update_requests)
168
+ end
169
+ end
275
170
 
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
171
+ #
172
+ class FetchThreatListUpdatesResponse
173
+ include Google::Apis::Core::Hashable
281
174
 
282
- # The format of the threats.
283
- # Corresponds to the JSON property `threatEntryType`
284
- # @return [String]
285
- attr_accessor :threat_entry_type
175
+ # The list updates requested by the clients. The number of responses here may be
176
+ # less than the number of requests sent by clients. This is the case, for
177
+ # example, if the server has no updates for a particular list.
178
+ # Corresponds to the JSON property `listUpdateResponses`
179
+ # @return [Array<Google::Apis::SafebrowsingV4::ListUpdateResponse>]
180
+ attr_accessor :list_update_responses
286
181
 
287
- # The threat type for which data is returned.
288
- # Corresponds to the JSON property `threatType`
182
+ # The minimum duration the client must wait before issuing any update request.
183
+ # If this field is not set clients may update as soon as they want.
184
+ # Corresponds to the JSON property `minimumWaitDuration`
289
185
  # @return [String]
290
- attr_accessor :threat_type
186
+ attr_accessor :minimum_wait_duration
291
187
 
292
188
  def initialize(**args)
293
189
  update!(**args)
@@ -295,29 +191,23 @@ module Google
295
191
 
296
192
  # Update properties of this object
297
193
  def update!(**args)
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)
194
+ @list_update_responses = args[:list_update_responses] if args.key?(:list_update_responses)
195
+ @minimum_wait_duration = args[:minimum_wait_duration] if args.key?(:minimum_wait_duration)
306
196
  end
307
197
  end
308
198
 
309
199
  # Request to return full hashes matched by the provided hash prefixes.
310
- class GoogleSecuritySafebrowsingV4FindFullHashesRequest
200
+ class FindFullHashesRequest
311
201
  include Google::Apis::Core::Hashable
312
202
 
313
203
  # The client metadata associated with Safe Browsing API requests.
314
204
  # Corresponds to the JSON property `apiClient`
315
- # @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ClientInfo]
205
+ # @return [Google::Apis::SafebrowsingV4::ClientInfo]
316
206
  attr_accessor :api_client
317
207
 
318
208
  # The client metadata associated with Safe Browsing API requests.
319
209
  # Corresponds to the JSON property `client`
320
- # @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ClientInfo]
210
+ # @return [Google::Apis::SafebrowsingV4::ClientInfo]
321
211
  attr_accessor :client
322
212
 
323
213
  # The current client states for each of the client's local threat lists.
@@ -328,7 +218,7 @@ module Google
328
218
  # The information regarding one or more threats that a client submits when
329
219
  # checking for matches in threat lists.
330
220
  # Corresponds to the JSON property `threatInfo`
331
- # @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatInfo]
221
+ # @return [Google::Apis::SafebrowsingV4::ThreatInfo]
332
222
  attr_accessor :threat_info
333
223
 
334
224
  def initialize(**args)
@@ -345,12 +235,12 @@ module Google
345
235
  end
346
236
 
347
237
  #
348
- class GoogleSecuritySafebrowsingV4FindFullHashesResponse
238
+ class FindFullHashesResponse
349
239
  include Google::Apis::Core::Hashable
350
240
 
351
241
  # The full hashes that matched the requested prefixes.
352
242
  # Corresponds to the JSON property `matches`
353
- # @return [Array<Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatMatch>]
243
+ # @return [Array<Google::Apis::SafebrowsingV4::ThreatMatch>]
354
244
  attr_accessor :matches
355
245
 
356
246
  # The minimum duration the client must wait before issuing any find hashes
@@ -379,18 +269,18 @@ module Google
379
269
  end
380
270
 
381
271
  # Request to check entries against lists.
382
- class GoogleSecuritySafebrowsingV4FindThreatMatchesRequest
272
+ class FindThreatMatchesRequest
383
273
  include Google::Apis::Core::Hashable
384
274
 
385
275
  # The client metadata associated with Safe Browsing API requests.
386
276
  # Corresponds to the JSON property `client`
387
- # @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ClientInfo]
277
+ # @return [Google::Apis::SafebrowsingV4::ClientInfo]
388
278
  attr_accessor :client
389
279
 
390
280
  # The information regarding one or more threats that a client submits when
391
281
  # checking for matches in threat lists.
392
282
  # Corresponds to the JSON property `threatInfo`
393
- # @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatInfo]
283
+ # @return [Google::Apis::SafebrowsingV4::ThreatInfo]
394
284
  attr_accessor :threat_info
395
285
 
396
286
  def initialize(**args)
@@ -405,12 +295,12 @@ module Google
405
295
  end
406
296
 
407
297
  #
408
- class GoogleSecuritySafebrowsingV4FindThreatMatchesResponse
298
+ class FindThreatMatchesResponse
409
299
  include Google::Apis::Core::Hashable
410
300
 
411
301
  # The threat list matches.
412
302
  # Corresponds to the JSON property `matches`
413
- # @return [Array<Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatMatch>]
303
+ # @return [Array<Google::Apis::SafebrowsingV4::ThreatMatch>]
414
304
  attr_accessor :matches
415
305
 
416
306
  def initialize(**args)
@@ -424,12 +314,12 @@ module Google
424
314
  end
425
315
 
426
316
  #
427
- class GoogleSecuritySafebrowsingV4ListThreatListsResponse
317
+ class ListThreatListsResponse
428
318
  include Google::Apis::Core::Hashable
429
319
 
430
320
  # The lists available for download by the client.
431
321
  # Corresponds to the JSON property `threatLists`
432
- # @return [Array<Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatListDescriptor>]
322
+ # @return [Array<Google::Apis::SafebrowsingV4::ThreatListDescriptor>]
433
323
  attr_accessor :threat_lists
434
324
 
435
325
  def initialize(**args)
@@ -442,13 +332,150 @@ module Google
442
332
  end
443
333
  end
444
334
 
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
+
445
472
  # The uncompressed threat entries in hash format of a particular prefix length.
446
473
  # Hashes can be anywhere from 4 to 32 bytes in size. A large majority are 4
447
474
  # bytes, but some hashes are lengthened if they collide with the hash of a
448
475
  # popular URL. Used for sending ThreatEntrySet to clients that do not support
449
476
  # compression, or when sending non-4-byte hashes to clients that do support
450
477
  # compression.
451
- class GoogleSecuritySafebrowsingV4RawHashes
478
+ class RawHashes
452
479
  include Google::Apis::Core::Hashable
453
480
 
454
481
  # The number of bytes for each prefix encoded below. This field can be anywhere
@@ -476,7 +503,7 @@ module Google
476
503
  end
477
504
 
478
505
  # A set of raw indices to remove from a local list.
479
- class GoogleSecuritySafebrowsingV4RawIndices
506
+ class RawIndices
480
507
  include Google::Apis::Core::Hashable
481
508
 
482
509
  # The indices to remove from a lexicographically-sorted local list.
@@ -496,7 +523,7 @@ module Google
496
523
 
497
524
  # The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or
498
525
  # compressed removal indices.
499
- class GoogleSecuritySafebrowsingV4RiceDeltaEncoding
526
+ class RiceDeltaEncoding
500
527
  include Google::Apis::Core::Hashable
501
528
 
502
529
  # The encoded deltas that are encoded using the Golomb-Rice coder.
@@ -540,7 +567,7 @@ module Google
540
567
 
541
568
  # An individual threat; for example, a malicious URL or its hash representation.
542
569
  # Only one of these fields should be set.
543
- class GoogleSecuritySafebrowsingV4ThreatEntry
570
+ class ThreatEntry
544
571
  include Google::Apis::Core::Hashable
545
572
 
546
573
  # The digest of an executable in SHA256 format. The API supports both binary and
@@ -576,12 +603,12 @@ module Google
576
603
 
577
604
  # The metadata associated with a specific threat entry. The client is expected
578
605
  # to know the metadata key/value pairs associated with each threat type.
579
- class GoogleSecuritySafebrowsingV4ThreatEntryMetadata
606
+ class ThreatEntryMetadata
580
607
  include Google::Apis::Core::Hashable
581
608
 
582
609
  # The metadata entries.
583
610
  # Corresponds to the JSON property `entries`
584
- # @return [Array<Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatEntryMetadataMetadataEntry>]
611
+ # @return [Array<Google::Apis::SafebrowsingV4::MetadataEntry>]
585
612
  attr_accessor :entries
586
613
 
587
614
  def initialize(**args)
@@ -594,36 +621,9 @@ module Google
594
621
  end
595
622
  end
596
623
 
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 GoogleSecuritySafebrowsingV4ThreatEntrySet
626
+ class ThreatEntrySet
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::GoogleSecuritySafebrowsingV4RawHashes]
641
+ # @return [Google::Apis::SafebrowsingV4::RawHashes]
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::GoogleSecuritySafebrowsingV4RawIndices]
646
+ # @return [Google::Apis::SafebrowsingV4::RawIndices]
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::GoogleSecuritySafebrowsingV4RiceDeltaEncoding]
652
+ # @return [Google::Apis::SafebrowsingV4::RiceDeltaEncoding]
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::GoogleSecuritySafebrowsingV4RiceDeltaEncoding]
658
+ # @return [Google::Apis::SafebrowsingV4::RiceDeltaEncoding]
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 GoogleSecuritySafebrowsingV4ThreatHit
676
+ class ThreatHit
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::GoogleSecuritySafebrowsingV4ClientInfo]
681
+ # @return [Google::Apis::SafebrowsingV4::ClientInfo]
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::GoogleSecuritySafebrowsingV4ThreatEntry]
687
+ # @return [Google::Apis::SafebrowsingV4::ThreatEntry]
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::GoogleSecuritySafebrowsingV4ThreatHitThreatSource>]
697
+ # @return [Array<Google::Apis::SafebrowsingV4::ThreatSource>]
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::GoogleSecuritySafebrowsingV4ThreatHitUserInfo]
707
+ # @return [Google::Apis::SafebrowsingV4::UserInfo]
708
708
  attr_accessor :user_info
709
709
 
710
710
  def initialize(**args)
@@ -722,72 +722,9 @@ 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
-
788
725
  # The information regarding one or more threats that a client submits when
789
726
  # checking for matches in threat lists.
790
- class GoogleSecuritySafebrowsingV4ThreatInfo
727
+ class ThreatInfo
791
728
  include Google::Apis::Core::Hashable
792
729
 
793
730
  # The platform types to be checked.
@@ -797,7 +734,7 @@ module Google
797
734
 
798
735
  # The threat entries to be checked.
799
736
  # Corresponds to the JSON property `threatEntries`
800
- # @return [Array<Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatEntry>]
737
+ # @return [Array<Google::Apis::SafebrowsingV4::ThreatEntry>]
801
738
  attr_accessor :threat_entries
802
739
 
803
740
  # The entry types to be checked.
@@ -826,7 +763,7 @@ module Google
826
763
  # Describes an individual threat list. A list is defined by three parameters:
827
764
  # the type of threat posed, the type of platform targeted by the threat, and the
828
765
  # type of entries in the list.
829
- class GoogleSecuritySafebrowsingV4ThreatListDescriptor
766
+ class ThreatListDescriptor
830
767
  include Google::Apis::Core::Hashable
831
768
 
832
769
  # The platform type targeted by the list's entries.
@@ -857,7 +794,7 @@ module Google
857
794
  end
858
795
 
859
796
  # A match when checking a threat entry in the Safe Browsing threat lists.
860
- class GoogleSecuritySafebrowsingV4ThreatMatch
797
+ class ThreatMatch
861
798
  include Google::Apis::Core::Hashable
862
799
 
863
800
  # The cache lifetime for the returned match. Clients must not cache this
@@ -874,13 +811,13 @@ module Google
874
811
  # An individual threat; for example, a malicious URL or its hash representation.
875
812
  # Only one of these fields should be set.
876
813
  # Corresponds to the JSON property `threat`
877
- # @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatEntry]
814
+ # @return [Google::Apis::SafebrowsingV4::ThreatEntry]
878
815
  attr_accessor :threat
879
816
 
880
817
  # The metadata associated with a specific threat entry. The client is expected
881
818
  # to know the metadata key/value pairs associated with each threat type.
882
819
  # Corresponds to the JSON property `threatEntryMetadata`
883
- # @return [Google::Apis::SafebrowsingV4::GoogleSecuritySafebrowsingV4ThreatEntryMetadata]
820
+ # @return [Google::Apis::SafebrowsingV4::ThreatEntryMetadata]
884
821
  attr_accessor :threat_entry_metadata
885
822
 
886
823
  # The threat entry type matching this threat.
@@ -907,6 +844,69 @@ module Google
907
844
  @threat_type = args[:threat_type] if args.key?(:threat_type)
908
845
  end
909
846
  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